# For its use in colab notebook
!pip install jbrowse-jupyter
# For its use in colab notebook
!pip install pandas
!pip install --force-reinstall MarkupSafe==2.0.1
import pandas as pd
from jbrowse_jupyter import launch, create
hg38 = create('LGV', genome='hg38')
data = {'refName':['10', '10', '10', '10'],
'start':[100, 150, 200, 250],
'end':[175, 225, 275, 325],
'name':['feature1', 'feature2', 'feature3', 'feature4']}
df = pd.DataFrame(data)
print(df)
hg38.add_df_track(df, 'track_name', track_id="df_track_id", overwrite=True)
refName start end name 0 10 100 175 feature1 1 10 150 225 feature2 2 10 200 275 feature3 3 10 250 325 feature4
hg38.set_location("10:100..350")
hg38.set_default_session(['df_track_id'], False)
new_conf = hg38.get_config()
launch(new_conf, port=3013)
tracks = [
("https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/ncbi_refseq/GCA_000001405.15_GRCh38_full_analysis_set.refseq_annotation.sorted.gff.gz", "gff-demo"),
("https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/skbr3/SKBR3_Feb17_GRCh38.sorted.bam", "bam-demo"),
("https://hgdownload.cse.ucsc.edu/goldenpath/hg38/phyloP100way/hg38.phyloP100way.bw", "bigwig-demo"),
("https://ftp.ncbi.nlm.nih.gov/pub/clinvar/vcf_GRCh38/clinvar.vcf.gz", "vcf-demo"),
("https://jbrowse.org/genomes/GRCh38/repeats.bb", "bigbed")
]
for track in tracks:
data = track[0]
track_id = track[1]
hg38.add_track(data, track_id=track_id)
# set theme
hg38.set_theme("#311b92", "#0097a7", "#f57c00", "#d50000")
hg38.set_default_session(['gff-demo', 'bigbed'],False)
hg38.set_location("1:110654228..110936130")
new_conf2 = hg38.get_config()
launch(new_conf2, id="test-2",height=800, dash_comp="LGV", port=8000)