Detects somatic mutations in circulating tumor DNA using variant callers optimized for low allele fractions with UMI-based error suppression. Reliably detects mutations at VAF above 0.5 percent using consensus-based approaches. Use when identifying tumor mutations from plasma DNA or tracking specific variants.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Detects somatic mutations in circulating tumor DNA using variant callers optimized for low allele fractions with UMI-based error suppression. Reliably detects mutations at VAF above 0.5 percent using consensus-based approaches. Use when identifying tumor mutations from plasma DNA or tracking specific variants.
Before using code patterns, verify installed versions match. If versions differ:
Python: pip show <package> then help(module.function) to check signatures
CLI: <tool> --version then <tool> --help to confirm flags
If code throws ImportError, AttributeError, or TypeError, introspect the installed
package and adapt the example to match the actual API rather than retrying.
ctDNA Mutation Detection
"Detect mutations in my cfDNA sample" → Identify somatic variants at low allele fractions (0.1-1%) from cell-free DNA using error-suppressed consensus calling and specialized callers.
CLI: vardict-java for low-VAF variant calling from cfDNA
Detect somatic mutations in cfDNA at low variant allele fractions.
Input Requirements
Requirement
Specification
Data type
Targeted panel or WES (NOT sWGS)
Depth
>= 1000x for low VAF detection
UMIs
Highly recommended for < 1% VAF
Input
Preprocessed BAM (UMI consensus if available)
VAF Detection Limits
VAF Range
Reliability
Notes
> 1%
Reliable
Standard callers work
0.5-1%
Good with UMIs
Requires error suppression
0.1-0.5%
Challenging
Needs deep UMI consensus
< 0.1%
Unreliable
Near noise floor
VarDict for High Sensitivity (Ensembl VEP 111+)
# VarDict is highly sensitive for low VAF# Use on UMI-consensus BAM for best results
vardict-java \
-G reference.fa \
-f 0.005 \ # Min VAF 0.5%
-N sample_id \
-b sample.bam \
-c 1 -S 2 -E 3 -g 4 \
regions.bed | \
teststrandbias.R | \
var2vcf_valid.pl \
-N sample_id \
-E \
-f 0.005 \
> sample.vcf
defannotate_ctdna_variants(vcf_file, output_vcf):
'''Annotate variants with clinically relevant information.'''# Use VEP or snpEff for annotation
subprocess.run([
'vep',
'--input_file', vcf_file,
'--output_file', output_vcf,
'--format', 'vcf',
'--vcf',
'--cache',
'--canonical',
'--protein',
'--sift', 'b',
'--polyphen', 'b',
'--af_gnomad'
], check=True)
Tracking Known Mutations
Goal: Quantify the variant allele fraction of specific known mutations across serial liquid biopsy samples for minimal residual disease monitoring.
Approach: For each target mutation, pileup reads at the variant position, count reference and alternative alleles, and compute VAF with depth statistics.
deftrack_specific_mutations(bam_file, mutations, min_depth=100):
'''
Track specific known mutations across samples.
Useful for MRD monitoring.
Args:
bam_file: Aligned BAM
mutations: List of (chrom, pos, ref, alt) tuples
'''import pysam
bam = pysam.AlignmentFile(bam_file, 'rb')
results = []
for chrom, pos, ref, alt in mutations:
counts = {'ref': 0, 'alt': 0, 'other': 0}
for pileupcolumn in bam.pileup(chrom, pos-1, pos):
if pileupcolumn.pos != pos - 1:
continuefor read in pileupcolumn.pileups:
if read.is_del or read.is_refskip:
continue
base = read.alignment.query_sequence[read.query_position]
if base == ref:
counts['ref'] += 1elif base == alt:
counts['alt'] += 1else:
counts['other'] += 1
total = counts['ref'] + counts['alt'] + counts['other']
vaf = counts['alt'] / total if total > 0else0
results.append({
'chrom': chrom, 'pos': pos, 'ref': ref, 'alt': alt,
'depth': total, 'alt_count': counts['alt'], 'vaf': vaf
})
bam.close()
return pd.DataFrame(results)
Related Skills
cfdna-preprocessing - Preprocess with UMI consensus