| validate,BamFile-method {easyRNASeq} | R Documentation |
Describes extensions to the Rsamtools package.
For BamFile and
BamFileList objects:
validate validates a BamFile or
BamFileList object.
## S4 method for signature 'BamFile' validate(obj, header = TRUE, cross.validation = TRUE)
obj |
An object of the |
header |
a boolean to (de)activate the check for a BAM header |
cross.validation |
a boolean - only valid for
|
validate checks whether the BAM file exists and if a BAI index is present.
validate returns invisibly a vector of boolean.
Fails anyway if any file is missing.
Nicolas Delhomme
# 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)