Learn R Programming

SGSeq (version 1.2.2)

getSGVariantCounts: Representative counts and frequency estimates for splice variants

Description

For splice variants obtain counts of compatible fragments extending across the start or end of each variant. Counts can be obtained from an SGFeatureCounts object or from BAM files. Only one of the two arguments object and sample_info must be specified. Splice variant frequencies are estimated based on representive counts.

Usage

getSGVariantCounts(variants, object = NULL, features = NULL, sample_info = NULL, verbose = FALSE, cores = 1)

Arguments

variants
SGVariants object
object
SGFeatureCounts object
features
SGFeatures object that must include all features included in featureID5p(variants) and featureID3p(variants)
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.
verbose
If TRUE, generate messages indicating progress
cores
Number of cores available for parallel processing

Value

An SGVariantCounts object

Examples

Run this code
sgvc_from_sgfc <- getSGVariantCounts(sgv, sgfc)
path <- system.file("extdata", package = "SGSeq")
si$file_bam <- file.path(path, "bams", si$file_bam)
sgvc_from_bam <- getSGVariantCounts(sgv, features = sgf, sample_info = si)

Run the code above in your browser using DataLab