Sep 10, 2014

Introduction to Biostatistics and Bioinformatics course at NYUMC

We are giving a new course in the PhD program at NYU Med School (Sackler Institute) this semester called "Introduction to Biostatistics and Bioinformatics". It will have a mixture of lectures on Bioinformatics, Biostatistics, and Python programming. Hopefully we will be able to show the students the intersection of these topics as something like "Data Science for Biology".  Lecturers will be myself, David Fenyo, Judy Zhong, and Pamela Wu.

Course Overview
The goal for the Introduction to Biostatistics and Bioinformatics course is to provide an introduction to statistics and informatics methods for the analysis of data generated in biomedical research. Practical examples covering both small-scale lab experiments and high-throughput assays will be explored. The course covers a wide range of topics in a short time so the focus will be on the basic concepts, and in the practical programming exercises the students explore these basic concept and common pitfalls. An introduction of basic Python and R programming will be given throughout the course and many exercises will involve programming.

The lectures will be posted to YouTube each week. Here are our first ones from yesterday:
Intro Lecture/Data Visualization:
Python programming #1:

The course curriculum and links to lecture slides (PPT), readings, and various handouts and exercises is here:

Aug 20, 2014

Cheap genome projects

I have been helping out several  groups who want to do cheap, quick genome projects on previously "unsequenced" eukaryotic organisms. In terms of the genetic diversity of living things, at this point we have sampled very unevenly across taxonomic domains. Insects are particularly underrepresented in the whole genome database. According to the number of named species, insects represent over 80% of animal species. The NCBI has over 10,000 whole genome projects, but only 132 insects (and 36 of those are Drosophila species). So there is certainly taxonomic room to knock out some more insect genomes and discover interesting new stuff. A wide variety of valid arguments can be made for the usefulness of sequencing any number of as yet overlooked organisms in all taxonomic domains.

There are a lot of very useful experimental approaches that require a draft genome as a reference:  gene expression, transcription factors and epigenetics (ChIP-seq), and just the basic evolutionary biology of important genes that are present or absent in the genome, novel paralogs in important gene families, etc.  A few years ago, building a draft genome for a new organism was a major undertaking that required substantial funding and a dedicated research team. Today, the sequencing can be done fairly cheaply, but the bioinformatics work is extremely open ended. Clearly you can work and work and work to make a very well defined and annotated genome with maximum value for all possible users. But what is the optimal set of most useful genomic information that we can produce with a few person-weeks of time?  [that would perhaps serve as preliminary data to bring in showers of additional funding for follow-up studies]

NOTE ONE: Collect both genomic and RNA sequence data. These two data types are extremely complementary. Many earlier de novo genome projects built on collections of existing EST sequence data, which was the poor man's approach to draft genomes in the previous decade. The ESTs provided seeds for gene finding on the genomic DNA, training of gene-finding algorithms, etc. Now we can get a comprehensive genome wide set of RNA-seq data for the cost of one lane on a HiSeq machine and a sample prep kit. If you have the choice, get 100 bp paired-end sequencing of the RNA, it will map better and end up giving more value for the dollar. It might be possible to use paired-end RNA to bridge DNA contigs into scaffolds - as far as I know, this is an untested area. It would be very helpful to have a normalized RNA library, to get more coverage of poorly expressed genes – this is on my wish list for future Cheap-O Genome projects.

NOTE TWO: More data is good. High total genome coverage is good, but long insert paired-end DNA libraries build better genome contigs. This makes complete sense. Early "shotgun" genome projects relied on sequencing the ends of clones from libraries with various size inserts. It would be really nice to have 10 or 20 KB insert libraries, or "mate pair" sequences that come from the junctions of large  genomic fragments that have been circularized, but these are generally not available when your entire sequencing budget is in the single digit thousands of dollars. We were able to get a 550 bp insert library for a recent project and it led to an assembly with an N50 > 40 KB. Pretty good for two lanes of HiSeq data. 

For our next cheap genome, we are using the Illumina TruSeq Synthetic Long-Read kit (which is based on technology developed by Moleculo). This is a really clever idea: first it breaks the genome into ~10 KB fragments and sorts the fragments into wells of a 384 well plate. Just a few dozen to a few hundred fragments in each well. The fragments in each well are clonally amplified (sort of like 454 technology), then sheared into the normal size range for Illumina sequencing (300-500 bp) and tagged with barcode primers at the ends.  Then all the tagged fragments are pooled and sequenced normally on a HiSeq machine. Illumina has a custom assembly app (built in BaseSpace) that demultiplexs the data and does separate de novo assembly on each barcode set – so it is just assembling the small number of 10 KB fragments from one well. The final output is a set of "synthetic long reads" that really do seem to be 10 kb long.

(From Illumina product literature)

NOTE THREE: I like the SOAPdenovo assembler (127-kmer) for Illumina DNA sequence data. It did a good job for us on several different species with only a moderate consumption of computing resources (an overnight job on 32 processors with shared 128 GB of RAM). The final product is a set of contigs in FASTA format, some quite big, and a lot of little ones. Hopefully the sum of the contigs comes out to something similar to the expected genome size of the organism.  The quite new SOAPdenovo-Trans assembler for RNA-seq also worked quite well for us – at least in comparison to Trinity which is a huge computer hog.

I visualize the bioinformatics work in two parts. First, find the genes in our data. Second, annotate the found genes and the genome using reference data.  [Annotation will be described in another blog post.]

Ok, so here is my gene finding workflow for the Cheap-O Genome Project.
Gene Finding Workflow

  1.  Assemble DNA reads into genome contigs with SOAPdenovo assembler (127-kmer)
  2.  De novo gene finding on the DNA contigs with GeneScan or GeneMark (I used GeneMark).
  3. Assemble RNA-seq reads into "transcripts" with SOAPdenovo-Trans
  4. Map RNA-seq reads onto the DNA contigs with TopHat
  5.  Make another set of transcripts with Cufflinks (using no annotation file)
  6. Use BLAT to map the de novo assembled transcripts onto the DNA contigs
  7.  Use the extremely useful script written by  Dave Tang (  to convert the output of BLAT (in .psl format) into a .bed file, choosing only the best match for each query. Without this sorting and conversion, the BLAT results as a PSL file look like garbage in a genome browser.

OK, now assemble all 5 data sets into one nice visualization using IGV or GBrowse. We have a genome track (the DNA contigs from SOAPdenovo in FASTA format), an RNA track (the RNA-seq reads aligned to the draft genome in BAM format), a gene prediction track (GeneMark GTF file), the Cufflinks transcripts (transcripts.gtf), and the RNA assemblies (from SOAPdenovo-Trans) as a BED file.   For some genes, all of the data agree quite nicely.  For other genes, it's guess your best. 

Here are two IGV screenshots of examples from the same genome contig.  The first is a nice gene with plenty of RNA where all 3 annotation methods agree.

The second is a messy region where no gene model makes much sense, none of the methods agree at all, but there seems to be enough RNA (and spliced alignments!) to suggest real transcription is happening. Time to add some reference data by homology modeling (in my next post on annotation). 

Nov 16, 2013

Dr. Evan Eichler speaks about genomic structural variation

Yesterday I attended an excellent symposium on genomic structural variation organized by the Simons Foundation. The unifying theme from all of the speakers was the use of Pacific Biosicences long read technology to resolve large-scale duplicated sequences in the human genome. These long PacBio reads (5-10 kb) can be assembled across genetic regions with complex patterns of repeat structures, segmental duplications, inversions and deletions.

For me, The highlight of the afternoon was a talk by Evan Eichler from the University of Washington.  Dr. Eichler presented both detailed sequencing data from specific loci and a grand overview of structural variation that synthsizes copy number variation, multi-gene families, the biology of autism and human evolution. His first point was that the reference genome is missing substantial sections of duplicated DNA, which has significant variation from person to person. Assembly software will tend to collapse multiple, nearly identical paralogus gene copies into one locus. Dr Eichler’s group has constructed more accurate sequences for regions with these complex patterns of segmental duplication using long PacBio reads. He has identified paralogous copies of genes, which actually exist as  multi-gene families, and then created specific tags to track the copy number of various gene isoforms in different human genomes (such as from the 1000 genomes project).  For example the SRGAP2 locus has 4 isoforms, each of which may be repeated several times in the genomes of some people.

Second, he explained that these regions of frequent copy number variation are often the site of deletions in the genomes of people with autism.  These deletions and duplications may be quite large and typically include dozens of other genes besides the family of paralogs. In fact, the genome has hotspots of CNVs that are flanked by high-identity duplicated regions. In addition, some people may have additional duplications at hotspots, which create a predisposition for deletion or expansion events in their progeny.

Why do these deletions and duplications cause autism? Dr. Eicher suggested that brain development is a process that involves many genes, and it is particularly sensitive to gene dosage.

Dr. Eichler proposed a link to human evolution that is quite tantalizing. Many of the families of duplicated genes at the CNV hotspots are involved in brain development. These same genes are not duplicated in apes. A process of gene duplication and sequence variation allows for positive selection for new brain development phenotypes.  So the gene duplication process which created expanded and more complex human brains may also make us susceptible to neurologially damaging CNV mutations.

Oct 26, 2013

A bit more on genome annotation

One bit of followup on the Pig genome annotation story. We usually visualize RNA-seq results in the IGV browser. It allows direct inspection of read alignments to your favorite genes and can also be helpful to spot sequence variations and splicing issues.  However, IGV has a set of pre-loaded default genomes that also seem to be derived from RefSeq. So once again, working with data from the pig,  There was no annotation for most of our genes of interest. This is fairly annoying since it means that the only way to look at the annotation of a gene is to first look up the gene in UCSC and then copy the exact chromosome coordinates to IGV, including intron-exon borders.

It is possible to fix this by downloading to the local computer the ENSEMBL gene annotations from UCSC Table Browser as a BED file (not too large), and then loading the BED file into IGV as another data track. This works nicely in terms of showing the genes and exons, but the gene labels still carry the ugly ENSEMBL names. Once again, the ensemblToGeneName track comes in handy, providing a table with the ENSEMBL name and the Official gene symbol for about 20,000 genes. We were able to add the gene symbol to the BED file, but this has to be done carefully (in Perl or Awk) since making file edits in Excel seems to break the BED file (at least for me).  Loading the edited BED file into IGV, I was then able to jump to genes by name and get screen shots of interesting regions that included a gene structure track with nice gene names.

Sep 26, 2013

Pig Genome Problems

I have had a few issues with genome annotation in the past couple of weeks that highlight how dependent NGS methods are on these reference files. In a mouse RNA-seq project, we found that RNA reads from some olfactory receptor genes were getting low expression counts (using TopHat/Cufflinks) because RNA reads were not mapping within the known exons of the genes. When we looked at the actual alignment BAM files in IGV, it was clear that the exon boundaries in the reference (RefSeq) genes were wrong. Both the 3' and 5' ends of some genes were missing regions with lots of RNA alignments. It would be nice to make a new reference genome using our RNA-seq reads to create our own annotation, but it is actually quite difficult to get one RNA sample with all genes expressed at useful levels.

In a different RNA-seq project on pig (a model system for cardiology), we ran the standard TopHat/Cufflinks pipeline using the RefSeq gene annotation from the Illumina IGENOMES project (a convenient way to get FASTA, GTF, and Bowtie index files for many genomes: When we looked at the alignment QC using the CollectRnaSeqMetrics from the Picard toolkit, we found that only about 20% of the reads were mapped to exons. A closer look at the annotation file showed that the RefSeq genome for pig (Sus Scrofa) only has about 4,000 genes. That just does not work for RNA-seq. ENSEMBL has a much more complete gene annotation for pig, but the ENSEMBL GTF file is not read nicely by TopHat/Cufflinks.  Thanks to my very helpful friend Igor Dolgalev, I learned that the UCSC Genome Browser has a reformatted ENSEMBL GTF annotation for pig (and most other genomes), but it is missing gene names. The GTF from UCSC Table Browser looks like this:
chr1 susScr3_ensGene stop_codon 268374986 268374988 0 - . gene_id "ENSSSCT00000005917"; transcript_id "ENSSSCT00000005917";
This GTF file has over 30,000 genes and 500,000 lines for individual exons.
UCSC also has a  conversion table for susScr3.ensemblToGeneName with names for about 20,000 of the ENSEMBL genes.  I have not figured out a simple way to write these names back into the GTF file without breaking it, so for now I am matching the names into the final gene expression results.
My only conclusion from these issues with reference genomes is that we depend on these things to be right, and when they are not, NGS data analysis can be badly messed up. There is no simple solution for providing a perfect reference for every genome for every purpose, so bioinformaticians need to stay on their toes and dig deeper when results from standard methods don't make sense.