Learn R Programming

easyRNASeq (version 2.8.2)

validate,BamFile-method: Extension of the Rsamtools package

Description

Describes extensions to the Rsamtools package.
  • ForBamFileandBamFileListobjects:
    • validatevalidates aBamFileorBamFileListobject.

Usage

## S3 method for class '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

Value

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

Details

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

See Also

  • BamFile
  • BamFileList

Examples

Run this code
filenames <- dir(path=system.file("extdata",
      		                  package="RnaSeqTutorial"),
					       pattern="[A,C,T,G]{6}\\.bam$",
  				       full.names=TRUE)

bfl <-BamFileList(filenames,index=filenames)

validate(bfl)

Run the code above in your browser using DataLab