GMOD / JBrowseR

R interface to the JBrowse 2 Linear Genome View.
https://gmod.github.io/JBrowseR/
Apache License 2.0
35 stars 3 forks source link

add Multiple same tracks #31

Open Wanjie-Feng opened 9 months ago

Wanjie-Feng commented 9 months ago

hello, Thank you for developing this tool! I had some problems when building my Genome browser, I wanted to create multiple tracks of the same type, such as bw files, but when adding tracks on the web page, I couldn't select them, clicking on the box didn't respond image image I hope I can get some help

cmdcolin commented 9 months ago

i would guess that the tracks are being given the same "trackId" by an automated system that tries to infer trackId from the URL. you could try renaming the files as a stop-gap to try to fix. we can try to address this also in our system to avoid this issue (we are renewing some efforts on both JBrowseR and jbrowse-jupyter, so hopefully can check out sometime soon)

cmdcolin commented 9 months ago

(to be clear trackIds are meant to be unique, and it is just an unfortunate bug of our system that adding the different files is generating the same trackId causing this bug for you)

cmdcolin commented 9 months ago

another alternative approach would be using config.json, so you can have control over the trackIds (some docs in the README on this)

katjur01 commented 3 months ago

Hello,

Thank you for the great job you are doing!

I have the same issue. In my case, I need to load two different BAM files with indexes. I understand that I need to do it through the config file, but I couldn't find any use case in the documentation. Yes, I found it for bigWig, but for that, there is the adapter "type": "MultiWiggleAdapter". Can you help me with it, please? Here is my config:

{ "assembly": { "name": "hg38", "sequence": { "type": "ReferenceSequenceTrack", "trackId": "GRCh38-ReferenceSequenceTrack", "adapter": { "type": "BgzipFastaAdapter", "fastaLocation": { "uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz" }, "faiLocation": { "uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz.fai" }, "gziLocation": { "uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz.gzi" } } } }, "tracks":[ { "trackId": "my_alignments_track", "name": "My Alignments", "assemblyNames": ["hg38"], "type": "AlignmentsTrack", "adapter": { "type": "BamAdapter", "subadapters": [ { "type": "BamAdapter", "name": "k1", "bamLocation": { "uri": "http://127.0.0.1:5000/DZ1601fuze.bam" }, "index": { "location": { "uri": "http://127.0.0.1:5000/DZ1601fuze.bam.bai" } }, "group": "group1" }, { "type": "BamAdapter", "name": "k2", "bamLocation": { "uri": "http://127.0.0.1:5000/DZ1601fuze/DZ1601fuzeChimeric.out.bam" }, "index": { "location": { "uri": "http://127.0.0.1:5000/DZ1601fuze/DZ1601fuzeChimeric.out.bam.bai" } }, "group": "group2" }, ] } } ] }