slice1T {TransView} | R Documentation

## Slice read densities of whole transcripts from a TransView DensityContainer

### Description

slice1T returns read densities of a transcript. sliceNT takes the output of with genomic coordinates and returns a list of read densities.

### Usage

    ## S4 method for signature 'DensityContainer,character'
    slice1T(dc, tname,  gtf, control=FALSE, input_method="-", concatenate=T, stranded=T, treads_norm=T, nbins=0, bin_method="mean")
    ## S4 method for signature 'DensityContainer,character'
    sliceNT(dc, tnames,  gtf, toRle=FALSE, control=FALSE, input_method="-", concatenate=T, stranded=T, treads_norm=T, nbins=0, bin_method="mean")

### Arguments

`dc` | Source DensityContainer object
`tname,tnames` | A character string or a character vector with matching identifiers of the provided gtf
`gtf` | A GRanges object with a meta data column ‘transcript_id’ and ‘exon_id’ like e.g. from `gtf2gr`.
`toRle` | The return values will be converted to a `RleList`.
`control` | An optional DensityContainer which will used as control and by default subtracted from `dc`.
`input_method` | Defines the handling of the optional control DensityContainer. ‘-’ will subtract the control from the actual data and ‘/’ will return log2 fold change ratios with an added pseudo count of 1 read.
`concatenate` | Logical that determines whether exons will be concatenated to one numeric vector (default) or returned as a list of vectors per exon.
`stranded` | If TRUE, the resulting vector will be reversed for reads on the reverse strand.
`treads_norm` | If `TRUE`, the input densities are normalized to the read counts of the data set. Should not be used if one of the `DensityContainer` objects does not contain the whole amount of reads by e.g. placing a filter in `parseReads`.
`nbins` | If all input regions have equal length and nbins greater than 0, all densities will be summarized using the method specified by bin_method into nbins windows of approximately equal size.
`bin_method` | Character string that specifies the function used to summarize or expand the bins specified by nbins. Valid methods are ‘max’, ‘mean’ or ‘median’.

### Details

`slice1T` and `sliceNT` provide a convenient method to access the read densities from a DensityContainer of spliced reads. The transcript structure will be constructed based on the provided gtf information.

slice1T is a fast alternative to sliceNT to slice one vector of read densities corresponding to the structure of one transcript and reads can be optionally background subtracted. If the query region exceeds chromosome boundaries or if an non matching chromosome name will be passed, a warning will be issued and a NULL vector will be returned.

sliceN slices N regions corresponding to N rows in the range GRanges object. A list with the corresponding read densities will be returned and row names will be conserved. Optionally the return values can be converted to a `RleList` for seamless integration into the IRanges package.

### Value

slice1T returns a numeric vector of read densities sliceNT returns a list of read densities and optionally an `RleList`

### Author(s)

Julius Muller ju-mu@alumni.ethz.ch

### Examples

    library("pasillaBamSubset")

    exgtf<-dir(system.file("extdata", package="TransView"),full=TRUE,patt="gtf.gz$")[1]
    fn.pas_paired<-untreated1_chr4()

    exden.exprs<-parseReads(fn.pas_paired,spliced=TRUE,verbose=0)

    GTF.dm3<-gtf2gr(exgtf)

    slice1T(exden.exprs,tname="NM_001014688",gtf=GTF.dm3,concatenate=FALSE)

    my_genes<-sliceNT(exden.exprs,unique(mcols(GTF.dm3)$transcript_id[101:150]),gtf=GTF.dm3)
    lapply(my_genes,function(x)sum(x)/length(x))

[Package TransView version 1.34.0 Index]