merqury icon indicating copy to clipboard operation
merqury copied to clipboard

Expanding X axis in spectra plots...

Open goeckeritz opened this issue 4 years ago • 5 comments

Hi there,

Very nice tool you have here!! I'm working with a polyploid (4X) and was wondering if there is an easy way to change the x axis in the produced spectra plots. The view cuts off at 45 multiplicity-ish and I really need to see probably up to 80 multiplicity.

I'm somewhat versed in R, but I thought that maybe instead of me accidentally messing something up, you might know the line(s) off the top of your head to change to see higher kmer multiplicity?

Thank you for any help you can provide!

Kindly, Charity

goeckeritz avatar Feb 16 '21 15:02 goeckeritz

Hi @goeckeritz ,

Specify both -m and -n. I guess you'd need -m 80 for the x axis. Your default run will leave a message what Y value was used. use that for your -n, or use something you'd like. Note that both -m and -n has to be provided. Rscript $MERQURY/plot/plot_spectra_cn.R --help will tell you more about available options.

Thanks, Arang

arangrhie avatar Feb 16 '21 16:02 arangrhie

Hi Arang,

Thanks for the quick response! For anyone else trying to do this --- don't forget to specify the spectra-cn.hist file with -f and the output prefix for your files with -o.

Thanks again, got just what I needed :)

Kindly, Charity

montA_corrected contigs V5 spectra-cn fl

goeckeritz avatar Feb 16 '21 17:02 goeckeritz

One last thing: add -z *.only.hist for the 0-count histogram (assembly only error kmers). There should be an associated *.only.hist to your spectra-cn.hist. This will make the complete spectra-cn plot.

For the spectra-asm plot, use the same command line with *.dist_only.hist and *.spectra-asm.hist instead, such as plot_spectra_cn.R -z dist_only.hist -f spectra-asm.hist.

PS. your spectra-cn plot looks nice :) Congrats!

arangrhie avatar Feb 16 '21 17:02 arangrhie

Ah, good catch! Thanks Arang!!!

goeckeritz avatar Feb 17 '21 20:02 goeckeritz

Reopening to remind myself to add documentation

arangrhie avatar May 01 '21 14:05 arangrhie