Get gene-level counts from TSS data

getGeneCounts(CSobject, transcriptGRL, regionAroundTSS = 500,
  single_end = TRUE, outfile = NA, ncores = 1)

# S4 method for CapSet
getGeneCounts(CSobject, transcriptGRL,
  regionAroundTSS = 500, single_end = TRUE, outfile = NA, ncores = 1)

Arguments

CSobject

The CapSet object to use.

transcriptGRL

A GRangesList object containing transcripts, created using transcriptsBy(txdb)

regionAroundTSS

integer, indicating how many bases downstream of TSS to count

single_end

Logical, indicating whether reads are single end

outfile

character. Tab-separated output file name (if required)

ncores

integer. No. of cores/threads to use

Value

data.frame with gene-level counts for all genes in the txdb object

Examples

# load a txdb object library("TxDb.Dmelanogaster.UCSC.dm6.ensGene") seqlevelsStyle(TxDb.Dmelanogaster.UCSC.dm6.ensGene) <- "ENSEMBL" # get transcripts by gene (only X chromsome, for simplicity) seqlevels(TxDb.Dmelanogaster.UCSC.dm6.ensGene) <- "X" dm6trans <- transcriptsBy(TxDb.Dmelanogaster.UCSC.dm6.ensGene, "gene") # load a CapSet object cs <- exampleCSobject()
#> Checking de-multiplexed R1 reads
#> Checking de-multiplexed R2 reads
#> Checking mapped file
#> Checking de-duplicated file
# get gene counts, counting reads around 500 bp of the TSS gcounts <- getGeneCounts(cs, dm6trans)