Class ExpressionDataWriterUtils

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

public class ExpressionDataWriterUtils extends Object
Utilities for writing expression data files.
Author:
keshav
  • Constructor Details

    • ExpressionDataWriterUtils

      public ExpressionDataWriterUtils()
  • Method Details

    • appendBaseHeader

      public static void appendBaseHeader(String fileTypeStr, BuildInfo buildInfo, Date timestamp, Writer buf) throws IOException
      Throws:
      IOException
    • appendBaseHeader

      public static void appendBaseHeader(ExpressionExperiment experiment, String fileTypeStr, @Nullable String experimentUrl, BuildInfo buildInfo, Date timestamp, Writer buf) throws IOException
      Appends base header information (about the experiment) to a file.
      Parameters:
      experiment - ee
      fileTypeStr - file type str
      experimentUrl - an URL for the expriment, or null to omit
      timestamp - timestamp to include in the header that reflect the time of file generation
      buf - buffer
      Throws:
      IOException
    • appendBaseHeader

      public static void appendBaseHeader(ExpressionExperiment experiment, QuantitationType quantitationType, Class<? extends DataVector> dataVectorType, String fileTypeStr, @Nullable String experimentUrl, BuildInfo buildInfo, Date timestamp, Writer buf) throws IOException
      Append base header information (about the experiment) to a file with some information about the quantitation type.
      Throws:
      IOException
    • formatQuantitationType

      public static String formatQuantitationType(QuantitationType quantitationType, Class<? extends DataVector> dataVectorType)
    • constructSampleName

      public static String constructSampleName(BioMaterial bm, BioAssay ba, boolean useIds, boolean useRawColumnNames)
      Construct a sample name in case there is only one BioAssay attached to the corresponding BioMaterial.
      See Also:
    • constructSampleName

      public static String constructSampleName(BioMaterial bioMaterial, boolean useIds, boolean useRawColumnNames)
    • constructAssaysName

      public static String constructAssaysName(Collection<BioAssay> bas, boolean useIds, boolean useRawColumnNames, char assayDelimiter)
    • constructSampleName

      public static String constructSampleName(BioMaterial bioMaterial, Collection<BioAssay> bioAssays, boolean useIds, boolean useRawColumnNames, char assayDelimiter)
      Construct a BioAssay column name prefixed by the BioMaterial from which it originates.
      Parameters:
      bioMaterial - the biomaterial
      bioAssays - the bioassay(s) associated to the biomaterial
      useIds - use biomaterial and bioassay IDs instead of names (or short names)
      useRawColumnNames - do not clean up the names with StringUtil.makeNames(String) to make them R-friendly
      assayDelimiter - the delimiter to use between bioassays, if that delimiter appears in the bioassay name, it will be replaced with a '_'. For this reason, this function does not allow '_' as a delimiter.
    • constructAssayName

      public static String constructAssayName(BioAssay ba, boolean useIds, boolean useRawColumnNames)
      Construct a BioAssay column name, unprefixed by the BioMaterial from which it originates.
    • constructCellIdName

      public static String constructCellIdName(BioAssay ba, String cellId, boolean useBioAssayIds, boolean useRawColumnNames)
      Construct a BioAssay column name, unprefixed by the BioMaterial from which it originates.
    • constructExperimentalFactorName

      public static String constructExperimentalFactorName(ExperimentalFactor ef)
      Construct an ExperimentalFactor column name.
      See Also:
    • constructExperimentalFactorNames

      public static String[] constructExperimentalFactorNames(List<ExperimentalFactor> factors)
      Construct an ExperimentalFactor column names for a list of factors.
      See Also: