Subscribe Posts by category By tags
Recent posts
-
edX Medicinal Chemistry - Chapter Two on the drug discovery process
Chapter two gives an overview on the whole drug discovery process, from basic approaches of drug discovery to marketing.
-
A crash course to start state-of-the-art NLP in 2018
Recently I stumbled via HackerNews upon a good article introducing how to perform state-of-the-art natural language processing (NLP) analysis, featuring real-world examples.
-
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