Subscribe Posts by category By tags
Recent posts
-
Zürich Life Science Day 2018: presentation and impressions
Zürich Life Science Day is a one-day event organised by the Life Science Zurich Young Scientist Network, mostly students from ETH and Univeristy of Zürich, that aims at introducing career opportunities to students and young professionals in life science. Beyond booths and stands by academic institutes and companies, career opportunities in both academics and industry are presented by speakers with years of first-hand experience in respective functions and positions.
-
Develop R packages with Rcpp and RStudio
Recently, I updated the ribiosMath package. The aim was to increase the efficiency of several commonly used computational procedures (Kappa’s statistic, cosine similarity, etc.) by implementing them in C++.
-
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).