preprocessRanges: Read and preprocess BAM/BED files to GRanges

Description Usage Arguments Value Author(s) Examples

View source: R/ranges.R

Description

This function reads the BAM/BED files present in the input list object and fills the ranges field of the latter. At the same time it takes care of certain preprocessing steps like normalization.

Usage

1
2
    preprocessRanges(input, preprocessParams, genome, 
        bamRanges=NULL, bamParams = NULL, rc = NULL)

Arguments

input

an input list as in recoup but with the ranges field of each member filled (e.g. after using preprocessRanges).

preprocessParams

see the preprocessParams argument in the main recoup function.

genome

see the genome argument in the main recoup function.

bamRanges

a GRanges object to mask the BAM/BED files to save time and space. If NULL, the whole file is read.

bamParams

see the bamParams argument in the main recoup function.

rc

fraction (0-1) of cores to use in a multicore system. It defaults to NULL (no parallelization).

Value

This function fills the ranges field in the main input argument in recoup function.

Author(s)

Panagiotis Moulos

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    # This example only demonstrates the usage of the
    # preprocessRanges function. The input BAM files
    # included with the package will not produce
    # realistic plots as they contain only a very small
    # subset of the original data presented in the 
    # vignettes (50k reads). Please see recoup vignettes 
    # for further demonstrations.
    test.in <- list(
        WT_H4K20me1=list(
            id="WT_H4K20me1",
            name="WT H4K20me1",
            file=system.file("extdata",
                "WT_H4K20me1_50kr.bam", 
                package="recoup"),
            format="bam",
            color="#EE0000"
        ),
        Set8KO_H4K20me1=list(
            id="Set8KO_H4K20me1",
            name="Set8KO H4K20me1",
            file=system.file("extdata", 
                "Set8KO_H4K20me1_50kr.bam", 
                package="recoup"),
            format="bam",
            color="#00BB00"
        )
    )
    
    pp=list(
        normalize="none",
        spliceAction="split",
        spliceRemoveQ=0.75
    )
    
    test.in <- preprocessRanges(test.in,pp)

recoup documentation built on Nov. 8, 2020, 6:47 p.m.