Closed julesjacobsen closed 1 year ago
No preferences for me, I feel like both options are clear enough in how to use the feature especially if it is documented as it is here. So whatever you feel is a good fit I am happy with, I would be able to work with both approaches!
Went with the split option of outputDirectory
and outputFileName
Background
The current v13.1.0 cli output options are like so
The output-options.yml file contains a couple of options:
outputPrefix
will prefix the output file with the fully specified path and combine these with the outputFormats values to create the output files.So, given the command:
These files are produced:
This is great if you want to specify a particular output filename to be used. But what if you wanted to have the default output file name (the input VCF filename with '-exomiser' appended) with a non-standard output directory? e.g.
In this case you need to specify the full path and filename in the output-options.yaml file, which is irritating. Allowing users to specify the output directory would be helpful, especially for large batches of analyses.
User story
As a cli user, I wish to use to default exomiser output file name (the input VCF filename with
-exomiser
appended), but I want to be able to specify a custom output directory directly via the cli, without having to create an output-options.yaml file for each sample.Option 1 - new CLI option
These files are produced:
This seems clean and simple and it would allow for adding a companion
--output-filename-prefix
option and neither/ either/ both options could be used. However, the existing--output-prefix
option would need to be used exclusively to the new--output-directory
and--output-filename-prefix
options.So for a VCF input file Pfeifer.vcf.gz
Implementation-wise under the hood this will be a bit of a pain as it will involve adding fields to the
OutputOptions
class, changing theResultsWriterUtils
and most likelyResultsWriter
implementations to cater for these changes.Option 2 - Use existing CLI
--output-prefix
optionGiven there is already an
--output-prefix
option, this could be trivially changed so that Exomiser parses the value (a String) as either a file path (current behaviour) or as a directory (new behaviour).e.g.
produces
but appending the system file separator to the
--output-prefix
argument indicates this is to be interpreted as a directory:produces
So the value of
--output-prefix
is now a directory path and the file names are generated from the input VCF file name as before. Implementation is a simple change to theResultsWriterUtils
class to better-specify the behaviour of the way the output-prefix argument is interpreted.Pros and Cons
Option 1 is more explicit and probably (?) less likely to cause confusion, will require API changes and an additional set of commands for the CLI, whereas option 2 is simpler to implement and requires no API changes or CLI changes, at the expense of some possible confusion about the meaning of
output-prefix
which can do double-duty.@yaseminbridges, have you got any preference?