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

Description Usage Arguments Value Note See Also Examples

View source: R/hiReadsProcessor.R

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

1
2
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.

Note

If parallel=TRUE, then be sure to have a parallel backend registered before running the function. One can use any of the following MulticoreParam SnowParam

See Also

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

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
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$")

## End(Not run)

malnirav/hiReadsProcessor documentation built on Sept. 17, 2017, 10:56 a.m.