marbl / merqury

k-mer based assembly evaluation
Other
272 stars 19 forks source link

Qustion about Spectra copy number analysis #125

Open Iven-gif opened 1 month ago

Iven-gif commented 1 month ago

Hello !

Thank you very much for your assistance and support.

I have a question regarding Spectra copy number analysis. Is this software only designed for diploid genomes? In the spectra-cn.hist file, k-mers are categorized into six classes (read-only, 1, 2, 3, 4, >4). I would like to know if it is possible to configure it for a higher value, such as 8, as I am working with an octoploid genome.

Thank you very much for your assistance and support.

Best regards, Iven

pickettbd commented 1 month ago

I've had to do this before, and I made two sets of changes to make it work.

First, I modified plot_spectra_cn.R to give it more colors. Imagine changing line 28 to this:

carnation_pink = "#FFA6C9"
silver = "#C2C1C2"
ochre = "#C17A00"
merqury_col = c(gray, red, blue, green, purple, orange, yellow, carnation_pink, silver, ochre)

Second, I modified spectra-cn.sh to add more counting steps with meryl. I changed lines 97-98 like this:

echo "# Copy 1 ~ 8"
for i in $(seq 1 8)

and then line 107:

echo "Copy >8 .."