Rsamtools-methods: Extension of the Rsamtools package

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Describes extensions to the Rsamtools package.

Usage

1
2
## S4 method for signature 'BamFile'
validate(obj, header = TRUE, cross.validation = TRUE)

Arguments

obj

An object of the BamFile or BamFileList class

header

a boolean to (de)activate the check for a BAM header

cross.validation

a boolean - only valid for BamFileList objects - to (de)activate the cross validation of all the BAM files header

Details

validate checks whether the BAM file exists and if a BAI index is present.

Value

validate returns invisibly a vector of boolean. Fails anyway if any file is missing.

Author(s)

Nicolas Delhomme

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# retrieve the data
tdir <- tutorialData()

# get the bam file path from the Bioc cache
filenames <- dir(tdir,pattern="[A,C,T,G]{6}\\.bam$",full.names=TRUE)

# retrieve the index from the Bioc cache too
inxnames <- sapply(paste0(sub(".*_","",basename(filenames)),".bai"),fetchData)

bfl <-BamFileList(filenames,index=inxnames)

validate(bfl)

easyRNASeq documentation built on April 30, 2020, 2 a.m.