A comprehensive computational pipeline for sequence-based chromatin activity modeling and regulatory impact prediction of genetic variants in farmed animals using deep learning.
DeepFARM is part of the manuscript: "Sequence-based chromatin activity modeling and regulatory impact prediction of genetic variants in farmed animals using deep learning". This pipeline leverages the power of Nextflow for scalable and reproducible workflows, enabling researchers to analyze chromatin accessibility patterns and predict the regulatory impact of genetic variants in livestock species.
- Multi-species support: Cattle, pig, chicken, and salmon
- Deep learning models: Built-in DanQ architecture for chromatin accessibility prediction
- Genomic variant analysis: Regulatory impact prediction for genetic variants
- Scalable workflow: Nextflow-based pipeline with Singularity containerization
GitHub: DeepFARM
- Dat T Nguyen
- Contact: ndat@utexas.edu
- Multiple learning rates and hyperparameter tuning support
- Built-in reproducibility and scalability via Nextflow and Singularity
- Pre-trained models for multiple livestock species
- Configurable genomic window sizes and chromosome selection
- Integrated validation and testing workflows
- High-performance computing (HPC) environment recommended
- Linux operating system
- Sufficient storage space for genomic data and intermediate files
- Nextflow (version 21.03 or later)
- Singularity (for containerization)
-
Load required modules (adjust for your HPC system):
module load Nextflow/21.03 module load singularity/rpm
-
Set environment variables:
NXF_SINGULARITY_CACHEDIR: Directory for Singularity image cacheTOWER_ACCESS_TOKEN: Token for Nextflow Tower integration (optional)
-
Clone the repository:
git clone https://github.com/datngu/DeepFARM.git cd DeepFARM -
Configure the pipeline:
- Review and customize
nextflow.configfor your HPC system - Adjust resource allocations, queue settings, and file paths
- Review and customize
Important: Customize the following example based on your HPC system configuration and data paths.
# Load required modules
module load Nextflow/21.03
module load singularity/rpm
# Set environment variables
export NXF_SINGULARITY_CACHEDIR=/path/to/your/singularity/cache
export TOWER_ACCESS_TOKEN=<your_access_token> # Optional
# Run the pipeline
nextflow run main.nf -resume -w work_dir \
--genome /path/to/your/genome.fa \
--chrom 29 \
--val_chrom 21 \
--test_chrom 25 \
--window 200 \
--peaks '/path/to/your/peaks/*.bed' \
-with-tower # Optionalnextflow run main.nf -resume -w work_dir \
--genome /mnt/users/ngda/genomes/cattle/Bos_taurus.ARS-UCD1.2.dna_sm.toplevel.fa \
--chrom 29 \
--val_chrom 21 \
--test_chrom 25 \
--window 200 \
--peaks '/mnt/SCRATCH/ngda/data/Cattle/*.bed' \
-with-tower| Parameter | Description | Default Value |
|---|---|---|
--genome |
Path to the reference genome FASTA file | $baseDir/data/ref/genome.fa |
--peaks |
Path to peak files (BED format) | $baseDir/data/peak/* |
--outdir |
Output directory for results | results |
--trace_dir |
Directory for trace and log files | trace_dir |
| Parameter | Description | Default Value |
|---|---|---|
--chrom |
Largest chromosome index for dataset building | 29 |
--val_chrom |
Chromosome used for validation | 21 |
--test_chrom |
Chromosome used for testing | 25 |
--window |
Genomic window size for analysis | 200 |
| Parameter | Description | Default Value |
|---|---|---|
--learning_rates |
Learning rates for hyperparameter tuning | [1e-3, 1e-4, 5e-4, 5e-5] |
Note: The --chrom parameter specifies the largest chromosome index. For example, setting --chrom 29 will use chromosomes 1, 2, 3, ..., 28, 29 for dataset building.
- Results will be saved in the specified
--outdir(default:results). - Trace files for debugging and performance monitoring will be stored in
params.trace_dir(default:trace_dir).
DeepFARM provides pre-trained DanQ model weights for multiple livestock species. These models have been trained on species-specific chromatin accessibility data and can be used for regulatory prediction tasks.
| Species | Model File | Download Link |
|---|---|---|
| Cattle | cattle_DanQ.h5 |
Download |
| Chicken | chicken_DanQ.h5 |
Download |
| Pig | pig_DanQ.h5 |
Download |
| Salmon | salmon_DanQ.h5 |
Download |
To use pre-trained models:
- Download the appropriate model file for your species of interest
- Place the model file in your working directory or specify the path in your pipeline configuration
- The models can be used for regulatory impact prediction without additional training
- Issue:
module: command not found - Solution: Ensure you're running on an HPC system with Environment Modules installed, or adapt the commands for your system
- Issue: Permission errors with Singularity cache directory
- Solution: Ensure
NXF_SINGULARITY_CACHEDIRpoints to a writable directory with sufficient space
- Issue: Pipeline fails due to insufficient resources
- Solution:
- Review and adjust resource allocations in
nextflow.config - Consider reducing the number of chromosomes or window size for initial testing
- Check available memory and CPU cores on your HPC system
- Review and adjust resource allocations in
- Issue: "No such file or directory" errors
- Solution:
- Verify all input file paths are correct and accessible
- Use absolute paths when possible
- Check file permissions
- Check the Nextflow documentation for workflow-related issues
- Review the
nextflow.configfile for system-specific configurations - Check pipeline logs in the
trace_dirdirectory for detailed error messages
Manuscript: "Sequence-based chromatin activity modeling and regulatory impact prediction of genetic variants in farmed animals using deep learning"
Citation details will be updated upon publication