rse_from_bam: Create a RangedSummarizedExperiment from bam files

View source: R/rse_from_bam.R

rse_from_bamR Documentation

Create a RangedSummarizedExperiment from bam files

Description

rse_from_bam creates a RangedSummarizedExperiment object by extracting counts from bam files of annotated polyA sites provided through an annotation.

Usage

rse_from_bam(bams, annotation, colData, ...)

Arguments

bams

A character list with the path for the bam files.

annotation

A GenomicRanges object with the coordinates of annotated PA-sites. This object must have an elementMetadata column named "gene_name" with gene-level IDs.

colData

A data frame containing sample metadaata

...

Additional parameters passed to Rsubread::featureCounts

Value

A RangedSummarizedExperiment-class object.

Author(s)

Eddie Imada

Examples

## Get path to bam files
bams <- list.file("~", full.names=T, pattern = "*.bam$")

## Load and quantify human hg38 PAS sites
data(hg38_pa)
pheno <- data.frame(groups=rep(c("A", "B"), each=5))
rse_from_bam(bams, hg38_pa, pheno, strandSpecific = 0,  allowMultiOverlap = F,
fraction = F, countMultiMappingReads=F, isPairedEnd = T, nthreads = 8,
countReadPairs = T,  requireBothEndsMapped = F)


eddieimada/REPAC documentation built on Aug. 20, 2023, 7:22 a.m.