GMOD / jbrowse

JBrowse 1, a full-featured genome browser built with JavaScript and HTML5. For JBrowse 2, see https://github.com/GMOD/jbrowse-components.
http://jbrowse.org
Other
464 stars 199 forks source link

Hello, I am testing to replace jbrowse with mouse data, but the tbi of the mouse gff3 file is always wrong here. I don't know what is wrong. I would like to ask you about the index. Do you have any mouse data to provide? ? thanks #1630

Open ouyang-lang opened 2 years ago

ouyang-lang commented 2 years ago

Hello, I am testing to replace jbrowse with mouse data, but the tbi of the mouse gff3 file is always wrong here. I don't know what is wrong. I would like to ask you about the index. Do you have any mouse data to provide? ? thanks

The data I use is the ensemble version, and my error is: Error: problem decompressing block: incorrect gzip header check Is my decompression method wrong?

cmdcolin commented 2 years ago

Generally to prepare a GFF3 tabix file you can use

gt gff3 -sortlines -tidy -retainids file.gff > file.sort.gff
bgzip file.sort.gff
tabix file.sort.gff.gz

then put both file.sort.gff.gz and file.sort.gff.gz.tbi in your data directory

Then make in your config file

{
"type":"CanvasFeatures",
"urlTemplate":"file.sort.gff.gz",
"label":"mytrack",
"storeClass":"JBrowse/Store/SeqFeature/GFF3Tabix"
}

If it continues to have issues, you might have issues with your server. JBrowse does NOT like the server to return the HTTP header "Content-Encoding: gzip" for tabix files.

Xref similar thread and FAQ https://github.com/GMOD/jbrowse/issues/1512

https://jbrowse.org/docs/faq_troubleshooting.html#what-is-the-error-invalid-bgzf-header-on-my-vcf-files

One possible way to fix could be to give your files a random extension if your server is doing this based on file extension e.g.

mv file.sort.gff.gz file.sort.gff.blah
mv file.sort.gff.gz.tbi file.sort.gff.blah.tbi
{
"type":"CanvasFeatures",
"urlTemplate":"file.sort.gff.blah",
"label":"mytrack",
"storeClass":"JBrowse/Store/SeqFeature/GFF3Tabix"
}
ouyang-lang commented 2 years ago

Thanks, I have solved the problem, thanks a lot

cmdcolin commented 2 years ago

Great :) if you did anything different to solve feel free to post how, definitely this is an issue that comes up fairly frequently

ouyang-lang commented 2 years ago

Hello, it is solved by the method you said, but I use GUN for sorting (grep ^"#" data/volvox.gff3; grep -v ^"#" data/volvox.gff3 | grep -v "^$" | grep "\t" | sort -k1,1 -k4,4n) > data/volvox.sorted.gff3

cmdcolin commented 2 years ago

excellent, good to know!

ouyang-lang commented 2 years ago

Is jbrowse incompatible with vue, why can't my project start when I put it in vue?

cmdcolin commented 2 years ago

jbrowse 1 can be a little awkward to put into a react/vue app. I demonstrated using jbrowse 1 here in a react app which might be somewhat similar to vue https://github.com/cmdcolin/jbrowse_in_react_app

also, you can consider jbrowse 2. a user demonstrated how to use it in a vue app here https://github.com/GMOD/jbrowse-components/discussions/2930

ouyang-lang commented 2 years ago

ok, i'll try, i'm a newbie and i'm using JBROWSE2 too

ouyang-lang commented 2 years ago

thanks very much

ouyang-lang commented 2 years ago

hello,I used the code of this vue, but he kept reporting such an error. I tried many solutions, but I couldn't solve it. I would like to know how the people who used it successfully in vue at that time solved this problem?

my error: Module parse failed: Unexpected token (131:21) You may need an appropriate loader to handle this file type. | } | return depths.map(d => { | return { ...d, score: (d.score * stats.lineCount) / totalSize }; | }); | }

ouyang-lang commented 2 years ago

image