Skip to content

Pipeline for population genetics analysis of putatively hybrid species: Genetic structure characterization and signal SNPs selection

License

Notifications You must be signed in to change notification settings

lfreitasl/hybrider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions CI Status GitHub Actions Linting Status

Nextflow run with docker run with singularity Launch on Nextflow Tower

lfreitasl/hybrider

Introduction

lfreitasl/hybrider is a bioinformatics pipeline for population genetics analysis. Using VCF from RADseq experiments and associated metadata as inputs, this pipeline performs a set of analysis typically used in conservation genetics studies that involves one or more species using softwares such as STRUCTURE, Admixture, Treemix and custom Python and R scripts to describe genetic structuration of species/populations, identify hybridization patterns across the dataset and find signal SNPs for species identification.

  1. Reads VCF, performs a series of filters and converts to specific formats for posterior analysis (dartR)
  2. Performs STRUCTURE bayesian clustering (STRUCTURE, Structure_threader)
  3. Runs ADMIXTURE (ADMIXTURE)
  4. Optionally runs Treemix if metadata of population origin is provided (Treemix)
  5. When running with two putatively hybridizing species, it compares results of STRUCTURE and ADMIXTURE to label samples as hybrids and non-hybrids based on user defined ancestry coefficient threshold.
  6. Runs supervised machine learning algorithms on labeled samples to identify signal SNPs that are highly associated with each species and hybrids, emiting various reports of models performance and information about important SNPs.
  7. Additionally, if a fasta genome file and a GFF/GTF file of the reference genome used to assemble the reads/VCF is provided it can annotate the important SNPs using VEP. (VEP)

Pipeline summary

lfreitasl/hybrider

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:

vcfs
path/to/my/file1.vcf
path/to/my/file2.vcf

Each row represents a vcf file with selected samples for the analysis, different VCF files can be used to test sensibility for different subsets of samples in the final results.

Also, you can add a csv formated file containing metadata for ALL individuals provided in the samplesheet.csv VCF files, this metadata file can have any number of columns since it has obligatory the samples column and optionally the POP column, it is very important that each row in the samples column have the exact same name in the VCF file:

metadata.csv:

samples,POP
IN1,river1
IN2,river1
IN3,river2
IN4,river2

Note

If the metadata file has more individuals than the ones present in each (or both) VCF files, it will retrieve only the information of the ones present in VCFs.

POP information will be used for plotting STRUCTURE and ADMIXTURE graphs.

If you choose to run Treemix, POP information will be used to set the input file of this tool.

Individuals with no population information (e.g. Captive animals) can be represented in the metadata under the same POP label for plotting purposes.

I do not recommend you to include unknown POP information samples in Treemix analysis.

Now, you can run the pipeline using:

nextflow run nf-core/hybrider \
   -profile <docker/singularity/.../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.

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. For more details about the output files and reports, please refer to the output documentation.

Credits

lfreitasl/hybrider was originally written by Lucas de Freitas.

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.

Citations

An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file. Please cite the tools used in your hybrider run.

This pipeline uses code and infrastructure developed and maintained by the nf-core initative, and 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.

About

Pipeline for population genetics analysis of putatively hybrid species: Genetic structure characterization and signal SNPs selection

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published