Package ubic.gemma.core.apps
Class ExpressionExperimentManipulatingCLI
- java.lang.Object
-
- ubic.gemma.core.util.AbstractCLI
-
- ubic.gemma.core.util.AbstractAuthenticatedCLI
-
- ubic.gemma.core.apps.ExpressionExperimentManipulatingCLI
-
- All Implemented Interfaces:
CLI
- Direct Known Subclasses:
AffyDataFromCelCli
,BatchEffectPopulationCli
,DeleteDiffExCli
,DeleteExperimentsCli
,DifferentialExpressionAnalysisCli
,ExperimentalDesignWriterCLI
,ExpressionDataCorrMatCli
,ExpressionDataMatrixWriterCLI
,ExpressionExperimentDataFileGeneratorCli
,ExpressionExperimentPlatformSwitchCli
,ExpressionExperimentPrimaryPubCli
,GeeqCli
,LinkAnalysisCli
,MakeExperimentPrivateCli
,MakeExperimentsPublicCli
,OrderVectorsByDesignCli
,ProcessedDataComputeCLI
,RefreshExperimentCli
,ReplaceDataCli
,RNASeqBatchInfoCli
,RNASeqDataAddCli
,SplitExperimentCli
,SVDCli
,VectorMergingCli
public abstract class ExpressionExperimentManipulatingCLI extends AbstractAuthenticatedCLI
Base class for CLIs that needs one or more expression experiment as an input. It offers the following ways of reading them in:- All EEs (if -all is supplied)
- All EEs for a particular taxon.
- A specific ExpressionExperimentSet, identified by name
- A comma-delimited list of one or more EEs identified by short name given on the command line
- From a file, with one short name per line.
- EEs matching a query string (e.g., 'brain')
- (Optional) 'Auto' mode, in which experiments to analyze are selected automatically based on their workflow state. This can be enabled and modified by subclasses who override the "needToRun" method.
- All EEs that were last processed after a given date, similar to 'auto' otherwise.
In addition, EEs can be excluded based on a list given in a separate file.
- Author:
- Paul
-
-
Field Summary
Fields Modifier and Type Field Description protected ubic.gemma.persistence.service.common.auditAndSecurity.AuditEventService
auditEventService
protected ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService
auditTrailService
protected ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentService
eeService
protected Set<ubic.gemma.model.expression.experiment.BioAssaySet>
expressionExperiments
protected boolean
force
Force processing of EEs regardless of their troubled status.-
Fields inherited from class ubic.gemma.core.util.AbstractCLI
ABORTED, FAILURE, FAILURE_FROM_ERROR_OBJECTS, log, SUCCESS
-
-
Constructor Summary
Constructors Constructor Description ExpressionExperimentManipulatingCLI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addForceOption(org.apache.commons.cli.Options options)
protected void
buildOptions(org.apache.commons.cli.Options options)
Build option implementation.GemmaCLI.CommandGroup
getCommandGroup()
Obtain the command group for this CLI.protected boolean
noNeedToRun(ubic.gemma.model.common.auditAndSecurity.Auditable auditable, Class<? extends ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType> eventClass)
protected void
processOptions(org.apache.commons.cli.CommandLine commandLine)
Process command line options.protected void
refreshExpressionExperimentFromGemmaWeb(ubic.gemma.model.expression.experiment.ExpressionExperiment ee, boolean refreshVectors, boolean refreshReports)
Refresh a dataset for Gemma Web.protected void
setUseReferencesIfPossible(boolean useReferencesIfPossible)
Set this to true to allow reference to be retrieved instead of actual entities.-
Methods inherited from class ubic.gemma.core.util.AbstractAuthenticatedCLI
createBatchTaskExecutorService, getGemmaRestApiClient, processStandardOptions, requireLogin
-
Methods inherited from class ubic.gemma.core.util.AbstractCLI
addAutoOption, addAutoOption, addBatchOption, addDateOption, addErrorObject, addErrorObject, addErrorObject, addSuccessObject, addSuccessObject, addThreadsOption, allowPositionalArguments, buildStandardOptions, doWork, executeBatchTasks, executeCommand, getAutoSeekEventType, getBatchTaskExecutor, getBean, getBean, getLimitingDate, getNumThreads, getOptions, isAutoSeek, promptConfirmationOrAbort, setAllowPositionalArguments
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.core.util.CLI
getCommandName, getShortDesc
-
-
-
-
Field Detail
-
eeService
@Autowired protected ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentService eeService
-
auditTrailService
@Autowired protected ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService auditTrailService
-
auditEventService
@Autowired protected ubic.gemma.persistence.service.common.auditAndSecurity.AuditEventService auditEventService
-
expressionExperiments
protected final Set<ubic.gemma.model.expression.experiment.BioAssaySet> expressionExperiments
-
force
protected boolean force
Force processing of EEs regardless of their troubled status.
-
-
Method Detail
-
getCommandGroup
public GemmaCLI.CommandGroup getCommandGroup()
Description copied from interface:CLI
Obtain the command group for this CLI.
-
buildOptions
protected void buildOptions(org.apache.commons.cli.Options options)
Description copied from class:AbstractCLI
Build option implementation.Implement this method to add options to your command line, using the OptionBuilder.
This is called right after
AbstractCLI.buildStandardOptions(Options)
so the options will be added after standard options.- Specified by:
buildOptions
in classAbstractCLI
-
processOptions
protected void processOptions(org.apache.commons.cli.CommandLine commandLine) throws org.apache.commons.cli.ParseException
Description copied from class:AbstractCLI
Process command line options.Implement this to provide processing of options. It is called after
AbstractCLI.buildOptions(Options)
and right beforeAbstractCLI.doWork()
.- Specified by:
processOptions
in classAbstractCLI
- Throws:
org.apache.commons.cli.ParseException
- in case of unrecoverable failure (i.e. missing option or invalid value), an exception can be raised and will result in an exit code ofAbstractCLI.FAILURE
.
-
addForceOption
protected void addForceOption(org.apache.commons.cli.Options options)
-
noNeedToRun
protected boolean noNeedToRun(ubic.gemma.model.common.auditAndSecurity.Auditable auditable, Class<? extends ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType> eventClass)
- Parameters:
auditable
- auditableeventClass
- can be null- Returns:
- boolean
-
refreshExpressionExperimentFromGemmaWeb
protected void refreshExpressionExperimentFromGemmaWeb(ubic.gemma.model.expression.experiment.ExpressionExperiment ee, boolean refreshVectors, boolean refreshReports) throws Exception
Refresh a dataset for Gemma Web.- Throws:
Exception
-
setUseReferencesIfPossible
protected void setUseReferencesIfPossible(boolean useReferencesIfPossible)
Set this to true to allow reference to be retrieved instead of actual entities.This only works for entities retrieved by ID.
When this is enabled, do not access anything but
ExpressionExperiment.getId()
, or else proxy-initialization will be triggered, and you will have to deal with aLazyInitializationException
.The default is false.
-
-