Subscribe Posts by category By tags
Recent posts
-
Notes on using sqlite3
Below we assume that the SQLite3 database is stored in a file ‘mydb’
- To list all tables in a database
sqlite3 mydb .tables
In an interactive session,
.tables
can be also used to list all tables. - To print the schema of a database into a text file
sqlite3 mydb .schema > mydb_schema.sql
- To list the first 10 rows of a table (mytable) in an interactive session
SELECT * FROM mytable WHERE ROWID<=10;
- To use foreign keys in sqlite3, say column
ParentID
in tableChildTable
should reference the columnID
in tableParentTable
CREATE TABLE ParentTable ( ID INTEGER PRIMARY KEY, NAME TEXT ); CREATE TABLE ChildTable ( ID INTEGER PRIMARY KEY, ParentID INTEGER, NAME TEXT, FOREIGN KEY(ParentID) REFERENCES ParentTable(ID) );
Notice that in the last parameter of create table,
ParentID
is used as a parameter of the functionFOREIGN KEY
, and the parent table and foreign key column are defined by the formatParentTable(ID)
. The two parentheses are interpreted differently.
- To list all tables in a database
-
Pharmacogenomics of GPCR Drug Targets
During the Christmas break I stumbled upon a very interesting paper published in Cell, Pharmacogenomics of GPCR Drug Targets (open access). I liked the paper, because it points a way forward to personalised pharmacology and safety.
-
Ridge regression, LASSO, and elastic net explained
glmnet
is a R package for ridge regression, LASSO regression, and elastic net. The authors of the package, Trevor Hastie and Junyang Qian, have written a beautiful vignette accompanying the package to demonstrate how to use the package: here is the link to the version hosted on the homepage of T. Hastie (and an ealier version written in 2014). -
edX Medicinal Chemistry - chapter one
I follow course DavidsonX: D001x Medicinal Chemistry on edX. Here are the notes.
-
Start of the blog
I start the blog project to take notes of things I learn as a computational biologist working in drug discovery.
- 17
- 18
- •