Class ExperimentalDesignWriter

java.lang.Object
ubic.gemma.core.datastructure.matrix.io.ExperimentalDesignWriter

public class ExperimentalDesignWriter extends Object
Output compatible with ExperimentalDesignImporterImpl.
Author:
keshav
See Also:
  • Constructor Details

    • ExperimentalDesignWriter

      public ExperimentalDesignWriter(EntityUrlBuilder entityUrlBuilder, BuildInfo buildInfo, boolean autoFlush)
  • Method Details

    • write

      public void write(ExpressionExperiment ee, Writer writer) throws IOException
      Write the experimental design of the given ExpressionExperiment to the given Writer.
      Throws:
      IOException
      See Also:
    • write

      public void write(ExpressionExperiment ee, @Nullable QuantitationType quantitationType, @Nullable Class<? extends DataVector> vectorType, Collection<BioAssay> bioAssays, boolean writeBaseHeader, Writer writer) throws IOException
      Write the experimental design of the given ExpressionExperiment to the given Writer for a given collection of assays.
      Parameters:
      ee - experiment for which the design is being written
      quantitationType - the quantitation type for which the experimental design is being written, or null if not applicable. You want to use this when writing the design for a specific QT that might be applicable to a subset or sub-assays.
      vectorType - if a quantitation type is supplied, this indicate the type of data vectors
      bioAssays - assays to write, the order is defined by the order of their corresponding biomaterials as per BioMaterial.COMPARATOR.
      writeBaseHeader - whether to write the base header (experiment URL, build info, etc.), see ExpressionDataWriterUtils.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 useMultipleRowsForAssays is 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 the BioAssays (and BioMaterials.
    • setUseRawColumnNames

      public void setUseRawColumnNames(boolean useRawColumnNames)
      If true, use column names as they appear in the database.