countBamListInGRanges: Get read counts for a list of BAM files and given count...

Description Usage Arguments Value Examples

View source: R/getRCs.R

Description

Get read counts for a list of BAM files and given count windows

Usage

1

Arguments

bam.files

list with absolute or relative paths to BAM files

countWindows

data.frame with contents of a BED file as returned by getWindows

read.width

read.width parameter for countBamInGRanges or FALSE if actual read width should be extracted from BAM file

...

additional parameters

Value

a GRanges object over the countWindows with read counts for each sample as elementMetadata

Examples

1
2
3
4
5
6
7
8
bed <- system.file("extdata/Genes_part.bed", package = "panelcn.mops")
countWindows <- getWindows(bed)
## Not run: 
testbam <- "SAMPLE1.bam"
test <- countBamListInGRanges(countWindows = countWindows,
                                bam.files = testbam, read.width = 150)

## End(Not run)

Example output

Loading required package: cn.mops
Loading required package: parallel
Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Loading required package: S4Vectors

Attaching package:S4VectorsThe following object is masked frompackage:base:

    expand.grid

Loading required package: IRanges
Loading required package: GenomeInfoDb

Attaching package:cn.mopsThe following object is masked frompackage:S4Vectors:

    params

naming without chr prefix chosen, but BED contains chr -> removing chr
Processing SAMPLE1.bam ... 1 / 1
No index file (.bai) found for BAM fileSAMPLE1.bam. RCs cannot be calculated

panelcn.mops documentation built on Nov. 8, 2020, 7:56 p.m.