Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ This file contains all notable changes to Bambu-Pipe.

---

## [v0.10.3] - 2026-10-01

### Changed
- Increased the minimum adapter overlap in the `PREPROCESS_FASTQ` adapter re-search from the cutadapt default (3 bp) to 10 bp, reducing the number of valid reads discarded due to short chance matches at read ends

### Fixed
- Corrected the 10x3v3 and 10x3v4 end adapter (`rev_primer_f`/`rev_primer_r` in `adapter_seq_config.csv`) to `CCCATGTACTCTGCGTTGATACCACTGCTT`, matching 10x3v2 and Visium; the previous sequence does not occur in these reads, so the adapter was rarely trimmed
- Resolved an edge case where `PREPROCESS_FASTQ` failed if the input FASTQ filename had the same length as the barcode (16) or UMI (10/12) pattern; the unquoted `?` wildcards in the flexiplex pattern were expanded by the shell to match the filename, which was not intended

## [v0.10.2] - 2026-09-23

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions assets/10x_config/adapter_seq_config.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
technology,fwd_primer_f,fwd_primer_r,rev_primer_f,rev_primer_r,TSO_f,TSO_r
10x3v2,CTACACGACGCTCTTCCGATCT,AGATCGGAAGAGCGTCGTGTAG,CCCATGTACTCTGCGTTGATACCACTGCTT,AAGCAGTGGTATCAACGCAGAGTACATGGG,,
10x3v3,CTACACGACGCTCTTCCGATCT,AGATCGGAAGAGCGTCGTGTAG,CCCCTCTGCGTTGATACCACTGCTT,AAGCAGTGGTATCAACGCAGAGGGG,,
10x3v4,CTACACGACGCTCTTCCGATCT,AGATCGGAAGAGCGTCGTGTAG,CCCCTCTGCGTTGATACCACTGCTT,AAGCAGTGGTATCAACGCAGAGGGG,,
10x3v3,CTACACGACGCTCTTCCGATCT,AGATCGGAAGAGCGTCGTGTAG,CCCATGTACTCTGCGTTGATACCACTGCTT,AAGCAGTGGTATCAACGCAGAGTACATGGG,,
10x3v4,CTACACGACGCTCTTCCGATCT,AGATCGGAAGAGCGTCGTGTAG,CCCATGTACTCTGCGTTGATACCACTGCTT,AAGCAGTGGTATCAACGCAGAGTACATGGG,,
10x5v2,CTACACGACGCTCTTCCGATCT,AGATCGGAAGAGCGTCGTGTAG,GTACTCTGCGTTGATACCACTGCTT,AAGCAGTGGTATCAACGCAGAGTAC,TTTCTTATATGGG,CCCATATAAGAAA
10x5v3,CTACACGACGCTCTTCCGATCT,AGATCGGAAGAGCGTCGTGTAG,GTACTCTGCGTTGATACCACTGCTT,AAGCAGTGGTATCAACGCAGAGTAC,TTTCTTATATGGG,CCCATATAAGAAA
visium-v1,CTACACGACGCTCTTCCGATCT,AGATCGGAAGAGCGTCGTGTAG,CCCATGTACTCTGCGTTGATACCACTGCTT,AAGCAGTGGTATCAACGCAGAGTACATGGG,,
Expand Down
12 changes: 7 additions & 5 deletions modules/preprocess_fastq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,24 @@ process PREPROCESS_FASTQ {
flexiplex_f=$params.flexiplex_f_3prime
fi

flexiplex -p $task.cpus -k \$barcode_list \$flank_seq -f \$flexiplex_f -e $params.flexiplex_e
flexiplex -p $task.cpus -k \$barcode_list "\${flank_seq[@]}" -f \$flexiplex_f -e $params.flexiplex_e
}

# Trims reverse primer with cutadapt
cutadapt_trim() {
cutadapt -a \$rev_primer_f --cores $task.cpus -
}

# Re-searches all primer and TSO sequences to remove non-standard reads
# Re-searches all primer and TSO sequences to remove non-standard reads
# (--overlap 10: require >=10 bp of adapter overlap so we do not discard too many reads)
cutadapt_re_search() {
if [[ $meta.chemistry == 10x5* ]]; then
args="-b \$fwd_primer_f -b \$fwd_primer_r -b \$TSO_f -b \$TSO_r -b \$rev_primer_f -b \$rev_primer_r"
else
args="-b \$fwd_primer_f -b \$fwd_primer_r -b \$rev_primer_f -b \$rev_primer_r"
fi

cutadapt \$args --action none --discard --cores $task.cpus -
cutadapt \$args --overlap 10 --action none --discard --cores $task.cpus -
}

# Reverse complements FASTQ reads to orient them in the transcript direction (for 3' and visium chemistries only)
Expand All @@ -102,7 +103,8 @@ process PREPROCESS_FASTQ {
# Extract chemistry specfic parameters from config files
IFS=',' read -r _ left_flank barcode umi right_flank < <(awk -F',' -v chem=$meta.chemistry '\$1 == chem' $flank_seq_config)
IFS=',' read -r _ fwd_primer_f fwd_primer_r rev_primer_f rev_primer_r TSO_f TSO_r < <(awk -F',' -v chem=$meta.chemistry '\$1 == chem' $adapter_seq_config)
flank_seq="-x \$left_flank -b \$barcode -u \$umi -x \$right_flank"
# Store flexiplex search pattern as an array so the '?' wildcards are not expanded as shell globs
flank_seq=(-x "\$left_flank" -b "\$barcode" -u "\$umi" -x "\$right_flank")

# Flexiplex filter (barcode filtering)
# For visium chemistries, search the whole rank curve instead
Expand All @@ -112,7 +114,7 @@ process PREPROCESS_FASTQ {
else
max_rank_arg=""
fi
flexiplex -p $task.cpus \$flank_seq -f 0 ${sample}_chopper_out.fastq
flexiplex -p $task.cpus "\${flank_seq[@]}" -f 0 ${sample}_chopper_out.fastq
flexiplex-filter \$max_rank_arg -w $whitelist --outfile my_filtered_barcode_list.txt flexiplex_barcodes_counts.txt

# Chain commands: Flexiplex demultiplexing -> (Optional) Save intermediate file after flexiplex -> Cutadapt trimming of reverse primer -> \
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ manifest {
name = 'Bambu-Pipe'
description = 'Context-aware transcript quantification from long-read single-cell and spatial transcriptomics data'
author = 'Andre Sim, Chin Hao Lee, Min Hao Ling'
version = 'v0.10.2'
version = 'v0.10.3'
mainScript = 'main.nf'
nextflowVersion = '!>=26.04.0'
}
Expand Down
Loading