Serghei Mangul’s Introduction to UNIX Workshops

We present three video recordings of workshops that ZarLab postdoctoral scholar Serghei Mangul developed under the UCLA Institute for Quantitative and Computational Biosciences Collaboratory and delivered to Bruins-In-Genomics (B.I.G.) SUMMER participants. B.I.G. SUMMER is an intensive, practical experience in genomics and bioinformatics for undergraduate students who are interested in integrating quantitative and biological knowledge and considering pursuing graduate degrees in the biological, biomedical, or health sciences.

An important question for undergraduates considering careers in the biosciences is whether or not biologists need to develop robust programming skills. Biology students without backgrounds in computer science are often intimidated by applications that require inputting code or negotiating systems that lack a graphical interface, such as Unix, R, SASS, and Python.


“Becoming a programmer” may seem daunting to many students in biology, but an ability to analyze sequencing data represents a competitive advantage in today’s age of big data and next generation sequencing. By gaining familiarity with Unix, these students may find it easier to engage with other applications and programming languages commonly used in computational biology. In order to use Unix effectively, students must learn how to directly enter functional commands line-by-line into a workbench that manages multiple platforms and a unified filesystem—without the familiar aid of a graphical interface.

In this three-part series of workshops, Dr. Mangul provides just enough information for students with no computational background to get started using Unix for analytical tasks. These workshops aim to help participants learn key commands and develop fundamental skills, such as connecting, writing, and submitting basic shell scripts to a cluster.

Slides and more information about the workshop are available at the following webpage:

Introduction to UNIX 1/3

Introduction to UNIX 2/3

Introduction to UNIX 3/3


Imputing Phenotypes for Genome-wide Association Studies


Pairwise correlation between each phenotype pair in the NFBC dataset.

In genome-wide association studies (GWAS), investigators identify variants that are significantly associated with the phenotype by collecting and performing statistical tests on genotypes and phenotypes from a set of individuals. Recently, GWAS samples have increased in size to include tens or hundreds of thousands of variants. Studies working with such large datasets have recently discovered hundreds of variants involved in multiple common diseases (Schunkert et al. 2011; Voight et al. 2010). For the most part, identified variants have very small effect sizes, suggesting that larger association studies are capable of implicating more variants.

Increasing the size of GWAS samples is a shared goal among bioinformatics researchers. Unfortunately, some phenotypes are either logistically difficult or very expensive to collect. For these phenotypes, it is impractical to perform GWAS with tens or hundreds of thousands of individuals. Examples of these difficult-to-collect phenotypes include those that require obtaining an inaccessible tissue (such as brain expression), using a complex intervention (such as a response to diet), and re-contacting individuals simply because they were unmeasured in the original cohort. For these phenotypes, an investigator finds it difficult to collect samples large enough to discover variants with small effect sizes. As a result, it is unlikely that GWAS will perform effectively on these phenotypes.

To address this issue, we developed a novel approach we call phenotype imputation. In our method, we estimate and leverage the correlation structure between multiple phenotypes to impute the uncollected phenotype. A paper presenting our approach was accepted by and is in press with the American Journal of Human Genetics.

In order to leverage the correlation structure between multiple phenotypes, we first estimate the correlation structure from a complete dataset that includes all phenotypes. We then use the conditional distribution based on the multivariate normal (MVN) statistical framework to impute the uncollected phenotypes in an incomplete dataset. Our approach uses only phenotypic—not genetic—information, enabling subsequent use of these imputed phenotypes for association testing without incurring data re-use. For GWAS including both complete and incomplete datasets, we provide an optimal meta-analysis strategy that accounts for imputation uncertainties by combining association results from both collected and imputed phenotypes. Further, our paper demonstrates that phenotype imputation can be performed using summary statistics. This result makes our method applicable to datasets where we only have access to the summary statistics and not the raw genotypes and phenotypes.

In our forthcoming AJHG paper, we use the Northern Finland Birth Cohort (NFBC) data to assess the performance of our novel method. The NFBC dataset consists of 10 phenotypes collected from 5,327 individuals. The 10 phenotypes are triglycerides (TG), highdensity lipoproteins (HDL), low-density lipoproteins (LDL), glucose (GLU), insulin (INS), body mass index (BMI), C-reactive protein (CRP) as a measure of inflammation, systolic blood pressure (SBP), diastolic blood pressure (DBP), and height. The genotype data consists of 331,476 SNPs.

Imputing the TG, BMI, and SBP phenotypes enable us to recover most of the significantly associated loci in the original data at the nominal significance level, as shown in the above figure. This result demonstrates that the imputed phenotype can effectively be used for replication purposes, even though it might not provide sufficient power for discovery purposes due to imputation uncertainties.

Our approach allows us to know the exact distribution of the imputed phenotype due to our parametric assumptions. We can directly use the mean value of this distribution as the imputed value. Furthermore, we utilize the variance of the missing phenotype in our analysis of the statistical power. The primary advantage of our framework is that it increases the power of GWASs on phenotypes that are difficult to collect. Analytical power computation is provided that allows investigators to determine the benefit of the imputation for a given dataset prospectively. Another advantage of this method is that it allows the use of summary statistics when the raw genotypes are not available.

This project was led by Farhad Hormozdiari and involved Michael Bilow. The article is available at:

The full citation to our paper is:

Hormozdiari, Farhad; Kang, Eun Yong; Bilow, Michael; Ben-David, Eyal; Vulpe, Chris; McLachlan, Stela; Lusis, Aldons; Han, Buhm; Eskin, Eleazar (2016): Imputing Phenotypes for Genome-wide Association Studies.. In: American Journal of Human Genetics, in press , 2016. (Type: Journal Article | Abstract | Links | BibTeX)

Total RNA Sequencing reveals microbial communities in human blood and disease specific effects

Together with researchers from UC San Francisco, UC Davis, Oregon State University, and the Netherlands, our group recently published a paper on bioRxiv that presents a new method capable of identifying different microbes present in human blood. Our paper is featured in the Stanford University digest of microbiome papers, as well as an international science and technology news source. Here, we demonstrate the potential use of total RNA to study the relationship of specific diseases with microbes that inhabit the human body.

A growing body of evidence suggests that the human microbiome plays an important role in health and disease. In order to investigate the specific ways that microbes may influence disease development, we developed a novel ‘lost and found’ pipeline. Here, we use whole blood RNA sequencing (RNA-Seq) reads to detect a variety of microbial organisms. Our ‘lost and found’ pipeline utilizes high quality reads that fail to map to the human genome as candidate microbial reads. Since RNA-Seq has become a widely used technology in recent years with many large datasets available, we believe that our pipeline has great potential for application across tissues and disease types.

We applied our ‘lost and found’ pipeline to study the composition of blood microbiome in almost two hundred individuals, including healthy control individuals and patients with schizophrenia, bipolar disorder, and amyotrophic lateral sclerosis (also known as ALS or Lou Gehrig’s disease). Using this pipeline, we detected bacterial and archaeal phyla in blood using RNA sequencing (RNA-Seq) data. Our analyses of these data, including examination of positive and negative control datasets, suggest that detected phyla are in fact representative of the actual microbial communities in the individuals’ blood.

In total, we observed 23 distinct microbial phyla with on average 4.1 ± 2.0 phyla per individual. Phylogenetic classification is performed using Phylosift, which assigns the filtered candidate microbial reads to the microbial genes from 23 distinct taxa on the phylum level. The large majority of taxa that were observed in our sample are not universally present in all individuals, except for Proteobacteria that dominate all samples with 73.4% ± 18.3% relative abundance (dark green color). Here, we can see the genomic abundances of microbial taxa at phylum level of classification for each of the four groups:
Further, in comparison to individuals in the other three groups, we observed a significantly increased microbial diversity in blood samples from individuals with schizophrenia. We replicated this finding with an independent schizophrenia case-control study. The increased microbial diversity observed in schizophrenia could be part of the disease etiology (i.e., causing schizophrenia) or may be a secondary effect of disease status. In the absence of a direct link with genetic susceptibility and the reported correlation with the immune system, we hypothesize that the observed effect in schizophrenia is secondary to disease. This phenomena may be a consequence of lifestyle differences of schizophrenia patients, including cigarette smoking, drug use, or other environmental exposures. Future targeted and/or longitudinal studies with larger sample sizes, detailed clinical phenotypes, and more in-depth sequencing are needed to corroborate this hypothesis.

We hope that our finding of increased diversity in schizophrenia will ultimately lead to a better understanding of the functional mechanisms underlying the connection between immune system, blood microbiome, and disease etiology. With the increasing availability of large scale RNA-Seq datasets collected from different phenotypes and tissue types, we anticipate that the application of our ‘lost and found’ pipeline will lead to the generation of a range of novel hypotheses, ultimately aiding our understanding of the role of the microbiome in health and disease.

This project was led by Serghei Mangul and Loes Olde Loohuis (Roel Ophoff group). This was a joint project with the Roel Ophoff group at Center for Neurobehavioral Genetics at the Semel Institute for Neuroscience and Human Behavior, University California, Los Angeles, CA, USA.

The article is available at:

The full citation to our paper is:

Mangul, Serghei; Loohuis, Loes Olde; Ori, Anil; Jospin, Guillaume; Koslicki, David; Yang, Harry Taegyun; Wu, Timothy; Boks, Marco; Lomen-Hoerth, Catherine; Wiedau-Pazos, Martina; Cantor, Rita; de Vos, Willem; Kahn, Rene; Eskin, Eleazar; Ophoff, Roel (2016): Total RNA Sequencing reveals microbial communities in human blood and disease specific effects.. In: BioRxiv, (057570), 2016. (Type: Journal Article | Abstract | Links | BibTeX)