Smudgeplot¶
Smudgeplot infers the ploidy and heterozygosity structure of a genome from the k-mers of unassembled whole genome sequencing reads. It finds pairs of k-mers that differ by one base (heterozygous k-mer pairs) and compares the sum of their coverages to their relative coverage. Each haplotype structure forms its own "smudge" in the resulting plot. Smudgeplot is meant to be used together with GenomeScope 2.0.
License¶
Free to use and open source under the Apache 2.0 license.
Available¶
- Roihu-CPU: 0.5.4, via the
bio-appsmodule.
Usage¶
Smudgeplot is part of the bio-apps collection on Roihu. Load the bio-apps module tree and then the Smudgeplot module:
The module also loads FastK, which builds the k-mer database that Smudgeplot reads. First count the k-mers of the reads with FastK:
Here -k is the k-mer length, -t4 keeps the k-mers that occur at least 4 times,
-M is the memory to use in gigabytes, -T the number of threads and -N the name
of the database.
The smudgeplot hetmers command needs a coverage threshold -L, below which k-mers
are considered errors. The smudgeplot cutoff command suggests one from the k-mer
histogram:
Then find the k-mer pairs and make the smudgeplot:
The smudgeplot all command infers the ploidy and writes the smudgeplots (PDF) and a summary
report, with names starting with smudge. The same histogram can be given to
GenomeScope 2.0 to estimate the genome size and heterozygosity.
Example batch script¶
#!/bin/bash
#SBATCH --job-name=smudgeplot
#SBATCH --account=<project>
#SBATCH --output=output_%j.txt
#SBATCH --error=errors_%j.txt
#SBATCH --partition=small
#SBATCH --time=04:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
#SBATCH --mem=32G
module load bio-apps/v202603
module load smudgeplot/0.5.4
FastK -v -t4 -k31 -M16 -T$SLURM_CPUS_PER_TASK reads_1.fastq.gz reads_2.fastq.gz -NFastK_Table
Histex -G FastK_Table > FastK_Table.histo
L=$(smudgeplot cutoff FastK_Table.histo L)
smudgeplot hetmers -L $L -t $SLURM_CPUS_PER_TASK -o kmerpairs FastK_Table
smudgeplot all -o smudge kmerpairs.smu
Replace <project> with your CSC project (for example project_2001234).
See creating a batch job script for Roihu for more information about running batch jobs.
Support¶
More information¶
- Smudgeplot GitHub repository
- FastK GitHub repository
- Ranallo-Benavidez, T.R., Jaron, K.S. & Schatz, M.C. (2020). GenomeScope 2.0 and Smudgeplot for reference-free profiling of polyploid genomes. Nature Communications 11, 1432