⚠️ Work in Progress: This project is under active development. Features may change and improvements are ongoing. Feedback and contributions are welcome!
Command-line tools for running cohesive-ngsmanager pipelines without Jenkins.
- Linux (tested on AlmaLinux/RHEL)
- Docker installed and running
- Java 11+ (required by Nextflow)
- cohesive-ngsmanager repository cloned locally
git clone https://github.com/genpat-it/cohesive-ngsmanager-cli.git
cd cohesive-ngsmanager-cli
chmod +x ngsmanager_run.shgit clone https://github.com/genpat-it/cohesive-ngsmanager.gitcurl -s https://get.nextflow.io | bash
mv nextflow ~/.local/bin/
# Or: sudo mv nextflow /usr/local/bin/
# Verify
nextflow -version# Set the path to ngsmanager (if not in current directory)
export NGSMANAGER_DIR=/path/to/cohesive-ngsmanager
# Run fastp on paired-end files
./ngsmanager_run.sh step_1PP_trimming__fastp.nf reads_R1.fastq.gz reads_R2.fastq.gz
# Results will be in ./ngsmanager_workdir/results/./ngsmanager_run.sh <step.nf> <R1.fastq.gz> [R2.fastq.gz] [options...]| Option | Description | Default |
|---|---|---|
--seq_type TYPE |
Sequencing type: illumina_paired, ion, nanopore |
Auto-detect |
--genus_species SP |
Species (e.g.: Salmonella_enterica) |
- |
--cmp CODE |
Custom sample code | Auto-generated |
--resume |
Resume interrupted execution | - |
| Variable | Description | Default |
|---|---|---|
NGSMANAGER_DIR |
Path to cohesive-ngsmanager | ./cohesive-ngsmanager |
WORKDIR |
Working directory | ./ngsmanager_workdir |
NEXTFLOW |
Path to nextflow | Searches in PATH |
./ngsmanager_run.sh step_1PP_trimming__fastp.nf sample_R1.fastq.gz sample_R2.fastq.gz./ngsmanager_run.sh step_1PP_trimming__fastp.nf sample.fastq.gz --seq_type ion./ngsmanager_run.sh step_4AN_AMR__resfinder.nf R1.fq.gz R2.fq.gz \
--genus_species Salmonella_enterica./ngsmanager_run.sh step_1PP_trimming__fastp.nf R1.fq.gz R2.fq.gz --resumeWORKDIR=/data/analysis ./ngsmanager_run.sh step_1PP_trimming__fastp.nf R1.fq.gz R2.fq.gzRun ./ngsmanager_run.sh without arguments to see all available steps.
Common steps:
| Step | Description |
|---|---|
step_1PP_trimming__fastp.nf |
Quality trimming with fastp |
step_1PP_trimming__trimmomatic.nf |
Trimming with Trimmomatic |
step_2AS_denovo__spades.nf |
De novo assembly with SPAdes |
step_2AS_denovo__shovill.nf |
De novo assembly with Shovill |
step_3TX_class__kraken2.nf |
Taxonomic classification |
step_4AN_AMR__resfinder.nf |
AMR detection with ResFinder |
step_4AN_AMR__abricate.nf |
AMR detection with Abricate |
step_4TY_MLST__mlst.nf |
MLST typing |
test_steps/step_TEST_custom__kmer.nf
This is a test custom step example that demonstrates how to create custom Nextflow steps. It performs k-mer analysis (k=17) using the staphb/seqtk Docker container.
Important: This file is in test_steps/ directory. To use it, you must move it to cohesive-ngsmanager/steps/:
cp test_steps/step_TEST_custom__kmer.nf cohesive-ngsmanager/steps/Then run it with:
./ngsmanager_run.sh cohesive-ngsmanager/steps/step_TEST_custom__kmer.nf \
R1.fastq.gz R2.fastq.gz \
--no-timeout \
--outdir /mnt/data/resultsSee test_steps/README.md for more details.
ngsmanager_workdir/
└── results/
└── {YEAR}/
└── {CMP}/
└── {STEP}/
└── {DS}-{DT}_{METHOD}/
├── result/ # Main outputs (FASTQ, FASTA, etc.)
├── meta/ # Metadata (JSON, log, config)
└── qc/ # Quality reports
The script automatically uses a local .tmp directory (inside WORKDIR) to avoid issues with a full /tmp or root filesystem. It sets:
NXF_TEMPandTMPDIRto./ngsmanager_workdir/.tmpNXF_HOMEto./ngsmanager_workdir/.nextflow
If you still encounter disk space issues:
-
Use a custom working directory on a partition with more space:
WORKDIR=/data/myanalysis ./ngsmanager_run.sh step_1PP_trimming__fastp.nf R1.fq.gz R2.fq.gz
-
Clean up previous runs:
rm -rf ./ngsmanager_workdir/work ./ngsmanager_workdir/.tmp ./ngsmanager_workdir/.nextflow
-
Clean Docker to free up space:
docker system prune -af
The script handles naming conventions automatically. If you see this error, ensure you're using the latest version of the script.
Resume with --resume:
./ngsmanager_run.sh step_1PP_trimming__fastp.nf R1.fq.gz R2.fq.gz --resumeSee cohesive-ngsmanager for license information.