getGeneCounts {icetea} | R Documentation

## Get gene-level counts from TSS data

### Description

Get gene-level counts from TSS data

### Usage

    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

     # 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)

[Package icetea version 1.8.0 Index]