Skip to content

Tylannn/nf-core-consepopgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

nf-core/consepopgen

Run nf-test GitHub Actions Linting StatusAWS CICite with Zenodo nf-test

Nextflow nf-core template version run with conda run with docker run with singularity Launch on Seqera Platform

Get help on SlackFollow on BlueskyFollow on MastodonWatch on YouTube

Introduction

nf-core/consepopgen is a bioinformatics pipeline for conservation and population genetics analysis. The pipeline provides a standardized and reproducible workflow for analyzing genomic variation data from conservation studies. It accepts multi-sample VCF files (including invariant sites) with population assignments and calculates population genetic diversity and differentiation metrics.

The pipeline is specifically designed for:

  • Conservation genetics: Assessing genetic diversity in endangered or threatened species
  • Population genomics: Understanding population structure and differentiation
  • Wildlife management: Providing genetic data to inform conservation decisions

Current Features (v0.1.0-dev)

The pipeline currently implements the following analyses:

  1. Population VCF Splitting

    • Automatically splits VCF files by population for population-specific analyses
    • Uses bcftools view
  2. Population Genetic Statistics using PIXY:

    • π (Pi) - Nucleotide Diversity: Measures within-population genetic variation
    • FST - Population Differentiation: Quantifies genetic divergence between populations
    • Dxy - Absolute Divergence: Measures genetic distance between populations
    • Properly accounts for invariant sites for accurate estimates
  3. Individual Inbreeding Metrics using VCFtools:

    • Heterozygosity and Fis: Individual-level inbreeding coefficients
    • Calculated separately for each population
  4. Runs of Homozygosity (ROH) using BCFtools RoH:

    • ROH Detection: Identifies genomic regions with extended homozygosity
    • Uses a Hidden Markov Model (HMM) approach for accurate autozygosity detection
    • Calculated separately for each population
  5. Workflow Reporting: MultiQC report for pipeline execution summary and software versions

  6. Reproducibility: Containerized workflow with Docker/Singularity/Apptainer support

Planned Features

According to the project proposal, future releases will include:

  • Population structure: PCA and ADMIXTURE visualization
  • Additional diversity metrics: Tajima's D and other summary statistics

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 test before running the workflow on actual data.

First, prepare a samplesheet with your input data that looks as follows:

samplesheet.csv:

Individual,Population,VCF
Sample1_Ind1,PopulationA,/path/to/your/data.vcf.gz
Sample1_Ind2,PopulationA,/path/to/your/data.vcf.gz
Sample1_Ind3,PopulationB,/path/to/your/data.vcf.gz
Sample1_Ind4,PopulationB,/path/to/your/data.vcf.gz

Each row represents an individual sample with its population assignment:

  • Individual: Unique individual identifier (must match sample names in VCF)
  • Population: Population or group identifier for this individual
  • VCF: Path to the multi-sample VCF file (.vcf.gz format, index file .vcf.gz.tbi must exist in the same directory)

Important

The VCF file should be a multi-sample VCF containing genotype information for all individuals listed in the samplesheet. Multiple individuals from different populations can reference the same VCF file, and the pipeline will automatically group them accordingly.

Now, you can run the pipeline using:

nextflow run nf-core/consepopgen \
   -profile <docker/singularity/apptainer/.../institute> \
   --input samplesheet.csv \
   --outdir <OUTDIR>

Warning

Please provide pipeline parameters via the CLI or Nextflow -params-file option. Custom config files including those provided by the -c Nextflow option can be used to provide any configuration except for parameters; see docs.

Known Issues

  • PIXY timestamp bug: A workaround has been implemented for a known issue with PIXY when reading symlinked VCF files (see pixy#176). The pipeline automatically handles this by synchronizing file timestamps.

For more details and further functionality, please refer to the usage documentation and the parameter documentation.

Pipeline output

To see the results of an example test run with a full size dataset refer to the results tab on the nf-core website pipeline page. For more details about the output files and reports, please refer to the output documentation.

Credits

nf-core/consepopgen was originally written by Tylannn.

We thank the following people for their extensive assistance in the development of this pipeline:

Contributions and Support

If you would like to contribute to this pipeline, please see the contributing guidelines.

For further information or help, don't hesitate to get in touch on the Slack #consepopgen channel (you can join with this invite).

Citations

An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.

You can cite the nf-core publication as follows:

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.

About

No description or website provided.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published