Learn R Programming

hiReadsProcessor (version 1.8.2)

read.BAMasPSL: Reads a BAM/SAM file and converts it into a PSL like format.

Description

Given filename(s), the function reads the BAM/SAM file, converts into a PSL like format. Any other file format will yield errors or erroneous results. This is intended to be used independently with other short read aligners.

Usage

read.BAMasPSL(bamFile = NULL, removeFile = TRUE, asGRanges = TRUE)

Arguments

bamFile
BAM/SAM filename, or vector of filenames, or a pattern of files to import.
removeFile
remove the file(s) supplied in bamFile paramter after importing. Default is FALSE.
asGRanges
return a GRanges object. Default is TRUE

Value

  • a GRanges or GAlignments object reflecting psl file type.

See Also

pairwiseAlignSeqs, blatSeqs, read.blast8, read.psl, pslToRangedObject, pairUpAlignments

Examples

Run this code
read.BAMasPSL(bamFile="processed.*.bam$")
read.BAMasPSL(bamFile=c("sample1hits.bam","sample2hits.bam"))

Run the code above in your browser using DataLab