getSGVariantCounts {SGSeq} | R Documentation

## Representative counts and frequency estimates for splice variants

### Description

For splice variants, obtain counts of compatible fragments spanning the start and/or end of each variant. Counts can be obtained from an `SGFeatureCounts` object or from BAM files. Only one of the two arguments `feature_counts` or `sample_info` must be specified. Local estimates of relative usage are calculated at the start and/or end of each splice variant. For splice variants with relative usage estimates at both start and end, these are combined by taking a weighted mean, where weights are proportional to the total number of reads spanning the respective boundary.

### Usage

    getSGVariantCounts(variants, feature_counts = NULL, sample_info = NULL,
      min_denominator = NA, min_anchor = 1, verbose = FALSE, cores = 1)

### Arguments

`variants` | `SGVariants` object
`feature_counts` | `SGFeatureCounts` object
`sample_info` | Data frame with sample information. Required columns are “sample_name”, “file_bam”, “paired_end”, “read_length”, “frag_length” and “lib_size”. Library information can be obtained with function `getBamInfo`.
`min_denominator` | Integer specifying minimum denominator when calculating variant frequencies. The total number of boundary-spanning reads must be equal to or greater than `min_denominator` for at least one event boundary. Otherwise estimates are set to `NA`. If `NA`, all estimates are returned.
`min_anchor` | Integer specifiying minimum anchor length
`verbose` | If `TRUE`, generate messages indicating progress
`cores` | Number of cores available for parallel processing

### Value

`SGVariantCounts` object

### Author(s)

Leonard Goldstein

### Examples

    sgvc_from_sgfc <- getSGVariantCounts(sgv_pred, sgfc_pred)
    path <- system.file("extdata", package = "SGSeq")
    si$file_bam <- file.path(path, "bams", si$file_bam)
    sgvc_from_bam <- getSGVariantCounts(sgv_pred, sample_info = si)

[Package SGSeq version 1.28.0 Index]