Package ubic.gemma.core.apps
Class ArrayDesignSequenceManipulatingCli
- java.lang.Object
-
- ubic.gemma.core.util.AbstractCLI
-
- ubic.gemma.core.util.AbstractAuthenticatedCLI
-
- ubic.gemma.core.apps.ArrayDesignSequenceManipulatingCli
-
- All Implemented Interfaces:
CLI
- Direct Known Subclasses:
AffyProbeCollapseCli
,ArrayDesignAnnotationFileCli
,ArrayDesignAuditTrailCleanupCli
,ArrayDesignBioSequenceDetachCli
,ArrayDesignBlatCli
,ArrayDesignMapSummaryCli
,ArrayDesignMergeCli
,ArrayDesignProbeCleanupCLI
,ArrayDesignProbeMapperCli
,ArrayDesignProbeRenamerCli
,ArrayDesignRepeatScanCli
,ArrayDesignSequenceAssociationCli
,ArrayDesignSubsumptionTesterCli
,BioSequenceCleanupCli
public abstract class ArrayDesignSequenceManipulatingCli extends AbstractAuthenticatedCLI
Aggregates functionality useful when writing CLIs that need to get an array design from the database and do something with it.- Author:
- pavlidis
-
-
Field Summary
Fields Modifier and Type Field Description protected AuditTrailService
auditTrailService
-
Fields inherited from class ubic.gemma.core.util.AbstractCLI
ABORTED, FAILURE, FAILURE_FROM_ERROR_OBJECTS, log, SUCCESS
-
-
Constructor Summary
Constructors Constructor Description 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 ArrayDesignReportService
getArrayDesignReportService()
protected ArrayDesignService
getArrayDesignService()
protected Collection<ArrayDesign>
getArrayDesignsToProcess()
GemmaCLI.CommandGroup
getCommandGroup()
Obtain the command group for this CLI.protected boolean
isSubsumedOrMerged(ArrayDesign arrayDesign)
protected ArrayDesign
locateArrayDesign(String name)
protected void
processOptions(org.apache.commons.cli.CommandLine commandLine)
Process command line options.protected boolean
shouldRun(Date skipIfLastRunLaterThan, ArrayDesign design, Class<? extends ArrayDesignAnalysisEvent> cls)
-
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
-
auditTrailService
@Autowired protected AuditTrailService auditTrailService
-
-
Method Detail
-
getCommandGroup
public GemmaCLI.CommandGroup getCommandGroup()
Description copied from interface:CLI
Obtain the command group for this CLI.
-
getArrayDesignsToProcess
protected Collection<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.- 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
.
-
getArrayDesignReportService
protected ArrayDesignReportService getArrayDesignReportService()
-
getArrayDesignService
protected ArrayDesignService getArrayDesignService()
-
isSubsumedOrMerged
protected boolean isSubsumedOrMerged(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, ArrayDesign design, Class<? extends ArrayDesignAnalysisEvent> cls)
-
locateArrayDesign
protected ArrayDesign locateArrayDesign(String name)
- Parameters:
name
- of the array design to find.- Returns:
- an array design, if found. Bails otherwise with an error exit code
-
-