Same code as in `ACGHDataService`. This kind of writing the output file for analyses has been moved to RModules and it's better organized there. From what I understand acgh and rnaseq were not converted yet, but in any case, the common parts of ACGHDataService and RNASeqDataService should be refactored to avoid this duplicated code.