bioFAM / MOFA

Multi-Omics Factor Analysis
GNU Lesser General Public License v3.0
235 stars 60 forks source link

Allow arbitrary extra options in runMOFA (and fix a bug) #6

Closed DarwinAwardWinner closed 6 years ago

DarwinAwardWinner commented 7 years ago

For example, you could pass seed=12345 as an additional argument to runMOFA, and it would add "--seed 12345" to the command line. This does not allow manually overriding any of the command-line arguments that runMOFA sets based on the values in the mofa object itself (e.g. you cannot add inFiles as an extra option).

Also adds a verbose option that echoes the command to be run as well as adding "--verbose" to the command itself.

Lastly, this commit fixes a probable bug that could unintentionally duplicate all the arguments before to "--scale_covariates" if there are multiple covariates in the model.

DarwinAwardWinner commented 7 years ago

Note that I haven't tested this code yet, since I'm still waiting for an existing MOFA run to finish. But I will be testing it soon.

DarwinAwardWinner commented 6 years ago

I've rebased this onto the latest master, and added a second commit that checks the exit code of the mofa command.

DarwinAwardWinner commented 6 years ago

I've just done some simple tests using this code, and it seems to work. I was able to set the random seed for the run just by adding seed=1986 in the call to runMOFA.