elsiklab / gccontent

A JBrowse plugin for plotting GC content and GC skew
5 stars 2 forks source link

Command line for prepare-refseq.pl #10

Open sanyalab opened 3 years ago

sanyalab commented 3 years ago

Hi Colin,

This is not an issue but a request to update the README with some more examples. For example I would like to see the GC_ContentXY, GC_Content, and a GC_Skew for my genomes. I load the genomes using prepare-refseqs.pl like this

prepare-refseqs.pl --fasta genome.fa --out /genome/data/

How does the above command get modified if I want to see the GCContent, GCContentXY and GCSkew tracks. Do I provide the GCContent json using "--trackConfig"?

Thanks Abhijit

cmdcolin commented 3 years ago

If you have already first loaded your genome in with prepare-refseqs.pl like normal, then you can create a file myfile.json


{
  "storeClass" : "JBrowse/Store/SeqFeature/SequenceChunks",
  "type": "GCContent/View/Track/GCContentXY",
  "label" : "GCContentXY",
  "urlTemplate" : "seq/{refseq_dirpath}/{refseq}-",
  "bicolor_pivot": 0.5
}

Then run

cat myfile.json|bin/add-track-json.pl data/trackList.json

That will use the data that the prepare-refseqs.pl loaded, but add an extra track entry for the GCContent

For skew use this file and then same command as above

{
    "storeClass": "JBrowse/Store/SeqFeature/SequenceChunks",
    "type": "GCContent/View/Track/GCContentXY",
    "label": "GCContentSkew",
    "gcMode": "skew",
    "urlTemplate": "seq/{refseq_dirpath}/{refseq}-",
    "bicolor_pivot": 0.5
}
sanyalab commented 3 years ago

Hi Colin,

The initial part of the trackList.json file looks like below

{ "formatVersion" : 1, "names" : { "type" : "Hash", "url" : "names/" }, "tracks" : [ { "category" : "Reference sequence", "chunkSize" : 20000, "key" : "Reference sequence", "label" : "DNA", "seqType" : "dna", "storeClass" : "JBrowse/Store/Sequence/StaticChunked", "type" : "SequenceTrack", "urlTemplate" : "seq/{refseq_dirpath}/{refseq}-" },

If I create myfile.json as you described I get the familiar "Failed to Load GCContent/View/Track/GCContentXY" error.

The GCContent plugin is loaded as far as I can tell, because jbrowse.conf file has the following uncommented

[ plugins.GCContent ] location = ../plugin/GCContent/

Do i need to change the storeclass to Staticchunked? Secondly how to do this in one commend using prepare-refseqs.pl. I have a fasta file. Do I convert to twobit and then try?

Thanks Abhijit

cmdcolin commented 3 years ago

You may have to follow apollo specific instructions for installing the plugin

And then I mentioned above that you do not add the GC content via "one command using prepare-refseqs.pl", it is a multistep process that I describe in my previous post

cmdcolin commented 3 years ago

In case it helps, the philosophy is that the "GCContent" track re-uses the "storeClass" and "urlTemplate" that was loaded via prepare-refseqs.pl. I believe the process for prepare-refseqs.pl is the same on apollo, like

prepare-refseqs.pl --fasta yourfile.fa 

Or similar to that, and then you can use the add-track-json commands in my previous post, or hand edit those into the config

I suggest also becoming familiar with hand-editing the config, I think it is beneficial to become familiar with the config system even though it has a bit of a learning curbe

sanyalab commented 3 years ago

Hi Colin,

Thank you for the help in getting the gccontent tracks. It shows up beautifully. You can close this issue.

Btw I wanted to ask if we can visualize multiple closely related genomes with all their individual annotations at the same time in JBrowse. I am not really looking for a synteny viewer although there will be synteny calculations involved. If you have seen the Artemis Comparison Tool from Sanger, it has the ability to load multiple genomes with their annotations into separate tracks. It also needs a relationships file (blast -m8) to be loaded, in order to draw the genome wide relations. The good part is that one can select which genome to lock, making that a reference, and then all the other tracks would move w.r.t. the locked track. Drawback is that the Artemis viewer is restrictive and lacks a lot of details which JBrowse renders amazingly well. That's why I do not like to use the same.

Is there a JBrowse plugin that achieves this functionality? Or can JBrowse2 achieve this. It was not clear from the screenshots

Thanks Abhijit

On Wed, Mar 3, 2021 at 2:05 AM Colin Diesh @.***> wrote:

In case it helps, the philosophy is that the "GCContent" track re-uses the "storeClass" and "urlTemplate" that was loaded via prepare-refseqs.pl. I believe the process for prepare-refseqs.pl is the same on apollo, like

prepare-refseqs.pl --fasta yourfile.fa

Or similar to that, and then the add-track-json commands, or hand editing that into the config

I suggest also becoming familiar with hand-editing the config, I think it is beneficial to become familiar with the config system even though it has a bit of a learning curbe

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/elsiklab/gccontent/issues/10#issuecomment-789197700, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE545CKSXXK242BMZIPBJ5DTBVDZDANCNFSM4X6XWVQA .

cmdcolin commented 3 years ago

We are actually collaborating with the artemis team to try to help with annotation and synteny on jbrowse 2

For jbrowse 1, the best options are probably to load your synteny files e.g. chain files as a track, and you can create links in the feature details for the chain features

There are also some advanced synteny plugins for jbrowse 1 made by the veupathdb people, see https://static-content.veupathdb.org/assets/images/resources_tools/jbrowse_view1.png

I am not sure what pipeline they use to make that work, I think it uses a REST API, so it might be somewhat custom to their websiute, but it is a cool demo

If you want any assistance with jbrowse 2 let me know

sanyalab commented 3 years ago

Hi Colin,

Great to hear about the collaboration with the Artemis team. That will be an important contribution towards visualizing pangenomes. Any idea when this feature will be out?

I tried using some synteny viewers, that use the MCScanX output. But these are great visualizers (AccuSyn, Synvisio,) but cannot export the syntelogs, So I wanted to know if JBrowse2 has a better export feature and also if I can load, visualize and export pangenome relationships.

Best Regards Abhijit

On Fri, Mar 12, 2021 at 10:33 PM Colin Diesh @.***> wrote:

We are actually collaborating with the artemis team to try to help with annotation and synteny on jbrowse 2

For jbrowse 1, the best options are probably to load your synteny files e.g. chain files as a track, and you can create links in the feature details for the chain features

There are also some advanced synteny plugins for jbrowse 1 made by the veupathdb people, see https://static-content.veupathdb.org/assets/images/resources_tools/jbrowse_view1.png

I am not sure what pipeline they use to make that work, I think it uses a REST API, so it might be somewhat custom to their websiute, but it is a cool demo

If you want any assistance with jbrowse 2 let me know

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/elsiklab/gccontent/issues/10#issuecomment-797624876, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE545CK5H2WWVBR2IWAJVP3TDI3MPANCNFSM4X6XWVQA .

cmdcolin commented 3 years ago

We already have jbrowse 2 synteny features available, and can visualize pairwise synteny and dotplots (https://jbrowse.org/jb2/gallery). We do pairwise comparisons only right now but we should be able to generalize to more.

I have tested mostly using minimap2 whole-genome alignments and MCScan (python version) from tanghaibo, not mcscanx yet.

We do not have too many users of our synteny features yet but would be really excited to have more

I will be honest, my brain often does not think in terms of pangenome and synteny as much as a real biologist (I am computer scientist by training) but we would be really happy to collaborate with a team like yours that knows what features they want