Learn R Programming

SGSeq (version 1.0.6)

analyzeFeatures: Analysis of splice graph features from BAM files

Description

High-level function for the prediction and quantification of splice junctions, exon bins and splice sites from BAM files.

Usage

analyzeFeatures(sample_info, which = NULL, features = NULL, predict = is.null(features), alpha = 2, psi = 0.1, beta = 0.2, gamma = 0.2, min_n_sample = 1, min_overhang = NA, annotation = NULL, cores_per_sample = 1, BPPARAM = MulticoreParam(1))

Arguments

sample_info
data.frame with sample information including mandatory character columns “sample_name” and “file_bam”.
which
GRanges of genomic regions to be considered for feature prediction, passed to ScanBamParam
features
TxFeatures or SGFeatures object
predict
Logical indicating whether transcript features should be predicted from BAM files
alpha
Minimum FPKM required for a splice junction to be included
psi
Minimum splice frequency required for a splice junction to be included
beta
Minimum relative coverage required for an internal exon to be included
gamma
Minimum relative coverage required for a terminal exon to be included
min_n_sample
Minimum number of samples a feature must be observed in to be included
min_overhang
After merging, all or a subset of terminal exons sharing a splice site with an internal exon are removed. min_overhang specifies the minimum overhang required for a terminal exon to be included. Use NA to remove all terminal exons sharing a splice site with an internal exon. Use NULL to disable filtering (not usually recommended, as this will result in terminal exon predictions for each splice site; disabling filtering is useful if results are subsequently merged with other predictions and filtering is postponed until after the merging step).
annotation
TxFeatures object used for annotation
cores_per_sample
Number of cores per sample
BPPARAM
BiocParallelParam for processing samples in parallel, defaults to MulticoreParam(1)

Value

SGFeatureCounts object

Details

If alignment information is not included in sample_info, it is obtained directly from BAM files with getBamInfo.

Splice junctions and exons are predicted from BAM files with predictTxFeatures.

Known features can be provided as TxFeatures or SGFeatures via argument features.

If features is not NULL and predict is TRUE, known features are augmented with predictions.

Known and/or predicted transcript features are converted to splice graph features. For details, see convertToSGFeatures.

Optionally, splice graph features can be annotated with respect to a TxFeatures object provided via argument annotation. For details, see the help page for function annotate.

Finally, compatible fragment counts for splice graph features are obtained from BAM files with getSGFeatureCounts.

Examples

Run this code
dir <- system.file("extdata", package = "SGSeq")
si$file_bam <- file.path(dir, "bams", si$file_bam)
sgfc <- analyzeFeatures(si, gr)

Run the code above in your browser using DataLab