Package ubic.gemma.cli.options
Class DataFileOptionsUtils
java.lang.Object
ubic.gemma.cli.options.DataFileOptionsUtils
Utilities to add and process options for data files (raw data, processed data, designs, etc.).
- Author:
- poirigui
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddCellMetadataFileOptions(org.apache.commons.cli.Options options, String what, boolean allowStandardLocation, BiConsumer<org.apache.commons.cli.OptionGroup, org.apache.commons.cli.Option> addSingleOption) static voidaddDataFileOptions(org.apache.commons.cli.Options options, String what, boolean allowStandardLocation, boolean allowFile, boolean allowDirectory, boolean allowCurrentDirectory, boolean allowStdout, BiConsumer<org.apache.commons.cli.OptionGroup, org.apache.commons.cli.Option> addSingleOption) Add options for writing data files, such as raw or processed data files.static voidaddDataFileOptions(org.apache.commons.cli.Options options, String what, boolean allowStandardLocation, BiConsumer<org.apache.commons.cli.OptionGroup, org.apache.commons.cli.Option> addSingleOption) static voidaddDesignFileOptions(org.apache.commons.cli.Options options, String what, boolean allowStandardLocation, BiConsumer<org.apache.commons.cli.OptionGroup, org.apache.commons.cli.Option> addSingleOption) static voidaddExpressionDataFileOptions(org.apache.commons.cli.Options options, String what, boolean allowStandardLocation, BiConsumer<org.apache.commons.cli.OptionGroup, org.apache.commons.cli.Option> addSingleOption) static voidaddSingleCellExpressionDataFileOptions(org.apache.commons.cli.Options options, String what, boolean allowStandardLocation, BiConsumer<org.apache.commons.cli.OptionGroup, org.apache.commons.cli.Option> addSingleOption) static CellMetadataFileOptionValuegetCellMetadataFileOptionValue(org.apache.commons.cli.CommandLine commandLine, boolean allowStandardLocation, String forceOption, boolean force) static DataFileOptionValuegetDataFileOptionValue(org.apache.commons.cli.CommandLine commandLine, boolean allowStandardLocation, boolean allowStdout, boolean allowCurrentDirectory, String forceOption, boolean force) Obtain the result of the data file options added byaddDataFileOptions(Options, String, boolean, boolean, boolean, boolean, boolean, BiConsumer)static DataFileOptionValuegetDataFileOptionValue(org.apache.commons.cli.CommandLine commandLine, boolean allowStandardLocation, String forceOption, boolean force) static DesignFileOptionValuegetDesignFileOptionValue(org.apache.commons.cli.CommandLine commandLine, boolean allowStandardLocation, String forceOption, boolean force) getExpressionDataFileOptionValue(org.apache.commons.cli.CommandLine commandLine, boolean allowStandardLocation, String forceOption, boolean force) getSingleCellExpressionDataFileOptionValue(org.apache.commons.cli.CommandLine commandLine, boolean allowStandardLocation, String forceOption, boolean force)
-
Field Details
-
OUTPUT_FILE_OPTION
- See Also:
-
OUTPUT_DIR_OPTION
- See Also:
-
STANDARD_LOCATION_OPTION
- See Also:
-
STANDARD_OUTPUT_OPTION
- See Also:
-
EXCLUDE_SAMPLE_IDENTIFIERS_OPTION
- See Also:
-
USE_BIO_ASSAY_IDS_OPTION
- See Also:
-
USE_RAW_COLUMN_NAMES_OPTION
- See Also:
-
SCALE_TYPE_OPTION
- See Also:
-
USE_MULTIPLE_ROWS_FOR_ASSAYS_OPTION
- See Also:
-
SEPARATE_SAMPLE_FROM_ASSAYS_IDENTIFIERS_OPTION
- See Also:
-
USE_ENSEMBL_IDS_OPTION
- See Also:
-
-
Constructor Details
-
DataFileOptionsUtils
public DataFileOptionsUtils()
-
-
Method Details
-
addDataFileOptions
public static void addDataFileOptions(org.apache.commons.cli.Options options, String what, boolean allowStandardLocation, BiConsumer<org.apache.commons.cli.OptionGroup, org.apache.commons.cli.Option> addSingleOption) -
addDataFileOptions
public static void addDataFileOptions(org.apache.commons.cli.Options options, String what, boolean allowStandardLocation, boolean allowFile, boolean allowDirectory, boolean allowCurrentDirectory, boolean allowStdout, BiConsumer<org.apache.commons.cli.OptionGroup, org.apache.commons.cli.Option> addSingleOption) Add options for writing data files, such as raw or processed data files.- Parameters:
allowStandardLocation- if true, the standard location option will be addedallowFile- if true, the output file option will be added, otherwise only the output directory will be addedallowDirectory- if true, the output directory option will be addedallowCurrentDirectory- if true, writing to the current directory will be allowedallowStdout- if true, the standard output option will be addedaddSingleOption- a function that adds a single option to the given option group; this is needed because a CLI might want to track which options apply to individual entities separately.- See Also:
-
addExpressionDataFileOptions
public static void addExpressionDataFileOptions(org.apache.commons.cli.Options options, String what, boolean allowStandardLocation, BiConsumer<org.apache.commons.cli.OptionGroup, org.apache.commons.cli.Option> addSingleOption) -
addSingleCellExpressionDataFileOptions
public static void addSingleCellExpressionDataFileOptions(org.apache.commons.cli.Options options, String what, boolean allowStandardLocation, BiConsumer<org.apache.commons.cli.OptionGroup, org.apache.commons.cli.Option> addSingleOption) -
addDesignFileOptions
public static void addDesignFileOptions(org.apache.commons.cli.Options options, String what, boolean allowStandardLocation, BiConsumer<org.apache.commons.cli.OptionGroup, org.apache.commons.cli.Option> addSingleOption) -
addCellMetadataFileOptions
public static void addCellMetadataFileOptions(org.apache.commons.cli.Options options, String what, boolean allowStandardLocation, BiConsumer<org.apache.commons.cli.OptionGroup, org.apache.commons.cli.Option> addSingleOption) -
getDataFileOptionValue
public static DataFileOptionValue getDataFileOptionValue(org.apache.commons.cli.CommandLine commandLine, boolean allowStandardLocation, String forceOption, boolean force) throws org.apache.commons.cli.ParseException - Throws:
org.apache.commons.cli.ParseException
-
getDataFileOptionValue
public static DataFileOptionValue getDataFileOptionValue(org.apache.commons.cli.CommandLine commandLine, boolean allowStandardLocation, boolean allowStdout, boolean allowCurrentDirectory, String forceOption, boolean force) throws org.apache.commons.cli.ParseException Obtain the result of the data file options added byaddDataFileOptions(Options, String, boolean, boolean, boolean, boolean, boolean, BiConsumer)- Parameters:
allowStandardLocation- if true, the standard location option will be considered and used as a default if no other destination is selected. Otherwise, standard output will be used as a default.allowStdout- if true, the standard output option will be considered and used as a default if no other destination is selected. Otherwise, the current directory will be used as a default.allowCurrentDirectory- if true, the current directory will be used as a default if no other destination is selected. Note that a file can be written to inside that directory viaDataFileOptionValue.getOutputFile(String)- Throws:
org.apache.commons.cli.MissingOptionException- if no destination is selected and no default location is allowed.org.apache.commons.cli.ParseException
-
getExpressionDataFileOptionValue
public static ExpressionDataFileOptionValue getExpressionDataFileOptionValue(org.apache.commons.cli.CommandLine commandLine, boolean allowStandardLocation, String forceOption, boolean force) throws org.apache.commons.cli.ParseException - Throws:
org.apache.commons.cli.ParseException
-
getSingleCellExpressionDataFileOptionValue
public static SingleCellExpressionDataFileOptionValue getSingleCellExpressionDataFileOptionValue(org.apache.commons.cli.CommandLine commandLine, boolean allowStandardLocation, String forceOption, boolean force) throws org.apache.commons.cli.ParseException - Throws:
org.apache.commons.cli.ParseException
-
getDesignFileOptionValue
public static DesignFileOptionValue getDesignFileOptionValue(org.apache.commons.cli.CommandLine commandLine, boolean allowStandardLocation, String forceOption, boolean force) throws org.apache.commons.cli.ParseException - Throws:
org.apache.commons.cli.ParseException
-
getCellMetadataFileOptionValue
public static CellMetadataFileOptionValue getCellMetadataFileOptionValue(org.apache.commons.cli.CommandLine commandLine, boolean allowStandardLocation, String forceOption, boolean force) throws org.apache.commons.cli.ParseException - Throws:
org.apache.commons.cli.ParseException
-