Class ExperimentalDesignWriter
java.lang.Object
ubic.gemma.core.datastructure.matrix.io.ExperimentalDesignWriter
Output compatible with
ExperimentalDesignImporterImpl.- Author:
- keshav
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExperimentalDesignWriter(EntityUrlBuilder entityUrlBuilder, BuildInfo buildInfo, boolean autoFlush) -
Method Summary
Modifier and TypeMethodDescriptionvoidsetSeparateSampleFromAssaysIdentifiers(boolean separateSampleFromAssaysIdentifiers) If true, write the sample identifier and the assay(s) identifiers in separate columns.voidsetUseBioAssayIds(boolean useBioAssayIds) If true, use the IDs of theBioAssays (andBioMaterials.voidsetUseMultipleRowsForAssays(boolean useMultipleRowsForAssays) Write assays over multiple rows.voidsetUseRawColumnNames(boolean useRawColumnNames) If true, use column names as they appear in the database.voidwrite(ExpressionExperiment ee, Writer writer) Write the experimental design of the givenExpressionExperimentto the givenWriter.voidwrite(ExpressionExperiment ee, Collection<BioAssay> bioAssays, boolean writeBaseHeader, Writer writer) Write the experimental design of the givenExpressionExperimentto the givenWriterfor a given collection of assays.
-
Constructor Details
-
ExperimentalDesignWriter
public ExperimentalDesignWriter(EntityUrlBuilder entityUrlBuilder, BuildInfo buildInfo, boolean autoFlush)
-
-
Method Details
-
write
Write the experimental design of the givenExpressionExperimentto the givenWriter.- Throws:
IOException- See Also:
-
write
public void write(ExpressionExperiment ee, Collection<BioAssay> bioAssays, boolean writeBaseHeader, Writer writer) throws IOException Write the experimental design of the givenExpressionExperimentto the givenWriterfor a given collection of assays.- Parameters:
bioAssays- assays to write, the order is defined by the order of their corresponding biomaterials as perBioMaterial.COMPARATOR.writeBaseHeader- whether to write the base header (experiment URL, build info, etc.), seeExpressionDataWriterUtils.appendBaseHeader(ExpressionExperiment, String, String, BuildInfo, Date, Writer)for details- Throws:
IOException
-
setUseMultipleRowsForAssays
public void setUseMultipleRowsForAssays(boolean useMultipleRowsForAssays) Write assays over multiple rows.This simplifies merging the experimental design with the expression data as the "Bioassay" column will match exactly the columns of the matrix written by
MatrixWriter.If separating identifiers with
separateSampleFromAssaysIdentifiers,MatrixWriter.setExcludeSampleIdentifiers(boolean)can be used to match the "Assay" column instead. -
setSeparateSampleFromAssaysIdentifiers
public void setSeparateSampleFromAssaysIdentifiers(boolean separateSampleFromAssaysIdentifiers) If true, write the sample identifier and the assay(s) identifiers in separate columns.The column will be named "Sample" and "Assays" respectively. If
useMultipleRowsForAssaysis true, the assay column will be named "Assay".The default column name for mangled sample and assay identifiers is "Bioassay".
-
setUseBioAssayIds
public void setUseBioAssayIds(boolean useBioAssayIds) If true, use the IDs of theBioAssays (andBioMaterials. -
setUseRawColumnNames
public void setUseRawColumnNames(boolean useRawColumnNames) If true, use column names as they appear in the database.
-