jtlovell / GENESPACE

Other
180 stars 24 forks source link

Difference between riparian plot plotted in the directory and on console #130

Closed johannesnicolaus closed 7 months ago

johannesnicolaus commented 9 months ago

Hi, thank you for the really nice tool! I'm having a problem where when I run genespace and when I try to plot using plot_riparian manually, the results are different. For example, on chromosome 1, the synteny on the left is not reflected with manual plotting.

Generated automatically from run_genespace: image

using plot_riparian without any arguments image

Is this a bug, or am I missing some of the parameters? How can I possibly recreate the plot in the work directory?

jtlovell commented 9 months ago

run_genespace does not use default riparian parameters ... it calls this for each genome. Whichever is your first genomeID will be used as i ... call it like this and it should produce the same result. If not, lmk.

rip <- plot_riparian(
          gsParam = gsParam, useRegions = TRUE, refGenome = i, pdfFile = plotf)
rip <- plot_riparian(
          gsParam = gsParam, useOrder = FALSE, useRegions = TRUE,
          refGenome = i, pdfFile = plotf)
johannesnicolaus commented 9 months ago

Hi, thanks for the reply!

I tried exactly the same codes as you wrote and I still got the same result as running plot_riparian without any arguments and is different from the one generated automatically by run_genespace

I also noticed that the scale bar is different between those 2 pictures. Could it have been that this is caused due to scaling issues?

jtlovell commented 9 months ago

Please post the code and resulting figures here ... I imagine you are using a different ref genome (see comment above)

johannesnicolaus commented 9 months ago

Hi, I changed the ref genome and it produces the same plot now. However, I would like to ask, why does changing ref genome does not display syntenic hits across non reference genomes? Is it that if there is no syntenic hits that corresponds to the genes in the reference, it is not shown?

In this case, is it possible to, for example show the synteny between oki and osa while having bar as reference? Or is this not possible?

jtlovell commented 9 months ago

I'm not sure I follow ... the ref genome is what is coloring the blocks. If genome A is the ref genome, and genome B and C have a syntenic block without any orthology to genome A, it will not be shown. Des this answer your question? You can see all block regardless of their reference genome coloring by setting palette to a single color.

johannesnicolaus commented 9 months ago

Thanks so much for the explanation! It answers my question. However, when I wanted to see all blocks and tried to change the palette to a single color, it seems that it is still reference genome-dependent. Am I missing another parameter?

Below is the command I ran

rip <- plot_riparian(
          gsParam = gsParam, palette = colorRampPalette("salmon"))
jtlovell commented 7 months ago

Hmm - i guess it's not respecting that single color vector. I'll address this in the next release