PARSEC
Variant calling and imputation from low coverage sequencing data
Install / Use
/learn @cguyomar/PARSECREADME
Introduction
PARSEC is a bioinformatics pipeline designed to genotype large populations using low coverage (typically <3X) sequencing data. Three imputation software are available as of today :
The pipeline is still in development, please reach out if you need help for running it or encounter bugs

- Index bams (
SAMtools) - Prepare fixed size genomic chunks (
bedtools) - Optionnal : call variants from sparse data
- Impute genotypes (
stitch - Index vcf (
Tabix) - Concatenate vcf files (
bcftools) - Sort vcf (
bcftools)
Usage
Inputs
Aligned reads
PARSEC takes bam files as input. It is advised to perform duplicated marking and eventually BQSR recalibration on the bam files.
Sarek can be used to automate read alignement (by not specifying any calling tool and eventually adding --skip_tools baserecalibrator)
Reference panel
Depending on the imputation method used, it may be necessary to supply a set of (preferentially phased) known variants (aka reference panel)
Glimpserequires a reference panel supplied with--ref_panelBeaglecan take a reference panel supplied with--ref_panelas a facultative inputStitchdoes not require a reference panel, but requires a set of SNP position, supplied as a vcf file (genotypes are not used). PARSEC can build it automatically using thecallingsubworkflow, but it is advised to validate it before running imputation. A good practice would be to run PARSEC a first time with--skip_imputation, hard filter the obtained variants, and run a second PARSEC run with--sparse_variantswith the output of the first run
| Tool | VCF Reference panel supplied with --ref_panel | VCF of SNPs supplied with --sparse_variants |
|-------------|-------------------------------------------------|----------------------------------------------------------------|
| Glimpse | ✅ Mandatory | ❌ Not applicable |
| Beagle | ⚠️ Facultative | ❌ Not applicable |
| Stitch | ❌ Not applicable | ✅ Recommended (hard-filtered output of a PARSEC calling run) |
PARSEC main parameters
default nextflow/nf-core parameters are omitted
Define where the pipeline should find input data and save output data.
| Parameter | Description | Type | Default | Required |
|-----------|-----------|-----------|-----------|-----------|
| bam | glob for input bams | string | | True |
| ref_panel | Reference panel VCF | string | | |
| sparse_variants | VCF of variable positions used in stitch | string | | |
| imputation_tool | Imputation tool (stitch, beagl4 or glimpse) | string | stitch | True |
| fasta | Path to FASTA genome file. <details><summary>Help</summary><small>This parameter is mandatory if --genome is not specified. If you don't have a BWA
index available this will be generated for you automatically. Combine with --save_reference to save BWA index for future runs.</small></details>| string | |
| genome_subset | bed file specifying a genomic region to analyze | string | | |
| window_size | Size of genomic windows used for parrallelization | integer | 1000000 | |
| buffer_size | Length of overlap between windows. A minimal overlap is required for good imputation | integer | 100000 | |
| ngen | Stitch parameter - number of iterations | integer | 1000 | |
| npop | Stitch parameter - number of haplotypes | integer | 10 | |
| skip_imputation | Stop after calling/genotyping | boolean | | | *
Example usage
Note If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. Make sure to test your setup with
-profile testbefore running the workflow on actual data. ( not yet available for PARSEC)
I have a reference panel
nextflow run cguyomar/PARSEC \
-profile <docker/singularity/.../institute> \
--bam "/path/to/data/*.bam" \
--fasta genome.fa \
--ref_panel my_panel.vcf.gz \
--imputation_tool glimpse \ # or beagle4
--outdir <OUTDIR>
I don't have a reference panel - Stitch
PARSEC will perform a rough SNP calling on your data (using bcftools mpileup) and then used the detected positions for stitch imputation
nextflow run cguyomar/PARSEC \
-profile <docker/singularity/.../institute> \
--bam "/path/to/data/*.bam" \
--fasta genome.fa \
--imputation_tool stitch \ # or beagle4
--outdir <OUTDIR>
A preferred approach is to do perform some user-defined hard filtering on the mpileup, first using option --skip_imputation, and then filtering the variant calling output (using for instance QUAL, or some external validation set).
An imputation PARSEC run can then be run using the filtered variants as a primer :
nextflow run cguyomar/PARSEC \
-profile <docker/singularity/.../institute> \
--bam "/path/to/data/*.bam" \
--sparse_variants /res/of/previous/run/filtered.vcf.gz \
--fasta genome.fa \
--imputation_tool stitch \
--outdir <OUTDIR>
I don't have a reference panel - Beagle
nextflow run cguyomar/PARSEC \
-profile <docker/singularity/.../institute> \
--bam "/path/to/data/*.bam" \
--fasta genome.fa \
--imputation_tool beagle4
--outdir <OUTDIR>
Warning: Please provide pipeline parameters via the CLI or Nextflow
-params-fileoption. Custom config files including those provided by the-cNextflow option can be used to provide any configuration except for parameters; see docs.
Credits
PARSEC was originally written in INRAE GenPhyse by Cervin Guyomar.
Contributions and Support
If you would like to contribute to this pipeline, please see the contributing guidelines.
Citations
<!-- TODO nf-core: Add citation for pipeline after first release. Uncomment lines below and update Zenodo doi and badge at the top of this file. --> <!-- If you use nf/sparse for your analysis, please cite it using the following doi: [10.5281/zenodo.XXXXXX](https://doi.org/10.5281/zenodo.XXXXXX) --> <!-- TODO nf-core: Add bibliography of tools and data used in your pipeline -->An extensive list of references fornf-core pipelines bump-version 0.1.0 the tools used by the pipeline can be found in the CITATIONS.md file.
This pipeline uses code and infrastructure developed and maintained by the nf-core community, reused here under the MIT license.
The nf-core framework for community-curated bioinformatics pipelines.
Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x. nf-core pipelines bump-version 0.1.0
Related Skills
node-connect
335.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
335.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.7kCommit, push, and open a PR
