sc.context: sc.context

sc.contextR Documentation

sc.context

Description

Computes strand collapsed k-nucleotide contexts and representative string for various mutations represented as granges object corresponding to reference coordinate that is being mutated (e.g 0 width for insertion, >=1 width for a del, and 1 width for a SNV, >1 width for a MNV) with alt fields $ALT representing alternate sequences [ACGT]* where any non ACGT sequence is treated as a blank (i.e. for a del) using reference genome hg that is either a BSGenome, ffTrack, or 2bit (i.e. an input into read_seq

A strand collapsed k-nucleotide context involves a base that is being altered and (k-1)/2 nucleotides around it, where k is an odd positive integer.

Examples:

A[T>A]G + represents a T>A mutation happening on the positive strand with an A in 5' position and G in the 3' position

A[>ATTTT]G - represents a >ATTTT insertion on the negative strand with an A in 5' position and G in the 3' position

A[ATTTT>]G + represents a ATTTT> deletion on the positive strand with an A in 5' position and G in the 3' position

default is k = 3

Usage

sc.context(mut, hg, k = 3, alt.field = "ALT", mc.cores = 1, verbose = FALSE)

Author(s)

Marcin Imielinski


mskilab/skitools documentation built on Aug. 31, 2023, 1:13 p.m.