jtlovell / GENESPACE

Other
180 stars 24 forks source link

Feature request: automatically minimize number of inversions plotted? #122

Closed taprs closed 7 months ago

taprs commented 1 year ago

Hi John,

Thanks for the wonderful tool! It is a true pleasure to use it.

I plot synteny between a few de novo assemblies which have random orientation of contigs. I would be happy to have an option to plot_riparian() that would invert the contigs in the non-reference assemblies to minimize the number of "inversions" in the plot. I guess all the required information is already being produced by the package; would it be possible to implement that?

Regardless of the answer, thank you! You have already done an amazing job. Best, Nikita

sashulkaSh commented 11 months ago

invertTheseChrs: data.table with two columns, genome and chr containing the lists of genomes and chromosomes that should be inverted in the plot. Not currently implemented.

taprs commented 11 months ago

Thanks for your input @sashulkaSh!

I think the new part in my request has to do with the word 'automatic'. Imagine aligning ten draft assemblies with 20 randomly directed chromosomes in each... I would be happy with an implementation through invertTheseChrs too if I was given a way to generate this data.table automatically.

So far I ended up inverting the chromosomes according to reference in each assembly before running GENESPACE. Also doable but less convenient.

sashulkaSh commented 11 months ago

@taprs I agree, it would be convenient

jtlovell commented 11 months ago

Sorry about the delayed response - so, an option to automatically use invertTheseChrs when >50% of the chromosome is inverted relative to the reference? not a bad idea.