You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current v13.1.0 cli output options are like so
--output <string> Path to outputOptions file. This should be
in JSON or YAML format.
--output-prefix <string> Path/filename without an extension to be
prepended to the output file format
options.
The output-options.yml file contains a couple of options:
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
--output <string> Path to outputOptions file. This should be
in JSON or YAML format.
--output-prefix <string> Path/filename without an extension to be
prepended to the output file format
options.
--output-directory <path> Path to the desired output directory
where exomiser will write the output files. Using this
without the output-file-name option will result in a default
filename being used which will be output to the specified
directory.
--output-file-name <string> Filename prefix to be used for the
output files. Can be combined with the
output-directory option to specify a custom location
and filename. Used alone will result in files with the
specified filename being written to the default results
directory.
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.
Implementation-wise under the hood this will be a bit of a pain as it will involve adding fields to the OutputOptions class, changing the ResultsWriterUtils and most likely ResultsWriter implementations to cater for these changes.
Option 2 - Use existing CLI --output-prefix option
Given 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).
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 the ResultsWriterUtils 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.
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!
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?
The text was updated successfully, but these errors were encountered: