read_coverage_batch: Compute the read coverage score and read counts for all genes...

Description Usage Arguments Value See Also Examples

View source: R/coverage_cal_functions.R

Description

This function calls read_coverage to compute read coverage socre and read counts for all genes and samples.

Notes: 1. Coverage score is calcualted per gene, i.e. concatenation of all exons from the same gene.

2. We follow HTseq protocol for counting valid read or read pairs for each gene.

3. When reading alignment file, isSecondaryAlignment flag is set as FALSE to avoid possible redundant counting.

4. For paired-end data, isPaired is set as TRUE. We don't recommend setting isProperPair as TRUE as some fragments length may exceed 200bp.

5. User can modify scanBamParam in the R codes below as needed.

Usage

1
read_coverage_batch(bam_file_list,gtf_file,cores=1) 

Arguments

bam_file_list

a character vector of bam file names.

gtf_file

the gtf file that RNA-seq reads were aligned with reference to.

cores

number of cores to be used. Default=1.

Value

A list of the following:

coverage

a list of converage matrices for all genes within each sample.

counts

data.frame of read counts for all genes within each sample.

See Also

read_coverage

Examples

1
2
3
4
5
6
7
8
## read bam file and gtf file from the package
bam_file_list <- list.files(path=system.file("extdata",package="DegNorm")
    ,pattern=".bam$",full.names=TRUE)
gtf_file <- list.files(path=system.file("extdata",package="DegNorm"),
    pattern=".gtf$",full.names=TRUE)

# run read_coverage_batch to calculate read coverage curves and read counts
coverage_res=read_coverage_batch(bam_file_list, gtf_file,cores=2)

DegNorm documentation built on Nov. 8, 2020, 7:34 p.m.