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.
- Reads VCF, performs a series of filters and converts to specific formats for posterior analysis (
dartR
) - Performs STRUCTURE bayesian clustering (
STRUCTURE
,Structure_threader
) - Runs ADMIXTURE (
ADMIXTURE
) - Optionally runs Treemix if metadata of population origin is provided (
Treemix
) - 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.
- 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.
- 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
)
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.
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.
lfreitasl/hybrider was originally written by Lucas de Freitas.
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.
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.