NAME
NBI::Launcher::RemovePrimers
VERSION
version 0.19.1
SYNOPSIS
# Dry-run (default): print generated script
nbilaunch remove-primers \
--r1 sample_R1.fq.gz --r2 sample_R2.fq.gz \
--fwd-primer GTGYCAGCMGCCGCGGTAA \
--rev-primer GGACTACNVGGGTWTCTAAT \
--outdir results/trimmed
# Submit to Slurm
nbilaunch remove-primers ... --run
DESCRIPTION
Packaged demo launcher that trims primers from paired-end FASTQ files using cutadapt in linked-adapter mode (fwd...rev_rc on R1, rev...fwd_rc on R2). Reads without a detectable primer are discarded (--discard-untrimmed).
Primer reverse complements are computed in Perl at submission time - no seqfu or other runtime dependency needed. IUPAC degenerate bases are fully supported.
To customise this launcher for your project, copy the file to ./launchers/remove-primers.pm or ~/.nbi/launchers/remove-primers.pm and edit freely. The package declaration must remain NBI::Launcher::RemovePrimers regardless of the file's location.
NAME
NBI::Launcher::RemovePrimers - Primer removal from paired-end reads using cutadapt
METHODS
new()
Construct the RemovePrimers launcher spec. No arguments - all configuration is embedded in the constructor body (activation image, Slurm defaults, inputs, params, outputs). Returns a blessed NBI::Launcher::RemovePrimers object ready for build().
make_command(%args)
Returns the cutadapt shell invocation string for embedding in the job script. Reverse complements of both primers are computed here (IUPAC-aware) so that the exact command is visible in the saved script.
Key %args consumed here:
r1, r2 - absolute paths to input FASTQ files
fwd_primer, rev_primer - primer sequences (IUPAC bases supported)
threads - injected from
--cpusviaslurm_syncsample - derived sample name (used for output filenames)
Output files reference $SCRATCH (a shell variable set by the generated script) rather than an absolute path.
AUTHOR
Andrea Telatin <proch@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2023-2025 by Andrea Telatin.
This is free software, licensed under:
The MIT (X11) License