|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.plugin.AbstractPlugin net.sf.basedb.core.plugin.AbstractExporterPlugin net.sf.basedb.plugins.BioAssaySetExporter
SerialBaseFileExporter
or MatrixBaseFileExporter
for BASEfile export and the extension package at http://baseplugins.thep.lu.se/wiki/net.sf.basedb.mev
for MeV export
public class BioAssaySetExporter
Exporter for bioassay sets. Supported formats: - Tab Delimited, Multiple Sample Files (TDMS Format) for use in MeV (available from http://www.tm4.org). - BASEfile. - Plain Matrix, see documentation for exportPlainMatrix method for a description of the format.
Nested Class Summary | |
---|---|
static class |
BioAssaySetExporter.QueryItem
Deprecated. |
private static class |
BioAssaySetExporter.QueryItemTitleComparator
Deprecated. |
Nested classes/interfaces inherited from interface net.sf.basedb.core.plugin.Plugin |
---|
Plugin.MainType |
Fields inherited from class net.sf.basedb.core.plugin.AbstractExporterPlugin |
---|
optionalSaveAsType, OVERWRITE, overwriteType, requiredSaveAsType, SAVE_AS |
Fields inherited from class net.sf.basedb.core.plugin.AbstractPlugin |
---|
annotationSection, configuration, COPY_ANNOTATIONS, job, OVERWRITE_ANNOTATIONS, sc |
Constructor Summary | |
---|---|
BioAssaySetExporter()
Deprecated. |
Method Summary | |
---|---|
protected void |
begin(DbControl dc)
Deprecated. Called just before the export starts. |
void |
configure(GuiContext context,
Request request,
Response response)
Deprecated. Configure the plugin. |
protected void |
end(boolean success)
Deprecated. Called just after everything has been committed to the database, or immediately after an error has ocurred. |
void |
exportBaseFileMatrix(BioAssaySet bas,
File file,
Map<String,String> parameters,
List<String> reporterFields,
List<String> spotFields,
Boolean mergeReporters)
Deprecated. In 2.11 and 2.12, use MatrixBaseFileExporter instead |
void |
exportBaseFileMatrix(BioAssaySet bas,
File file,
Map<String,String> parameters,
List<String> reporterFields,
List<String> spotFields,
Boolean mergeReporters,
ProgressReporter progress)
Deprecated. In 2.12, use MatrixBaseFileExporter instead |
void |
exportBaseFileMatrix(BioAssaySet bas,
OutputStream os,
Map<String,String> parameters,
List<String> reporterFields,
List<String> spotFields,
boolean mergeReporters)
Deprecated. In 2.11 and 2.12, use MatrixBaseFileExporter instead. |
void |
exportBaseFileMatrix(BioAssaySet bas,
OutputStream os,
Map<String,String> parameters,
List<String> reporterFields,
List<String> spotFields,
boolean mergeReporters,
ProgressReporter progress)
Deprecated. In 2.11 and 2.12, use MatrixBaseFileExporter instead. |
private void |
exportBaseFileSectionAssays(PrintWriter out,
DbControl dc,
BioAssaySet bas)
Deprecated. |
private void |
exportBaseFileSectionHead(PrintWriter out,
Map<String,String> parameters)
Deprecated. |
private void |
exportBaseFileSectionSpots(PrintWriter out,
DbControl dc,
BioAssaySet bas,
DynamicSpotQuery query,
List<String> reporterFields,
List<String> spotFields,
List<BioAssay> assays,
Map<String,BioAssaySetExporter.QueryItem> qi,
long count,
boolean mergeOnReporters,
Map<Integer,String> reporterLine,
ProgressReporter progress)
Deprecated. |
void |
exportBaseFileSerial(BioAssaySet bas,
File file,
Map<String,String> parameters,
List<String> reporterFields,
List<String> spotFields,
Boolean mergeReporters)
Deprecated. In 2.11 and 2.12, use SerialBaseFileExporter instead. |
void |
exportBaseFileSerial(BioAssaySet bas,
File file,
Map<String,String> parameters,
List<String> reporterFields,
List<String> spotFields,
Boolean mergeReporters,
ProgressReporter progress)
Deprecated. In 2.12, use SerialBaseFileExporter instead. |
void |
exportBaseFileSerial(BioAssaySet bas,
OutputStream os,
Map<String,String> parameters,
List<String> reporterFields,
List<String> spotFields,
boolean mergeReporters)
Deprecated. In 2.11 and 2.12, use SerialBaseFileExporter instead. |
void |
exportBaseFileSerial(BioAssaySet bas,
OutputStream os,
Map<String,String> parameters,
List<String> reporterFields,
List<String> spotFields,
boolean mergeReporters,
ProgressReporter progress)
Deprecated. In 2.12, use SerialBaseFileExporter instead. |
void |
exportMeV(BioAssaySet bioassayset,
OutputStream to,
ProgressReporter progress)
Deprecated. In 2.12, use extension package found at http://baseplugins.thep.lu.se/wiki/net.sf.basedb.mev instead |
void |
exportPlainMatrix(BioAssaySet bioassayset,
OutputStream os,
ProgressReporter progress)
Deprecated. In 2.12, no direct replacement, write a subclass of AbstractBioAssaySetExporter instead |
About |
getAbout()
Deprecated. Get information about the plugin, such as name, version, authors, etc. |
private List<BioAssaySetExporter.QueryItem> |
getBaseFileExtraQI(DbControl dc,
BioAssaySet bas)
Deprecated. |
private List<BioAssaySetExporter.QueryItem> |
getBaseFileFormulaQI(DbControl dc,
BioAssaySet bas)
Deprecated. |
private Map<String,BioAssaySetExporter.QueryItem> |
getBaseFileQIMap(DbControl dc,
BioAssaySet bas)
Deprecated. |
private List<BioAssaySetExporter.QueryItem> |
getBaseFileRawQI(BioAssaySet bas)
Deprecated. |
private Map<Integer,String> |
getBaseFileReporterFields(DbControl dc,
BioAssaySet bas,
DynamicPositionQuery query,
Map<String,BioAssaySetExporter.QueryItem> queryMap,
List<String> reporterFields,
boolean mergeOnReporters)
Deprecated. |
private List<BioAssaySetExporter.QueryItem> |
getBaseFileReporterQI()
Deprecated. |
private List<BioAssaySetExporter.QueryItem> |
getBaseFileSpotQI(BioAssaySet bas)
Deprecated. |
private long |
getBaseFileSpotSectionCount(DbControl dc,
DynamicSpotQuery count,
boolean mergeReporters)
Deprecated. |
private RequestInformation |
getConfigureBasefileParameters(GuiContext context)
Deprecated. |
private RequestInformation |
getConfigureJobParameters(GuiContext context,
Boolean requireFile)
Deprecated. |
List<AnnotationType> |
getExperimentalFactors(DbControl dc,
BioAssaySet bas)
Deprecated. |
Set<GuiContext> |
getGuiContexts()
Deprecated. Get a set containing all items that the plugin handles. |
Plugin.MainType |
getMainType()
Deprecated. Get the type of the plugin. |
Collection<Permissions> |
getPermissions()
Deprecated. Request create and write access to File:s and Directory:s and read access to Experiment:s and User:s. |
RequestInformation |
getRequestInformation(GuiContext context,
String command)
Deprecated. This method will return the RequestInformation for a given command, i.e. |
SignalHandler |
getSignalHandler()
Deprecated. Get the signal handler that is handling signals on behalf of this object. |
protected String |
getSuccessMessage()
Deprecated. Called if the export was successful to let the subclass generate a simple message that is sent back to the core and user interface. |
String |
isInContext(GuiContext context,
Object item)
Deprecated. Check if the plugin can be used on the specified object. |
protected void |
performExport(ExportOutputStream out,
ProgressReporter progress)
Deprecated. Perform the export. |
boolean |
requiresConfiguration()
Deprecated. Returns FALSE, since that is how the plugins used to work before this method was introduced. |
boolean |
supportsConfigurations()
Deprecated. Returns TRUE, since that is how the plugins used to work before this method was introduced. |
Methods inherited from class net.sf.basedb.core.plugin.AbstractExporterPlugin |
---|
doExport, getOverwrite, getOverwriteParameter, getSaveAsParameter, getSaveAsPath, getSaveTo, pathCanBeUsed, run |
Methods inherited from class net.sf.basedb.core.plugin.AbstractPlugin |
---|
checkInterrupted, cloneParameterWithDefaultValue, closeLogFile, createLogFile, done, getCopyAnnotationsParmeter, getCurrentConfiguration, getCurrentJob, getJobOrConfigurationValue, getOverwriteAnnotationsParameters, init, log, log, storeValue, storeValue, storeValues, validateRequestParameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.basedb.core.plugin.Plugin |
---|
done, init, run |
Field Detail |
---|
private ThreadSignalHandler signalHandler
private DbControl dc
private BioAssaySet bas
private static final About about
private RequestInformation configureJob
private RequestInformation configureJobBasefile
private static final Set<GuiContext> guiContexts
private static final Set<Permissions> permissions
private PluginParameter<BioAssaySet> bioAssaySetParameter
private PluginParameter<String> formatParameter
private PluginParameter<Boolean> geneAveragesParameter
private PluginParameter<String> usedFieldsParameter
private PluginParameter<String> usedColumnsParameter
private static final String COMMAND_CONFIGURE_BASEFILE
private static final String FORMAT_BASEFILE_SERIAL
private static final String FORMAT_BASEFILE_MATRIX
private static final String FORMAT_MEV_TDMS
private static final String FORMAT_PLAIN_MATRIX
private static final Set<String> FORMAT_BASEFILES
Constructor Detail |
---|
public BioAssaySetExporter()
Method Detail |
---|
public void configure(GuiContext context, Request request, Response response)
InteractivePlugin
InteractivePlugin.getRequestInformation(GuiContext, String)
.
configure
in interface InteractivePlugin
context
- The current context of the client application,
it is one of the values found in set returned by InteractivePlugin.getGuiContexts()
request
- Request object with the command and parametersresponse
- Response object in for the plugin to response
throughpublic SignalHandler getSignalHandler()
SignalTarget
getSignalHandler
in interface SignalTarget
public void exportBaseFileMatrix(BioAssaySet bas, File file, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, Boolean mergeReporters) throws IOException, SQLException
MatrixBaseFileExporter
instead
IOException
SQLException
public void exportBaseFileMatrix(BioAssaySet bas, File file, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, Boolean mergeReporters, ProgressReporter progress) throws IOException, SQLException
MatrixBaseFileExporter
instead
reporterFields
and spotFields
parameter
must identify the data to export.
The reporterFields
parameter supports the following:
rep.<property> | The reporter property with the specified name, for example: rep.externalId, rep.symbol or a property defined in the extended properties file. |
spotFields
parameter supports the following:
intensityN | The intensity in channel N |
position | The position number for this spot in the data matrix |
raw.<property> | The raw data property with the specified name, for example: raw.x, raw.row or a property defined by the raw data type. |
frm.<id> | The value of the formula with the specified ID. |
xtra.<externalId> | The value of the extra value with the specified external ID. |
bas
- The bioassayset to exportfile
- The file to export toparameters
- Header information that should go at the top of
the BASEfilereporterFields
- The reporter fields that should be exporteredspotFields
- The spot fields that should be exportedmergeReporters
- TRUE to merge spot data having the same reporter
(currently not supported)progress
- An optional progress reporter
IOException
- If there is an IO error
SQLException
- If there is an error reading from the databasepublic void exportBaseFileMatrix(BioAssaySet bas, OutputStream os, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, boolean mergeReporters) throws IOException, SQLException
MatrixBaseFileExporter
instead.
IOException
SQLException
public void exportBaseFileMatrix(BioAssaySet bas, OutputStream os, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, boolean mergeReporters, ProgressReporter progress) throws IOException, SQLException
MatrixBaseFileExporter
instead.
IOException
SQLException
private void exportBaseFileSectionAssays(PrintWriter out, DbControl dc, BioAssaySet bas)
private void exportBaseFileSectionHead(PrintWriter out, Map<String,String> parameters)
public void exportBaseFileSerial(BioAssaySet bas, File file, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, Boolean mergeReporters) throws IOException, SQLException
SerialBaseFileExporter
instead.
IOException
SQLException
public void exportBaseFileSerial(BioAssaySet bas, File file, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, Boolean mergeReporters, ProgressReporter progress) throws IOException, SQLException
SerialBaseFileExporter
instead.
exportBaseFileMatrix(BioAssaySet, File, Map, List, List, Boolean)
for information about the naming of parameters.
bas
- The bioassayset to exportfile
- The file to export toparameters
- Header information that should go at the top of
the BASEfilereporterFields
- The reporter fields that should be exporteredspotFields
- The spot fields that should be exportedmergeReporters
- TRUE to merge spot data having the same reporter
(currently not supported)progress
- An optional progress reporter
IOException
- If there is an IO error
SQLException
- If there is an error reading from the databasepublic void exportBaseFileSerial(BioAssaySet bas, OutputStream os, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, boolean mergeReporters) throws IOException, SQLException
SerialBaseFileExporter
instead.
IOException
SQLException
public void exportBaseFileSerial(BioAssaySet bas, OutputStream os, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, boolean mergeReporters, ProgressReporter progress) throws IOException, SQLException
SerialBaseFileExporter
instead.
IOException
SQLException
private void exportBaseFileSectionSpots(PrintWriter out, DbControl dc, BioAssaySet bas, DynamicSpotQuery query, List<String> reporterFields, List<String> spotFields, List<BioAssay> assays, Map<String,BioAssaySetExporter.QueryItem> qi, long count, boolean mergeOnReporters, Map<Integer,String> reporterLine, ProgressReporter progress) throws SQLException
SQLException
public void exportMeV(BioAssaySet bioassayset, OutputStream to, ProgressReporter progress) throws IOException, SQLException
bioassayset
- The bioassayset to exportto
- The stream to write the exported data toprogress
- An optional progress reporter
IOException
- If there is an IO error
SQLException
- If there is an error reading from the databasepublic void exportPlainMatrix(BioAssaySet bioassayset, OutputStream os, ProgressReporter progress) throws IOException, SQLException
AbstractBioAssaySetExporter
instead
bioassayset
- The bioassayset to exportos
- The stream to write the exported data toprogress
- An optional progress reporter
IOException
- If there is an IO error
SQLException
- If there is an error reading from the databasepublic About getAbout()
Plugin
getAbout
in interface Plugin
About
objectprivate long getBaseFileSpotSectionCount(DbControl dc, DynamicSpotQuery count, boolean mergeReporters)
private Map<Integer,String> getBaseFileReporterFields(DbControl dc, BioAssaySet bas, DynamicPositionQuery query, Map<String,BioAssaySetExporter.QueryItem> queryMap, List<String> reporterFields, boolean mergeOnReporters) throws SQLException
SQLException
private List<BioAssaySetExporter.QueryItem> getBaseFileExtraQI(DbControl dc, BioAssaySet bas)
private List<BioAssaySetExporter.QueryItem> getBaseFileFormulaQI(DbControl dc, BioAssaySet bas)
private Map<String,BioAssaySetExporter.QueryItem> getBaseFileQIMap(DbControl dc, BioAssaySet bas)
private List<BioAssaySetExporter.QueryItem> getBaseFileRawQI(BioAssaySet bas)
private List<BioAssaySetExporter.QueryItem> getBaseFileReporterQI()
private List<BioAssaySetExporter.QueryItem> getBaseFileSpotQI(BioAssaySet bas)
private RequestInformation getConfigureBasefileParameters(GuiContext context)
private RequestInformation getConfigureJobParameters(GuiContext context, Boolean requireFile)
public List<AnnotationType> getExperimentalFactors(DbControl dc, BioAssaySet bas)
public Set<GuiContext> getGuiContexts()
InteractivePlugin
Item.REPORTER
.
This information is used by client applications to put the plugin
in the proper place in the user interface.
getGuiContexts
in interface InteractivePlugin
Set
containing Item
:s, or null
if the plugin is not concerned about itemspublic Plugin.MainType getMainType()
Plugin
getMainType
in interface Plugin
getMainType
in class AbstractExporterPlugin
public Collection<Permissions> getPermissions()
getPermissions
in interface Plugin
getPermissions
in class AbstractPlugin
public RequestInformation getRequestInformation(GuiContext context, String command) throws BaseException
InteractivePlugin
RequestInformation
for a given command, i.e.
the list of parameters and some nice help text.
getRequestInformation
in interface InteractivePlugin
context
- The current context of the client application,
it is one of the values found in set returned by InteractivePlugin.getGuiContexts()
command
- The command
RequestInformation
for the command
BaseException
- if there is an errorpublic String isInContext(GuiContext context, Object item)
InteractivePlugin
BasicItem
or BasicData
object, or null if called from
a list context. A client application should only call this method for
contexts matching one of
the contexts in the set returned by the InteractivePlugin.getGuiContexts()
method. For GuiContext.Type.ITEM
contexts an item
of the correct type should be passed as a parameter.
The plug-in can response with a null value indicating success, a warning-level message or throw an exception to indicate an error-level message. Client application should normally only show error-level messages to users, unless the user has requested to see warning messages.
NOTE! Before BASE 2.4 all messages were treated as error-level messages.
isInContext
in interface InteractivePlugin
context
- The current context of the client application,
it is one of the values found in set returned by InteractivePlugin.getGuiContexts()
item
- The currently active item, it's type should match the
GuiContext.getItem()
type, or null if the context is a list
context
Null
if the plugin can use that item, or
a warning-level message explaining why the plugin can't be usedpublic boolean requiresConfiguration()
AbstractPlugin
requiresConfiguration
in interface Plugin
requiresConfiguration
in class AbstractPlugin
protected void begin(DbControl dc)
AbstractExporterPlugin
begin
in class AbstractExporterPlugin
dc
- The DbControl that is used to write to the database.
A subclass may use this read from the database as wellAbstractExporterPlugin.end(boolean)
protected void performExport(ExportOutputStream out, ProgressReporter progress) throws IOException
AbstractExporterPlugin
ImmediateDownloadExporter.doExport(ExportOutputStream, ProgressReporter)
method.
performExport
in class AbstractExporterPlugin
out
- Output stream to write the exported data toprogress
- An optional progress reporter
IOException
protected void end(boolean success)
AbstractExporterPlugin
AbstractExporterPlugin.begin(DbControl)
method here.
end
in class AbstractExporterPlugin
success
- TRUE if the file was parsed successfully, FALSE otherwiseAbstractExporterPlugin.begin(DbControl)
protected String getSuccessMessage()
AbstractExporterPlugin
178 reporters exported successfully
.
The default implementation always return null.
getSuccessMessage
in class AbstractExporterPlugin
public boolean supportsConfigurations()
AbstractPlugin
supportsConfigurations
in interface Plugin
supportsConfigurations
in class AbstractPlugin
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |