This pipeline performs reference-guided draft diploid genome assembly.
- Partition long reads into haplotypes with WhatsHap.
- Detect intervals with enough partitioned long-read coverage and extract their contained reads to perform assembly.
- Trim the subreads with MECAT2.
- Perform subinterval assembly with wtdbg2.
- Polish contigs using subreads with Racon and Arrow.
- Recalibrate the base quality of contigs and filter low-quality contigs.
- Perform interval assembly with phasebook.
- Detect structural errors in contigs with Sniffles2 and Jasmine.
- Polish contigs using short reads with Freebayes.
- Filter contig regions with switch errors by comparing assembly haplotype to SNV haplotype.
- Mask the adaptor sequences in contigs.
- BWA
- GATK
- minimap2
- WhatsHap
- Samtools
- Bcftools
- Seqkit
- MECAT2
- wtdbg2
- Racon
- Arrow
- cutadapt
- phasebook
- Sniffles2
- Jasmine
- Freebayes
- Bedtools
The configuration file should contain:
samples: Specify the path to a text file listing all samples.
The file must be space-delimited, with:
- Column 1: Sample name
- Column 2: Sample sex
sr_fastqs: Specify the paths to the paired-end short-read FASTQ files.
Use {sample} as a wildcard; it will be automatically replaced with sample names from the samples file.
lr_hifi_fastqs: Specify the path(s) to PacBio HiFi long-read FASTQ files.
Use {sample} as a wildcard.
lr_zmw_fastqs: Specify the path(s) to PacBio ZMW FASTQ files.
Use {sample} as a wildcard.
lr_subreads_bam: Specify the path(s) to PacBio subreads BAM files.
Use {sample} as a wildcard.
reference:
CHM13: Provide the path to the T2T CHM13 human reference genome (FASTA format, indexed bysamtools faidx).
par_region: Path to the pseudoautosomal region (PAR) BED file for CHM13.
This is used to correctly handle sex-chromosome reconstruction.
prefix: Prefix used for naming output files.
consensus_fasta (optional): Path to the sample-specific consensus FASTA file.
If omitted, the workflow will use the default:
c5_personal_ref/consensus_fasta/{sample}/{sample}.personal_ref.fasta
chain (optional): Path to the chain file describing coordinate mapping between CHM13 and the consensus assembly.
If omitted, the workflow will use the default:
c5_personal_ref/consensus_fasta/{sample}/{sample}.personal_ref.chain
sample_phased_vcf (optional): Path to the sample's phased VCF.
If omitted, the workflow will use the default:
c4_phase_snv/sample_vcf/{sample}/{sample}.shapeit.vcf.gz
snakemake -s Snakefile --cores 64 --jobs 64 --configfile config/draft_assembly.yaml --profile ./profile/config_local/The output file should contain:
c6_draft_assembly/sample_assembly/{sample}/assembly/{sample}.{hap1,hap2}.fasta: Draft diploid assembly of each sample
