JustinChu / JupiterPlot

A Circos-based tool to visualize genome assembly consistency or synteny between assemblies.
GNU General Public License v3.0
68 stars 11 forks source link

Get chromosomal names/numbers on the "query", and alignment issue. #35

Closed siv-n closed 12 months ago

siv-n commented 3 years ago

Hi,

just tried this pipeline to see if I could visualize synteny between two chromosome level assemblies of quite closely related fish species. I was wondering about two things:

Is there a way to get the chromosome names on the plots for the "query" assembly, as well as the reference?

Additionally, I get this issue saying some of the chromosomes - as well as large chunks of others - dont have alignments, is there a threshold of some sort that might be heightened/lowered? Im pretty certain there should be matches for all the chromosomes of species A and B. here a snippet from the output:

Selecting 10 scaffolds to render Generating Links file chromosomes_order = scaf5,scaf1,scaf6,scaf9,scaf8,scaf7,scaf3,scaf4,scaf2,ref0,ref1,ref2,ref3,ref4,ref5,ref6,ref7,ref8,ref9,ref10,ref11,ref12,ref13,ref14,ref15,ref16,ref17,ref18,ref19,ref20,ref21,ref22,ref23,ref24 Chr4 has no alignments Chr7 has no alignments Chr8 has no alignments Chr10 has no alignments Chr12 has no alignments Chr14 has no alignments Chr15 has no alignments Chr16 has no alignments Chr17 has no alignments Chr18 has no alignments this missing alignment occurs when I just run default, as well as when I try to run with m=100000.

Thanks for this nice tool!

all the best S

JustinChu commented 3 years ago

Sorry for the late reply. Adding the query names is a common feature request so it might be time I try to add it in the next week or so. The only messy thing is last time I tried it some of the tools I used in circos had issues with special characters in the scaffold names for some reason.

With regards to alignments editing the alignment filtering in the jupiter makefile may help. https://github.com/JustinChu/JupiterPlot/blob/bbde9c65a51dc3d08a159dd35f4e1e412d525fca/jupiter#L80

Specifically when I filter on the mapping quality (set to 50). You could lower it and see what happens.

Also you can try to edit the alignment parameters in minimap2: https://github.com/JustinChu/JupiterPlot/blob/bbde9c65a51dc3d08a159dd35f4e1e412d525fca/jupiter#L76 The settings assume they are fairly close. Technically you can run the pipeline with your own alignments from a scaftigs file (need to run fatoagp.pl yourself) by specifying sam=

Alternatively, you can run jupiter with -n and see the command to run separately and edit the alignment command to be more permissive.

mpalmada commented 1 year ago

@JustinChu I also want to add the query names, and have seen in #38 that you can plot them, how should I do it to make them visible? Also, is there a way to choose which ref chromosomes you want to plot giving a list of chromosomes? Thanks a lot for your help :)!

JustinChu commented 1 year ago

@mpalmada including labels = both in the command should work. Choosing chromosomes might be a bit harder. They way I might do it remove the sequences from my set and rerun the pipeline.

mpalmada commented 1 year ago

@JustinChu Thank you so much, it worked!