.formatVarLabels {CrispRVariants} | R Documentation

## formatVarLabels

### Description

Internal CrispRVariants function for creating allele labels given variants and positions

Assume that the reference may be on the negative strand and regions are given with respect to the reference sequence.

### Usage

    .formatVarLabels(grl, labels, position = c("start", "end"),
      genome.to.pos = NULL, pos.to.lab = ":", as.string = TRUE)

    .findMismatches(alns, ref.seq, ref.start, regions = NULL, strand = "+",
      min.pct = 0)

### Arguments

`grl` | (GRangesList) A GRangesList of variants. The position of the variants is used in labels
`labels` | (character(n)) A vector of labels for each variant. In CrispRVariants, this is the size and type of the variant, e.g. "9D" for a 9 bp deletion.
`position` | One of "start" and "end". Determines whether the start or the end coordinate is used when labeling variants.
`genome.to.pos` | Optional named vector for transforming variant coordinates into another coordinate system (Default: NULL)
`pos.to.lab` | (character(1)) Character to join positions and labels (Default: ":", e.g. -3:9D)
`as.string` | Should individual variant labels be pasted into a single comma separated string when one alignment has multiple variants? (Default: TRUE)
`alns` | A GAlignments object, where the aligned sequences should span the reference sequence
`ref.seq` | A DNAString object, the sequence for comparison when checking for mismatches. The sequence does not necessarily have to match the mapping reference sequence. Must span all regions if regions are provided.
`ref.start` | (numeric(1)) The genomic start position of the reference sequence
`regions` | A GRanges object, regions to check for mismatches with coordinates relative to the reference sequence
`strand` | One of "+", "-"
`min.pct` | (numeric(1), between 0 and 100) Only return SNVs that occur at in least min.pct change, not any change at a position.

### Value

A data frame of sequence indices, genomic position of mismatch and mismatch base

[Package CrispRVariants version 1.12.0 Index]