DSL2: Add option for polyG/X trimming with fastp
@ilight1542 is already working on this.
Since Jun 23, 2026.
- Dominant language
- Nextflow
- Stars
- 215
- Forks
- 91
- Avg merge
- 5m
- Merged PRs (30d)
- 1
Description
Is your feature request related to a problem? Please describe
I suspect this option might be available (polyG trimming with fastp), as it is referenced in --skip_preprocessing but it is not listed explicitly when I run nextflow run nf-core/eager -profile mjolnir_globe -r dev --help_full --show_hidden.
I thought maybe it is implemented by default for 2-colour chemistry, but it is not in the fastp command provided in the fastp log file:
fastp --in1 BuffaloCape_mt.damaged_BuffaloCape_mt.damaged_L2_1.fastq.gz --in2 BuffaloCape_mt.damaged_BuffaloCape_mt.damaged_L2_2.fastq.gz --out1 BuffaloCape_mt.damaged_BuffaloCape_mt.damaged_L2_1.fastp.fastq.gz --out2 BuffaloCape_mt.damaged_BuffaloCape_mt.damaged_L2_2.fastp.fastq.gz --json BuffaloCape_mt.damaged_BuffaloCape_mt.damaged_L2.fastp.json --html BuffaloCape_mt.damaged_BuffaloCape_mt.damaged_L2.fastp.html -m --merged_out BuffaloCape_mt.damaged_BuffaloCape_mt.damaged_L2.merged.fastq.gz --thread 4 --detect_adapter_for_pe --include_unmerged --length_required 25
Note that the data are simulated data with gargammel, so not 2-colour I guess. But an explicit option for polyG would be preferred, even if implemented automatically.
Describe the solution you'd like
Add boolean option --preprocessing_fastp_polyg or --preprocessing_fastp_polyx or both.
Describe alternatives you've considered
I was wondering whether polyG trimming is contained within the --preprocessing_fastp_complexityfilter parameter, but that wouldn't be ideal, as it would discard reads with polyG at the end, but that are complex enough within the read itself.
Additional context
My custom config:
profiles {
CAAMP_mapQ0 {
params {
// Profile description
config_profile_description = 'This is step 1 in the Circular Assembly of Ancient Mitogenomes Pipeline (CAAMP). Parameters for circular mapping of ancient DNA reads to a concatenated reference, including the reference mitogenome (competitive mapping), using bwa aln via CircularMapper. This uses a mapping quality of 0, which is required by the next program to be used, COMFRT, which recovers reads aligned to multiple scaffolds by bwa.'
config_profile_contact = 'Deon de Jager (dejager4@gmail.com)'
// Params to set on the command-line (specific to species): nextflow run nf-core/eager -c $EAGER_CONFIGS/CAAMP_profiles_v3.config -profile mjolnir_globe,CAAMP_mapQ0 -r dev --max_cpus $SLURM_CPUS_PER_TASK --input $WORKDIR/Syncerus_caffer_samplesheet.tsv --fasta_sheet $WORKDIR/Syncerus_caffer_refsheet.tsv --outdir $WORKDIR/Syncerus_caffer/step1_eager
// Reference genome options
fasta_largeref = true // Make csi index instead of bai for large references (like concatenated human+target nuclear+mito refs)
save_reference = true // Save any pipeline-generated reference genome indices in the results directory
// Preprocessing
//complexity_filter_poly_g = true // Not currently a listed option in v3
preprocessing_tool = 'fastp'
preprocessing_excludeunmerged = true
preprocessing_adapter1 = 'AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC' // Standard Illumina Truseq (default)
preprocessing_adapter2 = 'AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTA' // Standard Illumina Truseq (default)
preprocessing_minlength = 30
preprocessing_savepreprocessedreads = true
// clip_min_read_quality = 20 // Not currently a listed option in v3
// preserve5p = true // Only for AdapterRemoval. Disables quality based trimming of collapsed reads, since both ends of these are informative for PCR duplicate filtering
// Mapping
mapping_tool = 'circularmapper'
mapping_bwaaln_n = 0.01 // aDNA parameter (default)
mapping_bwaaln_l = 1024 // aDNA parameter (default)
mapping_bwaaln_o = 2 // aDNA parameter (default)
fasta_circularmapper_elongationfactor = 500
mapping_circularmapper_circularfilter = false // Retain reads that do not map to the circular target chromosome (and also retain non-circular chromosome headers). Required for COMFRT.
// BAM Filtering
run_bamfiltering = true // default
bamfiltering_mappingquality = 0 // Explicitly specify a mapping quality of 0.
bamfiltering_retainunmappedgenomicbam = true // Keep unmapped reads in bam file (I think maybe COMFRT uses them for stats).
// Deduplication
deduplication_tool = 'markduplicates'
deduplication_skipregionsplit = true // run deduplication without splitting bams by contig.
// Damage Manipulation
run_trim_bam = false // Explicitly switch off bam trimming (this is the default). (Will only run on non-UDG or half-UDG libraries.)
// (aDNA) Damage Analysis
damagecalculation_tool = 'mapdamage'
damagecalculation_mapdamage_downsample = 500000
// Feature Annotation Statistics
run_bedtools_coverage = true // BED file for mitogenome provided in refsheet.tsv under bedtools_feature_file field
}
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.