Difference between revisions of "JBrowse"
Jump to navigation
Jump to search
| (One intermediate revision by the same user not shown) | |||
| Line 3: | Line 3: | ||
<br /> | <br /> | ||
| − | # folder raw data: /var/www/html/jbrowse/sample_data/raw/ | + | #folder raw data: /var/www/html/jbrowse/sample_data/raw/ |
| − | # folder configuration files: /var/www/html/jbrowse/sample_data/json/ | + | #folder configuration files: /var/www/html/jbrowse/sample_data/json/ |
We have to create a new folder for each dataset: | We have to create a new folder for each dataset: | ||
| − | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
| Line 17: | Line 16: | ||
==Add reference from fasta== | ==Add reference from fasta== | ||
| + | <syntaxhighlight> | ||
| + | cd /var/www/html/jbrowse/sample_data/json/MTB | ||
| + | prepare-refseqs.pl --fasta NC_000962.fna | ||
| + | </syntaxhighlight><br /> | ||
| + | |||
| + | *This will create | ||
| + | **/var/www/html/jbrowse/sample_data/json/MTB/tracks.conf | ||
| + | **/var/www/html/jbrowse/sample_data/json/MTB/trackList.json | ||
| + | **/var/www/html/jbrowse/sample_data/json/MTB/seq | ||
| − | == Add bam track files == | + | ==Add bam track files== |
| − | * Add sorted bam file in "/var/www/html/jbrowse/sample_data/raw/MTB" | + | *Add sorted bam file in "/var/www/html/jbrowse/sample_data/raw/MTB" |
| − | * Index bam file | + | *Index bam file |
<syntaxhighlight> | <syntaxhighlight> | ||
cd /var/www/html/jbrowse/sample_data/raw/MTB | cd /var/www/html/jbrowse/sample_data/raw/MTB | ||
| Line 28: | Line 36: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | * Add bam track to <u>tracks.conf</u> | + | *Add bam track to <u>tracks.conf</u> |
| − | + | <syntaxhighlight> | |
| − | |||
emacs -nw /var/www/html/jbrowse/sample_data/json/MTB/tracks.conf | emacs -nw /var/www/html/jbrowse/sample_data/json/MTB/tracks.conf | ||
</syntaxhighlight>Content:<syntaxhighlight lang="json"> | </syntaxhighlight>Content:<syntaxhighlight lang="json"> | ||
| Line 54: | Line 61: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | == Add gene track == | + | ==Add gene track== |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
| + | # convert gbk to gff | ||
| + | gbk2gff.py -i genome_gbwithparts.gbk -o genome_gbwithparts.gff | ||
| + | |||
| + | # add track | ||
flatfile-to-json.pl --gff genome_gbwithparts.gff --type CDS --trackLabel ORFs --out /var/www/html/jbrowse/sample_data/json/MTB --nameAttributes locus_tag | flatfile-to-json.pl --gff genome_gbwithparts.gff --type CDS --trackLabel ORFs --out /var/www/html/jbrowse/sample_data/json/MTB --nameAttributes locus_tag | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | == Add locus tags index == | + | ==Add locus tags index== |
| + | <br /><syntaxhighlight lang="bash"> | ||
| + | cd /var/www/html/jbrowse/sample_data/raw/MTB | ||
| + | generate-names.pl --verbose --out /var/www/html/jbrowse/sample_data/json/MTB | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | |||
| + | This will create | ||
| + | |||
| + | */var/www/html/jbrowse/sample_data/json/MTB/names | ||
| + | |||
| + | == Access browser == | ||
| + | |||
| + | |||
| + | [http://127.0.0.1/jbrowse/index.html?data=sample_data%2Fjson%2FMTB http://127.0.0.1/jbrowse/index.html?data=sample_data/json/MTB] | ||
| + | <br /> | ||
Latest revision as of 13:26, 6 September 2019
folder structure
- folder raw data: /var/www/html/jbrowse/sample_data/raw/
- folder configuration files: /var/www/html/jbrowse/sample_data/json/
We have to create a new folder for each dataset:
mkdir /var/www/html/jbrowse/sample_data/raw/MTB
mkdir /var/www/html/jbrowse/sample_data/json/MTB
Add reference from fasta
cd /var/www/html/jbrowse/sample_data/json/MTB
prepare-refseqs.pl --fasta NC_000962.fna
- This will create
- /var/www/html/jbrowse/sample_data/json/MTB/tracks.conf
- /var/www/html/jbrowse/sample_data/json/MTB/trackList.json
- /var/www/html/jbrowse/sample_data/json/MTB/seq
Add bam track files
- Add sorted bam file in "/var/www/html/jbrowse/sample_data/raw/MTB"
- Index bam file
cd /var/www/html/jbrowse/sample_data/raw/MTB
samtools index 538048.bam- Add bam track to tracks.conf
emacs -nw /var/www/html/jbrowse/sample_data/json/MTB/tracks.confContent:
# make a section for the new track called tracks.(unique name)
[ tracks.my-bam-track ]
# settings for what data is shown in the track
storeClass = JBrowse/Store/SeqFeature/BAM
urlTemplate = ../../raw/MTB/538048.bam
baiUrlTemplate = ../../raw/MTB/538048.bam.bai
type = JBrowse/View/Track/Alignments2
key = BAM alignments from sample XYZ
renderPrettyAlignments = true
[ tracks.bam-coverage ]
storeClass = JBrowse/Store/SeqFeature/BAM
urlTemplate = ../../raw/MTB/538048.bam
baiUrlTemplate = ../../raw/MTB/538048.bam.bai
type = JBrowse/View/Track/SNPCoverage
Add gene track
# convert gbk to gff
gbk2gff.py -i genome_gbwithparts.gbk -o genome_gbwithparts.gff
# add track
flatfile-to-json.pl --gff genome_gbwithparts.gff --type CDS --trackLabel ORFs --out /var/www/html/jbrowse/sample_data/json/MTB --nameAttributes locus_tag
Add locus tags index
cd /var/www/html/jbrowse/sample_data/raw/MTB
generate-names.pl --verbose --out /var/www/html/jbrowse/sample_data/json/MTB
This will create
- /var/www/html/jbrowse/sample_data/json/MTB/names
Access browser
http://127.0.0.1/jbrowse/index.html?data=sample_data/json/MTB