-
Notifications
You must be signed in to change notification settings - Fork 0
Content Changes
This page describes how to make updates to track content on the browser. Throughout this guide, I will use the BBQS859 strain as an example, but replace that strain name with others for generalized commands.
Raw data for each track is stored in the raw/
directory of each organism. For consistency, any additional raw data that we use to build tracks should go in this folder of the appropriate organism.
To improve security on the server, track setup scripts are located in my home directory, /home/bencap/jbrowse_track_building
. Navigate to this directory to run setup scripts, then copy data to the appropriate web directory for tracks to display correctly.
-
Navigate to
/home/bencap/jbrowse_track_building
and add any new raw data to the appropriateraw/
directory in the web documents. -
Build the gene tracks from the appropriate
.gff
file using a command similar to the one below:
perl bin/flatfile-to-json.pl --gff /web/docs/bbqs_master/raw/ --trackType CanvasFeatures --trackLabel BBQS859
-
This command will output a set of files to
data/tracks/BBQS859
. With regard to burkholderia genomes, you should see two directories - one for each chromosome. -
We can then copy the new data to that same directory in the
/web/docs
tree - overwriting the old data
cp ./data/tracks/BBQS859/NZ_QPEQ01000001.1/hist-* /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
cp ./data/tracks/BBQS859/NZ_QPEQ01000001.1/lf-* /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
cp ./data/tracks/BBQS859/NZ_QPEQ01000001.1/names.txt /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
cp ./data/tracks/BBQS859/NZ_QPEQ01000001.1/trackData.txt /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
- Reload the browser to ensure the files copied successfully.
-
Navigate to
/home/bencap/jbrowse_track_building
and add any new raw data to the appropriateraw/
directory in the web documents. -
Build the pseudogene tracks from the appropriate
.bed
file using a command similar to the one below
python3 bin/bed_to_json.py --in /web/docs/bbqs_master/raw/bbqs859_chr1.pseudo_for_browser.bed --out trackData_pseudogenes.json --chunk pse --strain BBQS859
for pseudogenes, we have one file for each chromosome, so you will have to run the command again with the file containing data on the second chromosome:
python3 bin/bed_to_json.py --in /web/docs/bbqs_master/raw/bbqs859_chr2.pseudo_for_browser.bed --out trackData_pseudogenes.json --chunk pse --strain BBQS859
-
Verify the appropriate tracks
pse-0.json
andtrackData_pseudogenes.json
exist in the output data directory. -
Copy these files to the production data directory with
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/pse-0.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/trackData_pseudogenes.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
-
Repeat the above for the chromosome 2 data.
-
Reload the browser.
-
Navigate to
/home/bencap/jbrowse_track_building
and add any new raw data to the appropriateraw/
directory in the web documents. -
Build the island tracks from the appropriate
.bed
file with a command similar to the one below
python3 bin/bed_to_json.py --in /web/docs/bbqs_master/raw/bbqs859_chr1.GI_for_browser.bed --out trackData_islands.json --chunk isl --strain BBQS859
remember to also build data for the second chromosome.
-
Verify the appropriate tracks
isl-0.json
andtrackData_islands.json
exist in the output data directory. -
Copy these files to the production data directory with
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/isl-0.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/trackData_islands.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
-
Repeat the above for the chromosome 2 data.
-
Reload the browser.
-
Navigate to
/home/bencap/jbrowse_track_building
and add any new raw data to the appropriateraw/
directory in the web documents. -
Build the IS Element tracks from the appropriate
.bed
file with a command similar to the one below
python3 bin/bed_to_json.py --in /web/docs/bbqs_master/raw/bbqs859_chr1.IS_for_browser.bed --out trackData_iselements.json --chunk ise --strain BBQS859
remember to also build data for the second chromosome.
-
Verify the appropriate tracks
ise-0.json
andtrackData_iselements.json
exist in the output data directory. -
Copy these files to the production data directory with
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/ise-0.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/trackData_iselements.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
-
Repeat the above for the chromosome 2 data.
-
Reload the browser.
-
Navigate to
/home/bencap/jbrowse_track_building
and add any new raw data to the appropriateraw/
directory in the web documents. -
Build the gene transfer tracks from the appropriate
.bed
file with a command similar to the one below
python3 bin/bed_to_json.py --in /web/docs/bbqs_master/raw/bbqs859_chr1.hgt_for_browser.bed --out trackData_genetransfer.json --chunk hgt --strain BBQS859
remember to also build data for the second chromosome.
-
Verify the appropriate tracks
hgt-0.json
andtrackData_genetransfer.json
exist in the output data directory. -
Copy these files to the production data directory with
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/hgt-0.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/trackData_genetransfer.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
-
Repeat the above for the chromosome 2 data.
-
Reload the browser.
-
Navigate to
/home/bencap/jbrowse_track_building
and add any new raw data to the appropriateraw/
directory in the web documents. -
Build the gene transfer tracks from the appropriate
.bed
file with a command similar to the one below
python3 bin/bed_to_json.py --in /web/docs/bbqs_master/raw/bbqs859_chr1.ss_for_browser.bed --out trackData_secretion.json --chunk sec --strain BBQS859
remember to also build data for the second chromosome.
-
Verify the appropriate tracks
sec-0.json
andtrackData_secretion.json
exist in the output data directory. -
Copy these files to the production data directory with
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/sec-0.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/trackData_secretion.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
-
Repeat the above for the chromosome 2 data.
-
Reload the browser.
-
Navigate to
/home/bencap/jbrowse_track_building
and add any new raw data to the appropriateraw/
directory in the web documents. -
Build the gene transfer tracks from the appropriate
.bed
file with a command similar to the one below
python3 bin/bed_to_json.py --in /web/docs/bbqs_master/raw/bbqs859_chr1.effectors_for_browser.bed --out trackData_effectors.json --chunk eff --strain BBQS859
remember to also build data for the second chromosome.
-
Verify the appropriate tracks
eff-0.json
andtrackData_effectors.json
exist in the output data directory. -
Copy these files to the production data directory with
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/eff-0.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/trackData_effectors.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
-
Repeat the above for the chromosome 2 data.
-
Reload the browser.
-
Navigate to
/home/bencap/jbrowse_track_building
and add any new raw data to the appropriateraw/
directory in the web documents. -
Build the track from the appropriate file. I recommend using
.bed
formats for custom data for consistency. Ensure you use a chunk name and track name different from other tracks. Note the chunk name should be three letters.
python3 bin/bed_to_json.py --in /web/docs/bbqs_master/raw/new_track_data.bed --out trackData_unique_track_name.json --chunk XXX --strain BBQS859
Again, remember to add both chromosomes.
-
Verify the appropriate tracks
XXX-0.json
andtrackData_unique_track_name.json
exist in the output data directory. -
Copy these files to the production data directory with
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/XXX-0.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
cp data/tracks/BBQS859/NZ_QPEQ01000001.1/trackData_unique_track_name.json /web/docs/bbqs_master/data/tracks/BBQS859/NZ_QPEQ01000001.1
-
Repeat the above for the chromosome 2 data.
-
Navigate to data/tracks/trackList.json. Open the file and add an entry for the new track. This entry should follow the format below:
{
"category" : "Category for New Track", # this is the drop down menu under which the track will appear
"compress" : 0,
"disableCollapsedClick" : false,
"enableCollapsedMouseover" : false,
"hideFAASequenceBox" : true,
"key" : "Secretion System Components", # this is the visible name of the track that shows up in the browser on the left hand side
"label" : "TXSScan", # the name of the major software used to generate the track
"maxFeatureGlyphExpansion" : 500000,
"maxFeatureSizeForUnderlyingRefSeq" : 250000,
"maxHeight" : 1000,
"metadata" : {},
"storeClass" : "JBrowse/Store/SeqFeature/NCList",
"trackType" : "JBrowse/View/Track/CanvasFeatures",
"type" : "JBrowse/View/Track/CanvasFeatures",
"urlTemplate" : "tracks/BBQS859/{refseq}/trackData_unique_track_name.json" # this points to where the track is
},
- If you want to add searchable features for this track, you should create a name directory using the track label:
mkdir ./<strain>/<track label>
This is where you will but the names.txt
file for this track.
- Reload the browser.
-
Navigate to /web/docs/bbqs_master/data/tracks. Verify which track you intend to delete and retrieve both the chunk name (the three letter prefix to the
-0.json
file containing track data) and thetrackData
name (the suffix aftertrackData_
). -
Run
rm BBQS859/NZ_QPEQ01000001.1/<prefix>*.json
rm BBQS859/NZ_QPEQ01000001.1/trackData_<suffix>.json
and repeat the above for the second chromosome.
-
Delete the appropriate entry for this data from
./trackList.json
. You should see the entry for thetrackData_<suffix>
under theurlTemplate
field in the JSON object. -
Reload the browser.
FileNotFoundError: [Errno 2] No such file or directory: 'data/tracks/BBQS859/NZ_QPEQ01000001.1/trackData_pseudogenes.json'
This error indicates the python script could not find a viable output path for the data. Simply run
mkdir data/tracks/BBQS859/NZ_QPEQ01000001.1
and run the command again.