Simon Danisch / May 27 2019

Mango Environment

apt-get update
apt-get install -y software-properties-common
add-apt-repository ppa:openjdk-r/ppa
apt-get update
apt-get install openjdk-8-jdk -y
apt-get install scala
wget -O spark.tgz http://apache.lauf-forum.at/spark/spark-2.4.3/spark-2.4.3-bin-hadoop2.7.tgz
tar zxvf spark.tgz  -C /usr/local/
mv /usr/local/spark-2.4.3-bin-hadoop2.7 /usr/local/spark
wget -O mango.tar.gz https://search.maven.org/remotecontent?filepath=org/bdgenomics/mango/mango-distribution/0.0.1/mango-distribution-0.0.1-bin.tar.gz
tar xzvf mango.tar.gz
pip install -U pytest pyspark
pip install bdgenomics.mango.pileup
jupyter nbextension enable --py --sys-prefix bdgenomics.mango.pileup
pip install bdgenomics.mango
wget https://github.com/bigdatagenomics/mango/raw/master/mango-viz/examples/data/alignments.ga4gh.chr17.1-250.json
# imports
import bdgenomics.mango.pileup as pileup
from bdgenomics.mango.pileup.track import *
import pandas as pd
# read in JSON
readsJson = pd.read_json("alignments.ga4gh.chr17.1-250.json")
GA4GHAlignmentJson = readsJson.to_json()

# make pileup track
tracks=[Track(viz="pileup", label="my Reads", source=pileup.sources.GA4GHAlignmentJson(GA4GHAlignmentJson))]

# render tracks in widget
reads = pileup.PileupViewer(locus="chr17:1-100", reference="hg19", tracks=tracks)
reads
# imports
import bdgenomics.mango.pileup as pileup
from bdgenomics.mango.pileup.track import *
import pandas as pd
# read in JSON
readsJson = pd.read_json("alignments.ga4gh.chr17.1-250.json")
GA4GHAlignmentJson = readsJson.to_json()

# make pileup track
tracks=[Track(viz="pileup", label="my Reads", source=pileup.sources.GA4GHAlignmentJson(GA4GHAlignmentJson))]

# render tracks in widget
reads = pileup.PileupViewer(locus="chr17:1-100", reference="hg19", tracks=tracks)
reads
PileupViewer(...f104c65e390>])

Should look like this, which is the same run locally in Jupyter: