csaw: dumpPE on multiple bam files.
1
0
Entering edit mode
@asifzubair-6770
Last seen 8.1 years ago

The new version of csaw introduced the very helpful dumpPE function to improve efficiency of downstream methods. 

However, is one expected to use this method one file at a time or can multiple files be supplied. 

For example, csaw suggests this:

outBam <- dumpPE(bamFile, "whee", param=xparam, overwrite=TRUE)
out2 <- windowCounts(outBam, param=reform(xparam, fast.pe=TRUE), filter=1)

However, I want to do something like this 

outBams <- dumpPE(bamFiles, prefix=list_of_prefixes, param=xparam, overwrite=TRUE)
out2 <- windowCounts(outBams, param=reform(xparam, fast.pe=TRUE), filter=1)

Is this a possibility ? 

Currently the specs say that bam.file should be of type character(1). 

Any help would be appreciated. 

Thanks ! 

csaw dumpPE windowCounts • 1.3k views
ADD COMMENT
1
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 5 hours ago
The city by the bay

Currently, one file needs to be supplied at a time, as part of a for or lapply loop. I had thought about adding support for multiple files, but that task just crossed my maximum effort-to-reward threshold, mostly because dumpPE tends to be a function you call once for a given study. After all, you don't have to dump the files for every windowCounts call, you do it once and re-use the files across the analysis. So, unless you have a use case where you're running dumpPE frequently, I'm inclined to leave it as it is.

ADD COMMENT
0
Entering edit mode

I should point out that dumpPE is going to be retired in the next release. I made the default pe="both" option faster on the original BAM files, which avoids the need to construct a temporary file. It also makes the downstream processing more consistent, which was difficult to do with the dumped alignments.

ADD REPLY
0
Entering edit mode

Thank you, Aaron. This helps! 

ADD REPLY

Login before adding your answer.

Traffic: 890 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6