NormRCountConfig-class: Container for configuration of read counting with bamsignals...

Description Usage Arguments Value Methods (by generic) Slots Author(s) See Also Examples

Description

This S4 class is a small wrapper for a configuration on obtaining counts from bamfiles with bamProfile. Herein, two functions provide help for creating an instance of this class: countConfigSingleEnd creates a configuration for single end reads; and countConfigPairedEnd creates a configuration for paired end reads.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## S4 method for signature 'ANY'
countConfigSingleEnd(binsize = 250L, mapq = 20L,
  filteredFlag = 1024L, shift = 0L)

## S4 method for signature 'ANY'
countConfigPairedEnd(binsize = 250L, mapq = 20L,
  filteredFlag = 1024L, shift = 0L, midpoint = TRUE, tlenFilter = c(70L,
  200L))

## S4 method for signature 'NormRCountConfig'
getFilter(x)

## S4 method for signature 'NormRCountConfig'
print(x, ...)

## S4 method for signature 'NormRCountConfig'
show(object)

Arguments

binsize

An integer() specifying the binsize in bp.

mapq

An integer() specifying the minimal mapping quality for a read to be counted.

filteredFlag

An integer() to filter for in the SAMFLAG field. For example, 1024 filters out marked duplicates (default). Refer to https://broadinstitute.github.io/picard/explain-flags.html for details.

shift

An integer() specifing a shift of the read counting position in 3'-direction. This can be handy in the analysis of chip-seq data.

midpoint

Paired End data only: A logical() indicating whether fragment midpoints instead of 5'-ends should be counted.

tlenFilter

An integer() of length two specifying the lower and upper length bound for a fragment to be considered. The fragment length as estimated from alignment in paired end experiments and written into the TLEN column.

x

A NormRCountConfig object.

...

optional arguments to be passed directly to the inherited function without alteration and with the original names preserved.

object

A NormRCountConfig object.

Value

A NormRCountConfig with specified counting parameters for normr methods (enrichR, diffR, regimeR

Methods (by generic)

Slots

type

A character of value paired.end or single.end.

binsize

An integer specifying the binsize in bp.

mapq

An integer specifying the minimal mapping quality for a read to be counted.

filteredFlag

An integer to filter for in the SAMFLAG field. For example, 1024 filters out marked duplicates (default). Refer to https://broadinstitute.github.io/picard/explain-flags.html for details.

shift

An integer specifing a shift of the read counting position in 3'-direction. This can be handy in the analysis of chip-seq data.

midpoint

Paired End data only: A logical indicating whether fragment midpoints instead of 5'-ends should be counted.

tlenFilter

Paired End data only: An integer of length two specifying the lower and upper length bound for a fragment to be considered. The fragment length as estimated from alignment in paired end experiments and written into the TLEN column.

Author(s)

Johannes Helmuth [email protected]

See Also

normr for functions that use this object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
### Create an instance of this class (see below for helper functions)
# 250bp bins; single end reads; MAPQ>=10; no duplicates
countConfig <- new("NormRCountConfig", 
                   type = "single.end", binsize = 250L, mapq = 10L, 
                   filteredFlag = 1024L, shift = 0L, midpoint = FALSE, 
                   tlenFilter = NULL)

### Counting configuration for Single End alignment files
# 250bp bins (default); only reads with MAPQ>=20; move counting position 100bp
countConfigurationSE <- countConfigSingleEnd(mapq = 20, shift = 100)
countConfigurationSE

### Counting configuration for Paired End alignment files
# 250bp bins; count center of fragments; only fragments with 70bp<=length<=200
countConfigurationPE <- countConfigPairedEnd(midpoint = TRUE,
                                             tlenFilter = c(70, 200))
countConfigurationPE

normr documentation built on Nov. 1, 2018, 2:38 a.m.