Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Importing itemRgb column of bed files

6 views
Skip to first unread message

Antonin Thiébaut

unread,
Apr 13, 2023, 11:49:27 AM4/13/23
to apollo
Hello all,

I was wondering whether there is a way to import the itemRgb column of a bed file. I would like to use it to color the features.

I am currently using the following command in Apollo v2.6.2 to create the bed tracks:
perl -w bin/flatfile-to-json.pl --bed path/to/bed --trackLabel putative_orf --key "PCCR bacteria" --out data/bacteria/ --config '{ "category": "Coding Potential" }' --trackType CanvasFeatures

This successfully imports the file and there is no display problem on the browser, however I have the feeling it only imports the data of the first few columns of the file (I checked in the tracks directory that is created during the import). Can it be caused by an improper formatting or my file? Or am I missing an option in the command, is there another script to do this?

Thank you in advance,

Antonin

Nathan Dunn

unread,
Apr 13, 2023, 1:03:04 PM4/13/23
to Antonin Thiébaut, gmod-ajax, apollo

This is more of a JBrowse 1 question. 

Nathan


--
To unsubscribe from this group and stop receiving emails from it, send an email to apollo+un...@lbl.gov.

Colin

unread,
Apr 14, 2023, 1:46:59 PM4/14/23
to Nathan Dunn, Antonin Thiébaut, gmod-ajax, apollo
Hi Antonin
I would use BEDTabix because the BED handling of flatfile-to-json doesn't load the itemRgb info correctly as far as I can tell, but with BEDTabix, it's fairly easy.

Example config for a BEDTabix track

{
  "label": "My track",
  "urlTemplate": "file.bed.gz",
  "storeClass": "JBrowse/Store/SeqFeature/BEDTabix",
  "style": { "color": "function(feature){return feature.get('itemrgb')}" }
}

-Colin

Antonin Thiébaut

unread,
Apr 17, 2023, 5:52:31 AM4/17/23
to apollo, Colin, Antonin Thiébaut, gmod-ajax, apollo, Nathan Dunn
Hi Colin,

Thanks for the advice, the BEDTabix track upload worked great!

Antonin
Reply all
Reply to author
Forward
0 new messages