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 ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailServiceauditTrailService-
Fields inherited from class ubic.gemma.core.util.AbstractCLI
ABORTED, FAILURE, FAILURE_FROM_ERROR_OBJECTS, FOOTER, HEADER, log, SUCCESS
-
-
Constructor Summary
Constructors Constructor Description ArrayDesignSequenceManipulatingCli()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuildOptions(org.apache.commons.cli.Options options)Build option implementation.protected ubic.gemma.core.analysis.report.ArrayDesignReportServicegetArrayDesignReportService()protected ubic.gemma.persistence.service.expression.arrayDesign.ArrayDesignServicegetArrayDesignService()protected Collection<ubic.gemma.model.expression.arrayDesign.ArrayDesign>getArrayDesignsToProcess()GemmaCLI.CommandGroupgetCommandGroup()Obtain the command group for this CLI.protected booleanisSubsumedOrMerged(ubic.gemma.model.expression.arrayDesign.ArrayDesign arrayDesign)protected ubic.gemma.model.expression.arrayDesign.ArrayDesignlocateArrayDesign(String name)protected voidprocessOptions(org.apache.commons.cli.CommandLine commandLine)Process command line options.protected booleanshouldRun(Date skipIfLastRunLaterThan, ubic.gemma.model.expression.arrayDesign.ArrayDesign design, Class<? extends ubic.gemma.model.common.auditAndSecurity.eventType.ArrayDesignAnalysisEvent> cls)-
Methods inherited from class ubic.gemma.core.util.AbstractAuthenticatedCLI
executeBatchTasks, processStandardOptions, requireLogin
-
Methods inherited from class ubic.gemma.core.util.AbstractCLI
addAutoOption, addAutoOption, addBatchOption, addDateOption, addErrorObject, addErrorObject, addErrorObject, addSuccessObject, addSuccessObject, addThreadsOption, allowPositionalArguments, buildStandardOptions, doWork, executeCommand, getAutoSeekEventType, 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 ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService auditTrailService
-
-
Method Detail
-
getCommandGroup
public GemmaCLI.CommandGroup getCommandGroup()
Description copied from interface:CLIObtain the command group for this CLI.
-
getArrayDesignsToProcess
protected Collection<ubic.gemma.model.expression.arrayDesign.ArrayDesign> getArrayDesignsToProcess()
-
buildOptions
protected void buildOptions(org.apache.commons.cli.Options options)
Description copied from class:AbstractCLIBuild 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:
buildOptionsin classAbstractCLI
-
processOptions
protected void processOptions(org.apache.commons.cli.CommandLine commandLine) throws org.apache.commons.cli.ParseExceptionDescription copied from class:AbstractCLIProcess command line options.Implement this to provide processing of options. It is called after
AbstractCLI.buildOptions(Options)and right beforeAbstractCLI.doWork().- Specified by:
processOptionsin 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 ubic.gemma.core.analysis.report.ArrayDesignReportService getArrayDesignReportService()
-
getArrayDesignService
protected ubic.gemma.persistence.service.expression.arrayDesign.ArrayDesignService getArrayDesignService()
-
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)
-
locateArrayDesign
protected ubic.gemma.model.expression.arrayDesign.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
-
-