Package ubic.gemma.apps
Class ArrayDesignSequenceManipulatingCli
- java.lang.Object
-
- ubic.gemma.cli.util.AbstractCLI
-
- ubic.gemma.cli.util.AbstractAuthenticatedCLI
-
- ubic.gemma.cli.util.AbstractAutoSeekingCLI<ubic.gemma.model.expression.arrayDesign.ArrayDesign>
-
- ubic.gemma.apps.ArrayDesignSequenceManipulatingCli
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
,org.springframework.context.EnvironmentAware
,CLI
- Direct Known Subclasses:
AffyProbeCollapseCli
,ArrayDesignAnnotationFileCli
,ArrayDesignAuditTrailCleanupCli
,ArrayDesignBioSequenceDetachCli
,ArrayDesignBlatCli
,ArrayDesignMapSummaryCli
,ArrayDesignMergeCli
,ArrayDesignProbeCleanupCLI
,ArrayDesignProbeMapperCli
,ArrayDesignProbeRenamerCli
,ArrayDesignRepeatScanCli
,ArrayDesignSequenceAssociationCli
,ArrayDesignSubsumptionTesterCli
,BioSequenceCleanupCli
public abstract class ArrayDesignSequenceManipulatingCli extends AbstractAutoSeekingCLI<ubic.gemma.model.expression.arrayDesign.ArrayDesign>
Aggregates functionality useful when writing CLIs that need to get an array design from the database and do something with it.- Author:
- pavlidis
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ubic.gemma.cli.util.CLI
CLI.CommandGroup
-
-
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 EntityLocator
entityLocator
-
Fields inherited from class ubic.gemma.cli.util.AbstractAutoSeekingCLI
FORCE_OPTION
-
Fields inherited from class ubic.gemma.cli.util.AbstractCLI
ABORTED, FAILURE, FAILURE_FROM_ERROR_OBJECTS, log, SUCCESS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ArrayDesignSequenceManipulatingCli()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
buildOptions(org.apache.commons.cli.Options options)
Build option implementation.protected ubic.gemma.core.analysis.report.ArrayDesignReportService
getArrayDesignReportService()
protected ubic.gemma.persistence.service.expression.arrayDesign.ArrayDesignService
getArrayDesignService()
protected Collection<ubic.gemma.model.expression.arrayDesign.ArrayDesign>
getArrayDesignsToProcess()
CLI.CommandGroup
getCommandGroup()
Obtain the command group for this CLI.protected boolean
isSubsumedOrMerged(ubic.gemma.model.expression.arrayDesign.ArrayDesign arrayDesign)
protected boolean
needToRun(Date skipIfLastRunLaterThan, ubic.gemma.model.expression.arrayDesign.ArrayDesign arrayDesign, Class<? extends ubic.gemma.model.common.auditAndSecurity.eventType.ArrayDesignAnalysisEvent> eventClass)
protected void
processOptions(org.apache.commons.cli.CommandLine commandLine)
Process command line options.protected boolean
shouldRun(Date skipIfLastRunLaterThan, ubic.gemma.model.expression.arrayDesign.ArrayDesign design, Class<? extends ubic.gemma.model.common.auditAndSecurity.eventType.ArrayDesignAnalysisEvent> cls)
protected Serializable
toBatchObject(ubic.gemma.model.expression.arrayDesign.ArrayDesign object)
Convert the given object to a serializable object for batch processing.-
Methods inherited from class ubic.gemma.cli.util.AbstractAutoSeekingCLI
addAutoOption, addAutoOption, addErrorObject, addErrorObject, addErrorObject, addForceOption, addForceOption, addLimitingDateOption, addSuccessObject, addSuccessObject, addWarningObject, addWarningObject, getAutoSeekEventType, getLimitingDate, isAutoSeek, isForce, noNeedToRun, setForce
-
Methods inherited from class ubic.gemma.cli.util.AbstractAuthenticatedCLI
afterPropertiesSet, createBatchTaskExecutorService, doAuthenticatedWork, doWork, setEnvironment, setRequireLogin
-
Methods inherited from class ubic.gemma.cli.util.AbstractCLI
abort, addBatchOption, addErrorObject, addErrorObject, addErrorObject, addSuccessObject, addSuccessObject, addThreadsOption, addWarningObject, addWarningObject, allowPositionalArguments, awaitBatchExecutorService, executeCommand, getApplicationContext, getBatchTaskExecutor, getCliContext, getCommandAliases, getCommandName, getHelpFooter, getNumThreads, getOptions, getShortDesc, getUsage, promptConfirmationOrAbort, setAllowPositionalArguments, setApplicationContext, setEstimatedMaxTasks, setReportFrequencyMillis
-
-
-
-
Field Detail
-
auditTrailService
@Autowired protected ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService auditTrailService
-
auditEventService
@Autowired protected ubic.gemma.persistence.service.common.auditAndSecurity.AuditEventService auditEventService
-
entityLocator
@Autowired protected EntityLocator entityLocator
-
-
Method Detail
-
getCommandGroup
public CLI.CommandGroup getCommandGroup()
Description copied from interface:CLI
Obtain the command group for this CLI.- Specified by:
getCommandGroup
in interfaceCLI
- Overrides:
getCommandGroup
in classAbstractCLI
-
getArrayDesignsToProcess
protected Collection<ubic.gemma.model.expression.arrayDesign.ArrayDesign> getArrayDesignsToProcess()
-
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.- Overrides:
buildOptions
in classAbstractCLI
-
processOptions
@OverridingMethodsMustInvokeSuper 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()
.- Overrides:
processOptions
in classAbstractAutoSeekingCLI<ubic.gemma.model.expression.arrayDesign.ArrayDesign>
- 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
.
-
getArrayDesignReportService
protected ubic.gemma.core.analysis.report.ArrayDesignReportService getArrayDesignReportService()
-
getArrayDesignService
protected ubic.gemma.persistence.service.expression.arrayDesign.ArrayDesignService getArrayDesignService()
-
toBatchObject
protected Serializable toBatchObject(@Nullable ubic.gemma.model.expression.arrayDesign.ArrayDesign object)
Description copied from class:AbstractAutoSeekingCLI
Convert the given object to a serializable object for batch processing.- Specified by:
toBatchObject
in classAbstractAutoSeekingCLI<ubic.gemma.model.expression.arrayDesign.ArrayDesign>
-
isSubsumedOrMerged
protected boolean isSubsumedOrMerged(ubic.gemma.model.expression.arrayDesign.ArrayDesign arrayDesign)
- Parameters:
arrayDesign
- the array design to check- Returns:
- true if the sequences on the given array design would be equivalently treated by analyzing another array design. In the case of subsumption, this only works if the array design has been either analyzed for subsuming status. (the analysis is not done as part of this call).
-
shouldRun
protected boolean shouldRun(Date skipIfLastRunLaterThan, ubic.gemma.model.expression.arrayDesign.ArrayDesign design, Class<? extends ubic.gemma.model.common.auditAndSecurity.eventType.ArrayDesignAnalysisEvent> cls)
-
needToRun
protected boolean needToRun(Date skipIfLastRunLaterThan, ubic.gemma.model.expression.arrayDesign.ArrayDesign arrayDesign, Class<? extends ubic.gemma.model.common.auditAndSecurity.eventType.ArrayDesignAnalysisEvent> eventClass)
- Parameters:
eventClass
- e.g., ArrayDesignSequenceAnalysisEvent.class- Returns:
- true if skipIfLastRunLaterThan is null, or there is no record of a previous analysis, or if the last analysis was run before skipIfLastRunLaterThan. false otherwise.
-
-