Preprocess plasma cell-free DNA sequencing data so the diagnostic signal survives: choose a consensus strategy (single-strand UMI vs duplex), run the fgbio align->group->consensus->re-align chain with the correct flags, and avoid the cfDNA dedup trap where naive coordinate dedup collapses nucleosome-coincident independent molecules. The fragment-length distribution is treated as structured biological signal and a pre-analytical QC instrument, not noise.
conda install -c bioconda fgbio bwa samtools
pip install pysam numpy
Tell your AI agent what you want to do: - "Build UMI consensus reads from my targeted cfDNA panel BAM" - "Set up a duplex consensus pipeline for sub-0.1% VAF detection" - "Do minimal preprocessing for sWGS tumor-fraction estimation" - "Check the insert-size distribution of my cfDNA library for gDNA contamination" - "I have no UMIs - how should I dedup this cfDNA quantitatively?"
"Process my targeted panel cfDNA with single-strand UMIs: extract UMIs, align, group by adjacency, call molecular consensus, and filter."
"My read structure has a UMI stem - help me write the correct fgbio read structure so the stem does not bleed into the template."
"Set up a duplex consensus pipeline so I can detect variants below 0.1% VAF, using paired grouping and a true-duplex filter."
"Explain why I should call duplex consensus permissively and filter afterward instead of setting min-reads high on the caller."
"I am running sWGS for tumor fraction - what minimal preprocessing do I need, and should I skip consensus calling?"
"Plot my cfDNA insert-size distribution and tell me whether the ~167 bp peak and sawtooth look healthy or contaminated."
"My fragment mode is about 10 bp short of 167 - is that gDNA contamination or a library-prep artifact?"
RX tag with the correct read structure (including the skip/stem token).bwa mem -Y so tag-bearing short-fragment sequence is preserved.adjacency (simplex) or paired (duplex, mandatory).FilterConsensusReads using the appropriate --min-reads strand specification.--strategy adjacency cannot reconstruct strand pairing; use --strategy paired for any duplex workflow.CallDuplexConsensusReads --min-reads is a pre-filter; do the real filtering in FilterConsensusReads.