Annotate an SBS or DBS VCF with flanking sequence context and transcript strand
Source:R/annotate_sbs_or_dbs_vcf.R
annotate_sbs_or_dbs_vcf.RdAdds flanking sequence context via add_seq_context() and, when a
transcript-ranges table is available, transcript strand via
add_transcript_strand(). The same pipeline is appropriate for SBS and
DBS; DBS-specific validation (e.g. no N in the tetranucleotide
context) happens downstream in vcf_to_dbs_catalog().
Usage
annotate_sbs_or_dbs_vcf(
vcf,
ref_genome,
trans_ranges = NULL,
seq_context_width = 10L,
name_of_vcf = NULL
)Arguments
- vcf
A VCF as a data.frame / data.table with
CHROM,POS,REF,ALTcolumns. For SBS,REFandALTare single bases; for DBS, both are two bases.- ref_genome
A BSgenome object or a character alias accepted by
normalize_genome_arg().- trans_ranges
Optional transcript-ranges
data.table. IfNULL, the shipped table is used when available forref_genome.- seq_context_width
Width (per side) of the flanking-sequence window (default 10 → 21-base window).
- name_of_vcf
Optional VCF name used in warnings.
Value
A list with:
annotated.vcf: the input VCF with new columnsseq.<N>basesand (when transcript ranges are available)trans.strand/bothstrand.discarded.variants: currently alwaysNULLfor this path (included for symmetry withannotate_id_vcf()).