reduceByRange with iterate=TRUE is a great way to analyse a collection of large files on laptop.
Say I have a set of files and a set of ranges. In addition, for every file I have an additional variable, say a normalisation factor, that can't be calculated on each individual range/file combination.
For every call of MAP by reduceByRange, I would like to pass the appropriate normalisation factor to the calculation along with the file, in the same way you would call mapply on multiple parallel arguments (mapply(function, files, normalisationFactor)
).
Is such a thing possible with GenomicFiles?
I found a somewhat hacky workaround: If you have a named file list (i.e. named BigWigFileList) you can pass the the names to the files argument and use that as an index to retrieve correct values from additional lists or vectors in ...
Passing the index directly fails, since files must be a character or file-object.