Friday, September 26, 2014

Git pretty log

git log --graph --decorate --oneline --all

git diff <c3b37f0>

MySQL Spatial Queries

http://howto-use-mysql-spatial-ext.blogspot.ca/

org.hibernate.dialect.MySQLDialect
MySQL5Dialect, MySQLInnoDBDialect, MySQLMyISAMDialect
 https://docs.jboss.org/hibernate/orm/3.6/javadocs/org/hibernate/dialect/MySQLDialect.html

drop table test;

create table test (
    id INT NOT NULL PRIMARY KEY,
    location LINESTRING NOT NULL,
    SPATIAL KEY sx_location (location)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

set @a = linestring(point(1,1),point(5,1));
set @b = linestring(point(1,1),point(10,1));

insert into test values(1, @a);
insert into test values(2, @b);

select * from test where MBRtouches(location, linestring(point(1,1),point(5,1)) );
select * from test where MBRtouches(location, linestring(point(2,1),point(3,1)) );
select * from test where MBRtouches(location, linestring(point(1,1),point(2,1)) );
select * from test where MBRtouches(location, linestring(point(1,1),point(7,1)) );
select * from test where MBRtouches(location, linestring(point(-1,1),point(0,1)) );
select * from test where MBRtouches(location, linestring(point(0,1),point(1,1)) );
select * from test where MBRtouches(location, linestring(point(7,1),point(12,1)) );
select * from test where MBRtouches(location, linestring(point(12,1),point(20,1)) );

select MBRcontains(@b,@a);
select MBRcontains(@a,@b);
select MBRoverlaps(@a,@b);
select MBRoverlaps(@b,@a);
select MBRtouches(@a,@b);

Hibernate SQL statement debug

log4j.logger.org.hibernate.SQL=TRACE
log4j.logger.org.hibernate.type.descriptor.sql.BasicBinder=TRACE

Wednesday, September 10, 2014

Microarray vs RNA-seq, Normalization

John Storey provides his take on the importance of new statistical methods for high-throughput sequencing.

http://www.nature.com/nbt/journal/v29/n4/full/nbt.1831.html

Honing our reading skills

http://www.nature.com/nbt/journal/v32/n9/full/nbt.3021.html?WT.ec_id=NBT-201409

Nature Biotechnology Contents: Volume 32 pp 700 - 960
http://mabsj2.blogspot.ca/2014/09/nature-biotechnology-contents-volume-32.html

The devil in the details of RNA-seq
http://www.nature.com/nbt/journal/v32/n9/full/nbt.3015.html#affil-auth
RNA-seq is clearly superior to microarrays for its ability for de novo discovery and detection of genes, especially those with low expression levels. The detection of alternative splicing patterns is possible, but attention needs to be paid to the underlying gene annotation, and parameters such as mapping and error rates become more important than sequencing depth.

Detecting and correcting systematic variation in large-scale RNA sequencing data
Sheng Li,    Paweł P Łabaj,    Paul Zumbo,    Peter Sykacek,    Wei Shi,    Leming Shi,    John Phan,    Po-Yen Wu,    May Wang,    Charles Wang,    Danielle Thierry-Mieg,    Jean Thierry-Mieg,    David P Kreil & Christopher E Mason
AffiliationsContributionsCorresponding authors
Nature Biotechnology 32, 888–895 (2014) doi:10.1038/nbt.3000

Abstract• Introduction• Results• Discussion• Methods• Accession codes• References• Acknowledgments• Author information• Supplementary information
High-throughput RNA sequencing (RNA-seq) enables comprehensive scans of entire transcriptomes, but best practices for analyzing RNA-seq data have not been fully defined, particularly for data collected with multiple sequencing platforms or at multiple sites. Here we used standardized RNA samples with built-in controls to examine sources of error in large-scale RNA-seq studies and their impact on the detection of differentially expressed genes (DEGs). Analysis of variations in guanine-cytosine content, gene coverage, sequencing error rate and insert size allowed identification of decreased reproducibility across sites. Moreover, commonly used methods for normalization (cqn, EDASeq, RUV2, sva, PEER) varied in their ability to remove these systematic biases, depending on sample complexity and initial data quality. Normalization methods that combine data from genes across sites are strongly recommended to identify and remove site-specific effects and can substantially improve RNA-seq studies.

http://www.nature.com/nbt/journal/v32/n9/full/nbt.3000.html?WT.ec_id=NBT-201409

http://www.nature.com/nbt/journal/v32/n9/full/nbt.2931.html?WT.ec_id=NBT-201409

http://www.nature.com/nbt/journal/v32/n9/full/nbt.2957.html?WT.ec_id=NBT-201409

http://www.nature.com/nbt/journal/v32/n9/full/nbt.2972.html?WT.ec_id=NBT-201409

http://www.nature.com/nbt/journal/v32/n9/full/nbt.3001.html?WT.ec_id=NBT-201409