Interface BioAssayMetadataService
- All Known Implementing Classes:
BioAssayMetadataServiceImpl
public interface BioAssayMetadataService
Curator edits to the upstream-derived metadata on a sample:
libraryStrategy,
librarySelection and extractedMolecule.
Why this exists
GeoConverterImpl is the only other writer of these three columns, and it writes them once, at
import, from what GEO declared. GEO under-declares: ribosome profiling is routinely submitted as
OTHER, and GeoConverterImpl.effectiveLibStrategy only rescues the cases whose titles
say so unambiguously. Everything it deliberately leaves alone — TRAP, polysome purification, the arms
where GEO declared RNA-Seq outright — had no route to the column at all, so the alternative was
direct SQL, which emits no audit event and validates nothing.
Validation
libraryStrategy and extractedMolecule are checked against closed vocabularies.
🛑 librarySelection is NOT, and deliberately so: GeoSample.librarySelection is kept as
the submitter's raw string (cDNA, PCR, other) precisely so that normalizing to
a closed set cannot drop values the enum does not know. It is trimmed and length-checked only.-
Method Summary
Modifier and TypeMethodDescriptionWhatsetLibraryStrategy(ExpressionExperiment, Collection, String)will accept, for the 400 message and for callers that want to offer a menu.setExtractedMolecule(ExpressionExperiment ee, Collection<BioAssay> bioAssays, String value) SetextractedMoleculeon the given samples.setLibrarySelection(ExpressionExperiment ee, Collection<BioAssay> bioAssays, String value) SetlibrarySelectionon the given samples.setLibraryStrategy(ExpressionExperiment ee, Collection<BioAssay> bioAssays, String value) SetlibraryStrategyon the given samples.
-
Method Details
-
getValidLibraryStrategies
WhatsetLibraryStrategy(ExpressionExperiment, Collection, String)will accept, for the 400 message and for callers that want to offer a menu. -
setLibraryStrategy
Collection<BioAssay> setLibraryStrategy(ExpressionExperiment ee, Collection<BioAssay> bioAssays, @Nullable String value) SetlibraryStrategyon the given samples.- Parameters:
ee- the experiment the samples belong to; every assay must be one of its samplesbioAssays- the samples to changevalue- aGeoLibraryStrategyconstant name,MICROARRAY_ONE_COLORorMICROARRAY_TWO_COLOR, ornullto clear the field- Returns:
- the samples actually changed; empty when every sample already held
value - Throws:
IllegalArgumentException- ifvalueis not a known strategy
-
setLibrarySelection
Collection<BioAssay> setLibrarySelection(ExpressionExperiment ee, Collection<BioAssay> bioAssays, @Nullable String value) SetlibrarySelectionon the given samples. Free text by design — see the class javadoc.- Parameters:
value- trimmed;nullor blank clears the field- Returns:
- the samples actually changed
- Throws:
IllegalArgumentException- ifvalueexceeds the column length
-
setExtractedMolecule
Collection<BioAssay> setExtractedMolecule(ExpressionExperiment ee, Collection<BioAssay> bioAssays, @Nullable String value) SetextractedMoleculeon the given samples.- Parameters:
value- anExtractedMoleculeconstant name, ornullto clear the field- Returns:
- the samples actually changed
- Throws:
IllegalArgumentException- ifvalueis not a known molecule
-