Search
Question: Passing multiple arguments (like mapply) to the MAP-function in GenomicFiles.
1
gravatar for maltethodberg
11 weeks ago by
UCPH
maltethodberg40 wrote:

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?

 

 

ADD COMMENTlink modified 11 weeks ago by Valerie Obenchain ♦♦ 6.4k • written 11 weeks ago by maltethodberg40
2
gravatar for Valerie Obenchain
11 weeks ago by
Valerie Obenchain ♦♦ 6.4k
United States
Valerie Obenchain ♦♦ 6.4k wrote:

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 COMMENTlink modified 11 weeks ago • written 11 weeks ago by Valerie Obenchain ♦♦ 6.4k

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 REPLYlink written 9 weeks ago by maltethodberg40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 305 users visited in the last hour