Class ExpressionDataWriterUtils
java.lang.Object
ubic.gemma.core.datastructure.matrix.io.ExpressionDataWriterUtils
Utilities for writing expression data files.
- Author:
- keshav
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendBaseHeader(String fileTypeStr, BuildInfo buildInfo, Date timestamp, Writer buf) static voidappendBaseHeader(ExpressionExperiment experiment, String fileTypeStr, String experimentUrl, BuildInfo buildInfo, Date timestamp, Writer buf) Appends base header information (about the experiment) to a file.static voidappendBaseHeader(ExpressionExperiment experiment, QuantitationType quantitationType, Class<? extends DataVector> dataVectorType, String fileTypeStr, String experimentUrl, BuildInfo buildInfo, Date timestamp, Writer buf) Append base header information (about the experiment) to a file with some information about the quantitation type.static StringconstructAssayName(BioAssay ba, boolean useIds, boolean useRawColumnNames) Construct a BioAssay column name, unprefixed by theBioMaterialfrom which it originates.static StringconstructAssaysName(Collection<BioAssay> bas, boolean useIds, boolean useRawColumnNames, char assayDelimiter) static StringconstructCellIdName(BioAssay ba, String cellId, boolean useBioAssayIds, boolean useRawColumnNames) Construct a BioAssay column name, unprefixed by theBioMaterialfrom which it originates.static StringConstruct an ExperimentalFactor column name.static String[]Construct an ExperimentalFactor column names for a list of factors.static StringconstructSampleName(BioMaterial bioMaterial, boolean useIds, boolean useRawColumnNames) static StringconstructSampleName(BioMaterial bioMaterial, Collection<BioAssay> bioAssays, boolean useIds, boolean useRawColumnNames, char assayDelimiter) Construct a BioAssay column name prefixed by theBioMaterialfrom which it originates.static StringconstructSampleName(BioMaterial bm, BioAssay ba, boolean useIds, boolean useRawColumnNames) Construct a sample name in case there is only one BioAssay attached to the corresponding BioMaterial.static StringformatQuantitationType(QuantitationType quantitationType, Class<? extends DataVector> dataVectorType)
-
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- eefileTypeStr- file type strexperimentUrl- an URL for the expriment, or null to omittimestamp- timestamp to include in the header that reflect the time of file generationbuf- 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 theBioMaterialfrom which it originates.- Parameters:
bioMaterial- the biomaterialbioAssays- the bioassay(s) associated to the biomaterialuseIds- use biomaterial and bioassay IDs instead of names (or short names)useRawColumnNames- do not clean up the names withStringUtil.makeNames(String)to make them R-friendlyassayDelimiter- 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
Construct a BioAssay column name, unprefixed by theBioMaterialfrom which it originates. -
constructCellIdName
public static String constructCellIdName(BioAssay ba, String cellId, boolean useBioAssayIds, boolean useRawColumnNames) Construct a BioAssay column name, unprefixed by theBioMaterialfrom which it originates. -
constructExperimentalFactorName
Construct an ExperimentalFactor column name.- See Also:
-
constructExperimentalFactorNames
Construct an ExperimentalFactor column names for a list of factors.- See Also:
-