getGeneCounts: Get gene-level counts from TSS data

Description Usage Arguments Value Examples

Description

Get gene-level counts from TSS data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
getGeneCounts(
  CSobject,
  transcriptGRL,
  regionAroundTSS = 500,
  outfile = NA,
  ncores = 1
)

## S4 method for signature 'CapSet'
getGeneCounts(
  CSobject,
  transcriptGRL,
  regionAroundTSS = 500,
  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

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 # 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()
 # get gene counts, counting reads around 500 bp of the TSS
 gcounts <- getGeneCounts(cs, dm6trans)

icetea documentation built on Nov. 8, 2020, 6:57 p.m.