Learn R Programming

hiReadsProcessor (version 1.8.2)

read.psl: Read PSL file(s) outputted by BLAT

Description

Given filename(s), the function reads the PSL file format from BLAT as a data frame and performs basic score filtering if indicated. Any other file format will yield errors or erroneous results. Make sure there is no header row! See required columns in pslCols.

Usage

read.psl(pslFile = NULL, bestScoring = TRUE, asGRanges = FALSE,
  removeFile = TRUE, parallel = FALSE)

Arguments

pslFile
PSL filename, or vector of filenames, or a pattern of files to import.
bestScoring
report only best scoring hits instead of all hits. Default is TRUE. Score is calculated by matches-misMatches-qBaseInsert-tBaseInsert.
asGRanges
return a GRanges object instead of a dataframe. Default is FALSE
removeFile
remove the PSL file(s) after importing. Default is FALSE.
parallel
use parallel backend to perform calculation with BiocParallel. Defaults to TRUE. If no parallel backend is registered, then a serial version is ran using SerialParam.

Value

  • a dataframe reflecting psl file type. If asGRanges=TRUE, then a GRanges object.

See Also

pairwiseAlignSeqs, vpairwiseAlignSeqs, startgfServer, blatSeqs, read.blast8, read.BAMasPSL, pslToRangedObject, write.psl

Examples

Run this code
data(psl)
pslFile <- tempfile()
write.psl(psl, filename = pslFile)
head(read.psl(pslFile=pslFile))
# read many PSL files matching the regex #
psl <- read.psl(pslFile="processed.*.psl$")

Run the code above in your browser using DataLab