Passing multiple arguments (like mapply) to the MAP-function in GenomicFiles.
1
1
Entering edit mode
maltethodberg ▴ 180
@maltethodberg-9690
Last seen 1 day ago
Denmark

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?

 

 

genomicfiles reduceByRange • 1.3k views
ADD COMMENT
2
Entering edit mode
@valerie-obenchain-4275
Last seen 2.9 years ago
United States

Unfortunately I don't think there is a straightforward way of doing this. There is no metadata per se associated with the files.

Valerie

ADD COMMENT
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 713 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