Note
This repository is primarily for testing the latest Nextflow features and the workflow is relatively simple.
This is a Nextflow workflow for running fgsv on a BAM file to gather evidence for structural variation via breakpoint detection.
Visit us at Fulcrum Genomics to learn more about how we can power your Bioinformatics with nf-fgsv and beyond.
Make sure Pixi and Docker are installed.
The environment for this analysis is in pixi.toml and is named nf-fgsv.
To install:
pixi installTo save on typing, a pixi task is available which aliases nextflow run main.nf.
pixi run \
nf-workflow \
-profile "local,docker" \
--input tests/data/basic_input.tsvSeveral default profiles are available:
locallimits the resources used by the workflow to (hopefully) reasonable levelsdockerspecifies docker containers should be used for process executionlinuxadds--user rootto dockerrunOptions
A full description of input parameters is available using the workflow --help parameter, pixi run nf-workflow --help.
The required columns in the --input samplesheet are:
| Field | Type | Description |
|---|---|---|
sample |
String, no whitespace | Sample identifier |
bam |
Absolute path | Path to the BAM file for this sample (may be an AWS S3 path) |
If using more than a few parameters, consider saving them in a YAML format file (e.g. tests/integration/params.yml).
pixi run \
nf-workflow \
-profile "local,docker" \
-params-file my_params.ymlThe output directory can be specified using the -output-dir Nextflow parameter.
The default output directory is results/.
-output-dir cannot be specified in a params.yml file, because it is a Nextflow parameter rather than a workflow parameter.
It must be specified on the command line or in a nextflow.config file.
pixi run \
nf-workflow \
-profile "local,docker" \
--input tests/data/basic_input.tsv \
-output-dir resultsClick to toggle output directory structure
results
└── {sample_name}
├── {sample_name}_sorted.bam # Coordinate-sorted BAM file
├── {sample_name}_svpileup.txt # SvPileup breakpoint candidates
├── {sample_name}_svpileup.bam # BAM with SV tags from SvPileup
├── {sample_name}_svpileup.aggregate.txt # Aggregated/merged breakpoint pileups
└── {sample_name}_svpileup.aggregate.bedpe # Aggregated pileups in BEDPE format| File | Description |
|---|---|
*_sorted.bam |
Input BAM sorted by genomic coordinates using samtools sort |
*_svpileup.txt |
Candidate structural variant breakpoints identified by fgsv SvPileup |
*_svpileup.bam |
BAM file with SV-related tags added by SvPileup |
*_svpileup.aggregate.txt |
Merged breakpoint pileups from fgsv AggregateSvPileup |
*_svpileup.aggregate.bedpe |
Aggregated pileups converted to BEDPE format |
See our Contributing Guide for development and testing guidelines.