smudgeplot icon indicating copy to clipboard operation
smudgeplot copied to clipboard

make complete examples

Open KamilSJaron opened this issue 7 years ago • 8 comments

We need some pilot examples that will go from raw reads to smudgeplot. We should do both those that are big and complicated as well as those that are small and simple, I htink three examples will be perfect.

Good candidates for demonstration of power:

KamilSJaron avatar Sep 27 '18 14:09 KamilSJaron

  • octaploid strawberry: there two sequencing projects, one has it's own nice webpage, publication and reads. The second one has bit more difficult data, since the coverage is not so high, 2–7× per octoploid chromosome, but maybe thanks to octoploidy one will be still able to see something (like AAAABBBB cluster): pub

KamilSJaron avatar Oct 01 '18 07:10 KamilSJaron

I was advised to run it on more classical species:

  • classical diploid models (Arabidopsis, fly etc)
  • tetraploid Xenopus laevis (SAMN04518361) and diploid Xenopus tropicalis or maybe Xenopus borealis (SAMN04518076) (paper)

KamilSJaron avatar Oct 03 '18 10:10 KamilSJaron

Strawberry tutorial is done here: https://github.com/tbenavi1/smudgeplot/wiki/strawberry-tutorial

Genomescope for determination of L and U:

plot log

plot

plot

These are strawberry smudges:

f_iinumae_smudgeplot_log10

f_ananassa_smudgeplot

KamilSJaron avatar Oct 04 '18 15:10 KamilSJaron

Hi Kamil,

I just wanted to check something with my data, so I re-ran the strawberry example using jellyfish (no problems, nearly identical output), and then I downsampled the Fragaria iinumae reads (I took a random 10% of the paired reads, using seqtk). Then I reran the jellyfish and smudgeplot pipeline, and the results certainly reflect what I have seen with my data now too.

It seems to me that a lower coverage results in:

  1. slightly worse resolution of smudges (I got the warning "detecting two smudges at the same positions, not enough data for this number of bins lowering number of bins to 35" with the downsampled reads, but not with the full read library)

  2. loss of some smudges, see attached image

frag50x_genome_smudgeplot_log10

Obviously this is not a fault of the program, but users should be aware of coverage based limitations for this program.

For my data, my 1n estimates range from 17 to 27.

rotifergirl avatar Jan 08 '19 16:01 rotifergirl

Hey Julie, the need for coverage is a good point. Thanks for the feedback!!!

I had troubles to phrase it nicely because it's not that simple. The coverage needed for a nice smudgeplot is dependent on the quality of sequencing (i.e. coverage variance). Smaller variance less coverage is needed to make nice smudges.

I just returned from PopGroup and people are super interested in smudgeplots. I really need to work out better documentation in general. Any input is welcome.

KamilSJaron avatar Jan 08 '19 17:01 KamilSJaron

The labeling of octoploid straberry is corrected in 01ddc2e83f9bf3048715b2cea5bad609ac85026b:

straw_Rver_1 4_smudgeplot

KamilSJaron avatar Apr 30 '19 15:04 KamilSJaron

Mountain peanut is a quite nice real-life example of a species that was thought to be hexaploid, but has a kmer data supporting more tetraploidy, discussed in #36

KamilSJaron avatar May 18 '19 13:05 KamilSJaron

Rainbow trout analyses now available #88

KamilSJaron avatar Jun 01 '21 10:06 KamilSJaron

Hi, I see that the issue is closed long before. But i need some recommendations regarding my Smudgeplots. Because they are not making sense and I am lost at the moment. So i though it might be helpful to write you all. Please help me!

I have a 120bp single-end RadSeq data (>30x coverage) for a number of Salix species, which I want to determine the ploidy level using the Smudgeplot. I run following commands:

kmc -k21 -t16 -m64 -ci1 -cs10000 "${file}.fastq" "${file}_kmcdb" tmp kmc_tools transform "${file}_kmcdb" histogram "${file}_kmcdb_k21.hist" -cx10000 L=$(smudgeplot.py cutoff "${file}_kmcdb_k21.hist" L) # Determines automatically; L should be like 20 - 200 U=$(smudgeplot.py cutoff "${file}_kmcdb_k21.hist" U) # U should be like 500 - 3000
kmc_tools transform "${file}_kmcdb" -ci"$L" -cx"$U" reduce "${file}_kmcdb_L${L}_U${U}" kmc_dump "${file}_kmcdb_L${L}_U${U}" "${file}_kmcdb_L${L}_U${U}_coverages.tsv" "${file}_kmcdb_L${L}_U${U}_pairs.tsv" > "${file}_kmcdb_L${L}_U${U}_familysizes.tsv" kmc_tools transform "${file}_kmcdb" -ci"$L" -cx"$U" dump -s "${file}_kmcdb_L${L}_U${U}.dump" smudgeplot.py hetkmers -o "${file}_kmcdb_L${L}_U${U}" < "${file}_kmcdb_L${L}_U${U}.dump" smudgeplot.py plot "${file}_kmcdb_L${L}_U${U}_coverages.tsv" -o "${file}_kmcdb_L${L}_U${U}_smudgeplot" -t "${file}" -q 0.99

and then got this result for Salix retusa (NW17_076_L10_U520 (x41 coverage) and T2221 (x46) : S_retusa_NW17_076_kmcdb_L10_U520_smudgeplot_smudgeplot_log10 S_retusa_NW17_076_kmcdb_L10_U520_smudgeplot_smudgeplot

This species/individuals should be an octoploid according to our flow cytometry, but the Smudgeplot suggests triploid or diploid.

I did not give a constant number for L and U, because it showed me an error: "detecting two smudges at the same positions, not enough data for this number of bins lowering number of bins to 35 detecting two smudges at the same positions, not enough data for this number of bins lowering number of bins to 30 ...".

When I checked GenomeScope, for both individuals, it failed to converge: Screen Shot 2023-08-07 at 10 54 51 AM Screen Shot 2023-08-07 at 10 56 05 AM

I have more than 100 individuals that are not fitting to my expectation of ploidy level. So my question is, what am I possibly doing wrong? What could be adjusted to get more precise estimation?

OyukaKh avatar Aug 07 '23 09:08 OyukaKh

Here are the Smudgeplots for S_retusa_T2221 (second example):

S_retusa_T2221_kmcdb_L54_U400_smudgeplot_smudgeplot_log10 S_retusa_T2221_kmcdb_L54_U400_smudgeplot_smudgeplot

OyukaKh avatar Aug 07 '23 09:08 OyukaKh