public abstract class AbstractAnalysisPlugin extends AbstractPlugin
Plugin.MainType
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CHILD_DESCRIPTION
The name of the parameter that asks for the description of the child bioassay set.
|
protected static java.lang.String |
CHILD_NAME
The name of the parameter that asks for the name of the child bioassay set.
|
protected static GuiContext |
CONTEXT_BIOASSAYS
GuiContext = [Item.BIOASSAY, GuiContext.Type.LIST]
|
protected static GuiContext |
CONTEXT_BIOASSAYSET
GuiContext = [Item.BIOASSAYSET, GuiContext.Type.ITEM]
|
protected static GuiContext |
CONTEXT_DERIVEDBIOASSAY
GuiContext = [Item.DERIVEDBIOASSAY, GuiContext.Type.ITEM]
|
protected static java.util.Set<GuiContext> |
defaultGuiContexts
The default gui contexts where it makes sense to use an analysis plugin.
|
private static StringParameterType |
descriptionType
A parameter type for description parameters.
|
protected static StringParameterType |
nameType
A parameter type for name parameters which are required and must have a value.
|
protected static StringParameterType |
optionalNameType
A parameter type for name parameters which are optional.
|
protected static java.lang.String |
SOURCE_BIOASSAYS |
protected static java.lang.String |
SOURCE_BIOASSAYSET |
protected static java.lang.String |
SOURCE_DERIVEDBIOASSAY |
private PluginParameter<BioAssaySet> |
sourceBioAssaySetParameter
The source parameter for bioassay set.
|
private static ItemParameterType<BioAssaySet> |
sourceBioAssaySetType
The parameter type for the source bioassay set.
|
private PluginParameter<DerivedBioAssay> |
sourceDerivedBioAssayParameter
The source parameter for derived bioassay.
|
private static ItemParameterType<DerivedBioAssay> |
sourceDerivedBioAssayType
The parameter type for the source derived bioassay.
|
private PluginParameter<BioAssay> |
sourceSubSetParameter
The bioAssays subset parameter.
|
protected static java.lang.String |
TRANSFORMATION_NAME
The name of the parameter that asks for the name of the transformation.
|
annotationSection, configuration, COPY_ANNOTATIONS, job, OVERWRITE_ANNOTATIONS, sc
Modifier | Constructor and Description |
---|---|
protected |
AbstractAnalysisPlugin()
Create a new
AbstractAnalysisPlugin . |
Modifier and Type | Method and Description |
---|---|
protected PluginParameter<java.lang.String> |
getChildDescriptionParameter(java.lang.String label,
java.lang.String description,
java.lang.String defaultValue)
Create a plugin parameter that asks for the description of the child bioassay set.
|
protected PluginParameter<java.lang.String> |
getChildNameParameter(java.lang.String label,
java.lang.String description,
java.lang.String defaultValue)
Create a plugin parameter that asks for the name of the child bioassay set.
|
protected BioAssaySet |
getCurrentBioAssaySet(DbControl dc)
Get the current source bioassay set.
|
protected DerivedBioAssay |
getCurrentDerivedBioAssay(DbControl dc)
Get the current source derived bioassay.
|
protected Experiment |
getCurrentExperiment(DbControl dc)
Get the current experiment from information in the current context:
SessionControl.getCurrentContext(Item.EXPERIMENT) . |
java.util.Set<GuiContext> |
getGuiContexts() |
Plugin.MainType |
getMainType()
Get the type of the plugin.
|
protected java.util.List<BioAssay> |
getSourceBioAssays(DbControl dc)
Gets a list of bioassays that were selected from the current bioassay set, to use for the analysis.
|
protected BioAssaySet |
getSourceBioAssaySet(DbControl dc)
Get the bioassay set that is used as the source for the plugin.
|
protected PluginParameter<BioAssaySet> |
getSourceBioAssaySetParameter(java.lang.String label,
java.lang.String description)
Get a plugin parameter that asks for a bioassay set to use as data source for
the plugin.
|
protected PluginParameter<BioAssay> |
getSourceBioAssaysParameter(java.lang.String label,
java.lang.String description)
Gets a plugin parameter that asks for a subset of bioassays to use as data source
for the plugin.
|
protected DerivedBioAssay |
getSourceDerivedBioAssay(DbControl dc)
Get the derived bioassay that is used as the source for the plugin.
|
protected PluginParameter<DerivedBioAssay> |
getSourceDerivedBioAssayParameter(java.lang.String label,
java.lang.String description)
Get a plugin parameter that asks for a derived bioassay to use as data source for
the plugin.
|
protected java.lang.String |
getTransformationName(DbControl dc)
Generate a name for the transformation based on the plugin and it's
configuration.
|
protected PluginParameter<java.lang.String> |
getTransformationNameParameter(java.lang.String label,
java.lang.String description,
java.lang.String defaultValue)
Create a plugin parameter that asks for the name of the transformation.
|
java.lang.String |
isInContext(GuiContext context,
java.lang.Object item)
Check that the item is a bioassayset/derived bioassay and that the
logged in user has permission to use the current item.
|
protected DynamicSpotQuery |
restrictSource(DynamicSpotQuery query,
java.util.List<BioAssay> bioAssays)
Restricts a query to only include values from listed bioassays
|
cloneParameterWithDefaultValue, closeLogFile, createLogFile, done, getCopyAnnotationsParmeter, getCurrentConfiguration, getCurrentJob, getJobOrConfigurationValue, getOverwriteAnnotationsParameters, getPermissions, init, log, log, requiresConfiguration, storeValue, storeValue, storeValues, supportsConfigurations, validateRequestParameters
protected static final GuiContext CONTEXT_BIOASSAYSET
protected static final GuiContext CONTEXT_BIOASSAYS
protected static final GuiContext CONTEXT_DERIVEDBIOASSAY
protected static final java.util.Set<GuiContext> defaultGuiContexts
InteractivePlugin.getGuiContexts()
method to
specify other contexts. This set can't be modified. This set only
includes the CONTEXT_BIOASSAYSET
.protected static final StringParameterType nameType
protected static final StringParameterType optionalNameType
private static final StringParameterType descriptionType
private static final ItemParameterType<BioAssaySet> sourceBioAssaySetType
private PluginParameter<BioAssaySet> sourceBioAssaySetParameter
private static final ItemParameterType<DerivedBioAssay> sourceDerivedBioAssayType
private PluginParameter<DerivedBioAssay> sourceDerivedBioAssayParameter
getSourceDerivedBioAssayParameter(String, String)
private PluginParameter<BioAssay> sourceSubSetParameter
protected static final java.lang.String SOURCE_BIOASSAYSET
protected static final java.lang.String SOURCE_DERIVEDBIOASSAY
protected static final java.lang.String SOURCE_BIOASSAYS
protected static final java.lang.String CHILD_NAME
protected static final java.lang.String CHILD_DESCRIPTION
protected static final java.lang.String TRANSFORMATION_NAME
protected AbstractAnalysisPlugin()
AbstractAnalysisPlugin
.public Plugin.MainType getMainType()
Plugin
Plugin.MainType.ANALYZE
public java.util.Set<GuiContext> getGuiContexts()
public java.lang.String isInContext(GuiContext context, java.lang.Object item)
context
- Current guicontextitem
- The item to check.PermissionDeniedException
- If the logged in user dosen't have
permission to use the Experimentprotected PluginParameter<BioAssaySet> getSourceBioAssaySetParameter(java.lang.String label, java.lang.String description)
label
- The parameter label, or null to use the default (Source bioasay set)description
- The parameter description, or null to use the default
(The bioassay set that is used as the data source for this job.)protected PluginParameter<DerivedBioAssay> getSourceDerivedBioAssayParameter(java.lang.String label, java.lang.String description)
label
- The parameter label, or null to use the default (Source bioassay)description
- The parameter description, or null to use the default
(The derived bioassay that is used as the data source for this job.)protected PluginParameter<BioAssay> getSourceBioAssaysParameter(java.lang.String label, java.lang.String description)
label
- The parameter's label. Uses a default value if null.description
- Description of the parameter. Uses a default value if null.protected PluginParameter<java.lang.String> getChildNameParameter(java.lang.String label, java.lang.String description, java.lang.String defaultValue)
label
- The label to use for the parameter or null to use the default label
(Child name)description
- The description to use for the parameter or null to use the
default description (The name of the child bioassay set)defaultValue
- The default value for the child name or null to use
the default value (New bioassay set)protected PluginParameter<java.lang.String> getChildDescriptionParameter(java.lang.String label, java.lang.String description, java.lang.String defaultValue)
label
- The label to use for the parameter or null to use the default label
(Child description)description
- The description to use for the parameter or null to use the
default description (An optional description of the child bioassay set)defaultValue
- The default value for the child name or null to not use any
default valueprotected PluginParameter<java.lang.String> getTransformationNameParameter(java.lang.String label, java.lang.String description, java.lang.String defaultValue)
label
- The label to use for the parameter or null to use the default label
(Transformation name)description
- The description to use for the parameter or null to use the
default description (The name of the transformation)defaultValue
- The default value for the transformation name or null to not
use any defaultprotected Experiment getCurrentExperiment(DbControl dc)
SessionControl.getCurrentContext(Item.EXPERIMENT)
. Note
that this information is normally only available during the configuration
phase of a plugin, not during the execution phase.dc
- The DbControl to use for database accessprotected BioAssaySet getCurrentBioAssaySet(DbControl dc)
getSourceBioAssaySet(DbControl)
method. If this
returns null we check the information in the current context:
SessionControl.getCurrentContext(Item.BIOASSAYSET)
. Note
that this information is normally only available during the configuration
phase of a plugin, not during the execution phase.dc
- The DbControl to use for database accessgetSourceBioAssaySet(DbControl)
protected BioAssaySet getSourceBioAssaySet(DbControl dc)
getSourceBioAssaySetParameter(String, String)
protected java.util.List<BioAssay> getSourceBioAssays(DbControl dc)
dc
- The DbControl to access the database withprotected DerivedBioAssay getCurrentDerivedBioAssay(DbControl dc)
getSourceDerivedBioAssay(DbControl)
method. If this
returns null we check the information in the current context:
SessionControl.getCurrentContext(Item.DERIVEDBIOASSAY)
. Note
that this information is normally only available during the configuration
phase of a plugin, not during the execution phase.dc
- The DbControl to use for database accessgetSourceBioAssaySet(DbControl)
protected DerivedBioAssay getSourceDerivedBioAssay(DbControl dc)
getSourceDerivedBioAssayParameter(String, String)
protected java.lang.String getTransformationName(DbControl dc)
About.getName()
method and combine it with the configuration used.
If no configuration is used only the plugin name is used.dc
- The DbControl to use for database accessprotected DynamicSpotQuery restrictSource(DynamicSpotQuery query, java.util.List<BioAssay> bioAssays)
query
- The query to set restriction onbioAssays
- A list with bioassays the restriction should include