schneebergerlab / plotsr

Tool to plot synteny and structural rearrangements between genomes
MIT License
288 stars 28 forks source link

Can we plot two annotation tracks? #21

Closed minalj365 closed 2 years ago

minalj365 commented 2 years ago

Hi Manish!

This is an excellent tool! Thank you for creating it! Is there a way to show two annotation tracks?

I would like to have an annotation for F3.hap2 in the figure below.

image

Right now, it's working with CS10.hap1 annotation. but if I make a tracks.txt as below:

CS10.gff3_polished Genes ft:gff BS3.gff3_polished Genes ft:gff

I get the following error:

ValueError: Incomplete line in track file. BS3.gff3_polished Genes ft:gff File path and name are necessary columns, tags is optional column

Is there any solution?

Thanks, Minal

mnshgl0110 commented 2 years ago

Hi Minal,

It is possible to have multiple annotation tracks: image

Please ensure that the columns of tracks.txt are separated by tabs (and not spaces). That should resolve this issue.

Best Manish

minalj365 commented 2 years ago

Ahh! I thought it was tab-delimited but it wasn't! I have this figure now (below). Have other questions - 1. Is it possible to shift the label "Genes" towards more right side? and 2. Is it possible to have one annotation at the top and another at the bottom? In this case, I would like to have an annotation of F3.hap2 below F3.hap2 (orange line).

image

Thank you, Minal

mnshgl0110 commented 2 years ago

Hi Minal,

  1. Is it possible to shift the label "Genes" towards more right side?

I have added 'nm' tag for the tracks.txt which should allow manually adjustment to the track name like below (check here) image

You can give this a try and hopefully it would run without bugs.

  1. Is it possible to have one annotation at the top and another at the bottom?

No that is not possible. This feature would be unusable when more than 2 genomes are being compared and would require quite a lot of work to add, so I do not think this will be added.

Best Manish

minalj365 commented 2 years ago

Hi Manish!

Thanks for your response! nm is throwing an error (ValueError: nm is not a valid tag). The complete log and track files are attached.

log.txt tracks.txt

mnshgl0110 commented 2 years ago

Have you updated plotsr?

minalj365 commented 2 years ago

Ahh! I did not! Now it works after update. Thanks much!