Class MZTabParserContext
- java.lang.Object
-
- uk.ac.ebi.pride.jmztab2.utils.parser.MZTabParserContext
-
public class MZTabParserContext extends Object
MZTabParserContext is used to keep track of indexed elements and interrelations during parsing.
- Since:
- 11/09/17
- Author:
- nilshoffmann
-
-
Constructor Summary
Constructors Constructor Description MZTabParserContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.isas.mztab2.model.Assay
addAssay(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Assay assay)
Add a assay into metadata.de.isas.mztab2.model.Assay
addAssayCustom(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter param)
Add a assay[id]-custom[i] into metadata.de.isas.mztab2.model.Assay
addAssayExternalUri(de.isas.mztab2.model.Metadata metadata, Integer id, URI location)
Add a assay[id]-external_uri into metadata.de.isas.mztab2.model.Assay
addAssayMsRun(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.MsRun msRun)
Add assay[id]-ms_run_ref into metadata.de.isas.mztab2.model.Assay
addAssaySample(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Sample sample)
Add assay[id]-sample_ref into metadata.de.isas.mztab2.model.Contact
addContact(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Contact contact)
Add a contact into metadata.de.isas.mztab2.model.Contact
addContactAffiliation(de.isas.mztab2.model.Metadata metadata, Integer id, String affiliation)
Add contact[id]-affiliation.de.isas.mztab2.model.Contact
addContactEmail(de.isas.mztab2.model.Metadata metadata, Integer id, String email)
Add contact[id]-emailde.isas.mztab2.model.Contact
addContactName(de.isas.mztab2.model.Metadata metadata, Integer id, String name)
Add contact[id]-name.de.isas.mztab2.model.CV
addCV(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.CV cv)
Add a controlled vocabularies/ontologies into metadata.de.isas.mztab2.model.CV
addCVFullName(de.isas.mztab2.model.Metadata metadata, Integer id, String fullName)
Add a cv[id]-full_name.de.isas.mztab2.model.CV
addCVLabel(de.isas.mztab2.model.Metadata metadata, Integer id, String label)
Add a cv[id]-label.de.isas.mztab2.model.CV
addCVURI(de.isas.mztab2.model.Metadata metadata, Integer id, String uri)
Add a cv[id]-uri.de.isas.mztab2.model.CV
addCVVersion(de.isas.mztab2.model.Metadata metadata, Integer id, String version)
Add a cv[id]-version.de.isas.mztab2.model.Database
addDatabase(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Database database)
addDatabase.de.isas.mztab2.model.Database
addDatabasePrefix(de.isas.mztab2.model.Metadata metadata, Integer id, String valueLabel)
addDatabasePrefix.de.isas.mztab2.model.Database
addDatabaseUri(de.isas.mztab2.model.Metadata metadata, Integer id, URI checkURI)
addDatabaseUri.de.isas.mztab2.model.Database
addDatabaseVersion(de.isas.mztab2.model.Metadata metadata, Integer id, String version)
addDatabaseVersion.de.isas.mztab2.model.Instrument
addInstrument(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Instrument instrument)
Add a instrument[id] to metadata.de.isas.mztab2.model.Instrument
addInstrumentAnalyzer(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter analyzer)
Add a parameter for instrument[id]-analyzer[i]de.isas.mztab2.model.Instrument
addInstrumentDetector(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter detector)
Add a parameter for instrument[id]-detectorde.isas.mztab2.model.Instrument
addInstrumentName(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter name)
Add a parameter for instrument[id]-namede.isas.mztab2.model.Instrument
addInstrumentSource(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter source)
Add a parameter for instrument[id]-sourcede.isas.mztab2.model.MsRun
addMsRun(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.MsRun msRun)
Add a ms_run[id] into metadata.de.isas.mztab2.model.MsRun
addMsRunFormat(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter format)
Add ms_run[id]-format into metadata.de.isas.mztab2.model.MsRun
addMsRunFragmentationMethod(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter fragmentationMethod)
Add ms_run[id]-fragmentation_method into metadata.de.isas.mztab2.model.MsRun
addMsRunHash(de.isas.mztab2.model.Metadata metadata, Integer id, String hash)
addMsRunHash.de.isas.mztab2.model.MsRun
addMsRunHashMethod(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter hashMethod)
addMsRunHashMethod.de.isas.mztab2.model.MsRun
addMsRunIdFormat(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter idFormat)
Add ms_run[id]-id_format into metadata.de.isas.mztab2.model.MsRun
addMsRunInstrumentRef(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Instrument instrument)
Add ms_run[id]-instrument_ref into metadata.de.isas.mztab2.model.MsRun
addMsRunLocation(de.isas.mztab2.model.Metadata metadata, Integer id, URI location)
Add ms_run[id]-location into metadata.de.isas.mztab2.model.MsRun
addMsRunScanPolarity(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter scanPolarity)
addMsRunScanPolarity.de.isas.mztab2.model.Publication
addPublication(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Publication publication)
Add a publiction to metadata.de.isas.mztab2.model.Publication
addPublicationItem(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.PublicationItem.TypeEnum type, String accession)
Add a publication item to metadata.de.isas.mztab2.model.Publication
addPublicationItems(de.isas.mztab2.model.Metadata metadata, Integer id, Collection<de.isas.mztab2.model.PublicationItem> items)
Add a couple of publication items into publication[id].de.isas.mztab2.model.Sample
addSample(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Sample sample)
Add a sample to metadata.de.isas.mztab2.model.Sample
addSampleCellType(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter cellType)
Add a sample[id]-cell_type into sample.de.isas.mztab2.model.Sample
addSampleCustom(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter custom)
Add a sample[id]-custom into sample.de.isas.mztab2.model.Sample
addSampleDescription(de.isas.mztab2.model.Metadata metadata, Integer id, String description)
Add a sample[id]-description into sample.de.isas.mztab2.model.Sample
addSampleDisease(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter disease)
Add a sample[id]-disease into sample.de.isas.mztab2.model.SampleProcessing
addSampleProcessing(de.isas.mztab2.model.Metadata metadata, Integer id, List<de.isas.mztab2.model.Parameter> sampleProcessing)
Add a sample_processing[id].de.isas.mztab2.model.SampleProcessing
addSampleProcessingParameter(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter param)
Add a processing parameter to sample_processing[id]de.isas.mztab2.model.Sample
addSampleSpecies(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter species)
Add a sample[id]-species into sample.de.isas.mztab2.model.Sample
addSampleTissue(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter tissue)
Add a sample[id]-tissue into sample.void
addSmallMoleculeColUnit(de.isas.mztab2.model.Metadata metadata, String columnName, de.isas.mztab2.model.Parameter param)
Defines the unit for the data reported in a column of the small molecule section.void
addSmallMoleculeEvidenceColUnit(de.isas.mztab2.model.Metadata metadata, String columnName, de.isas.mztab2.model.Parameter param)
Defines the unit for the data reported in a column of the small molecule section.void
addSmallMoleculeFeatureColUnit(de.isas.mztab2.model.Metadata metadata, String columnName, de.isas.mztab2.model.Parameter param)
Defines the unit for the data reported in a column of the small molecule section.de.isas.mztab2.model.Software
addSoftware(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Software software)
Add a software to metadata, which used to analyze the data and obtain the reported results.de.isas.mztab2.model.Software
addSoftwareParameter(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter param)
Add a software[id] parameter.de.isas.mztab2.model.Software
addSoftwareSetting(de.isas.mztab2.model.Metadata metadata, Integer id, String setting)
Add a software[id]-setting.de.isas.mztab2.model.StudyVariable
addStudyVariable(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.StudyVariable studyVariable)
Add a study variable into metadata.de.isas.mztab2.model.StudyVariable
addStudyVariableAssay(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Assay assay)
Add a study_variable[id]-assay_refs.de.isas.mztab2.model.StudyVariable
addStudyVariableAverageFunction(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter checkParameter)
Add a study_variable[id]-average_function.de.isas.mztab2.model.StudyVariable
addStudyVariableDescription(de.isas.mztab2.model.Metadata metadata, Integer id, String description)
Add a study_variable[id]-description.de.isas.mztab2.model.StudyVariable
addStudyVariableFactors(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter checkParameter)
Add a study_variable[id]-factor.de.isas.mztab2.model.StudyVariable
addStudyVariableVariationFunction(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter checkParameter)
Add a study_variable[id]-variation_function.Map<String,String>
getColUnitMap()
Defines a method to access the colUnit to help in the transformation from columnName String -> to columnName MZTabColumn
-
-
-
Constructor Detail
-
MZTabParserContext
public MZTabParserContext()
-
-
Method Detail
-
addSample
public de.isas.mztab2.model.Sample addSample(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Sample sample)
Add a sample to metadata. Samples are NOT MANDATORY in mzTab, since many software packages cannot determine what type of sample was analysed (e.g. whether biological or technical replication was performed).- Parameters:
sample
- SHOULD NOT be null.metadata
- aMetadata
object.- Returns:
- a
Sample
object.
-
addSampleSpecies
public de.isas.mztab2.model.Sample addSampleSpecies(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter species)
Add a sample[id]-species into sample.- Parameters:
id
- SHOULD be positive integer.species
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
Sample
object.
-
addSampleTissue
public de.isas.mztab2.model.Sample addSampleTissue(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter tissue)
Add a sample[id]-tissue into sample.- Parameters:
id
- SHOULD be positive integer.tissue
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
Sample
object.
-
addSampleCellType
public de.isas.mztab2.model.Sample addSampleCellType(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter cellType)
Add a sample[id]-cell_type into sample.- Parameters:
id
- SHOULD be positive integer.cellType
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
Sample
object.
-
addSampleDisease
public de.isas.mztab2.model.Sample addSampleDisease(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter disease)
Add a sample[id]-disease into sample.- Parameters:
id
- SHOULD be positive integer.disease
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
Sample
object.
-
addSampleDescription
public de.isas.mztab2.model.Sample addSampleDescription(de.isas.mztab2.model.Metadata metadata, Integer id, String description)
Add a sample[id]-description into sample.- Parameters:
id
- SHOULD be positive integer.description
- if empty ignore operation.metadata
- aMetadata
object.- Returns:
- a
Sample
object.
-
addSampleCustom
public de.isas.mztab2.model.Sample addSampleCustom(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter custom)
Add a sample[id]-custom into sample. Add a custom parameter for sample.- Parameters:
id
- SHOULD be positive integer.custom
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
Sample
object.
-
addSampleProcessing
public de.isas.mztab2.model.SampleProcessing addSampleProcessing(de.isas.mztab2.model.Metadata metadata, Integer id, List<de.isas.mztab2.model.Parameter> sampleProcessing)
Add a sample_processing[id]. A list of parameters describing a sample processing step. The order of the data_processing items should reflect the order these processing steps were performed in. If multiple parameters are given for a step these MUST be separated by a "|".- Parameters:
id
- SHOULD be positive integer.sampleProcessing
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
SampleProcessing
object.
-
addSampleProcessingParameter
public de.isas.mztab2.model.SampleProcessing addSampleProcessingParameter(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter param)
Add a processing parameter to sample_processing[id]- Parameters:
id
- SHOULD be positive integer.param
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
SampleProcessing
object.
-
addInstrument
public de.isas.mztab2.model.Instrument addInstrument(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Instrument instrument)
Add a instrument[id] to metadata.- Parameters:
instrument
- SHOULD NOT be null.metadata
- aMetadata
object.- Returns:
- a
Instrument
object.
-
addInstrumentName
public de.isas.mztab2.model.Instrument addInstrumentName(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter name)
Add a parameter for instrument[id]-name- Parameters:
id
- SHOULD be positive integer.name
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
Instrument
object.
-
addInstrumentSource
public de.isas.mztab2.model.Instrument addInstrumentSource(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter source)
Add a parameter for instrument[id]-source- Parameters:
id
- SHOULD be positive integer.source
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
Instrument
object.
-
addInstrumentAnalyzer
public de.isas.mztab2.model.Instrument addInstrumentAnalyzer(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter analyzer)
Add a parameter for instrument[id]-analyzer[i]- Parameters:
id
- SHOULD be positive integer.analyzer
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
Instrument
object.
-
addInstrumentDetector
public de.isas.mztab2.model.Instrument addInstrumentDetector(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter detector)
Add a parameter for instrument[id]-detector- Parameters:
id
- SHOULD be positive integer.detector
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
Instrument
object.
-
addSoftware
public de.isas.mztab2.model.Software addSoftware(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Software software)
Add a software to metadata, which used to analyze the data and obtain the reported results.- Parameters:
software
- SHOULD NOT be nullmetadata
- aMetadata
object.- Returns:
- a
Software
object.
-
addSoftwareParameter
public de.isas.mztab2.model.Software addSoftwareParameter(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter param)
Add a software[id] parameter. The parameter's value SHOULD contain the software's version. The order (numbering) should reflect the order in which the tools were used.- Parameters:
id
- SHOULD be positive integer.param
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
Software
object.
-
addSoftwareSetting
public de.isas.mztab2.model.Software addSoftwareSetting(de.isas.mztab2.model.Metadata metadata, Integer id, String setting)
Add a software[id]-setting. This field MAY occur multiple times for a single software. The value of this field is deliberately set as a String, since there currently do not exist cvParameters for every possible setting.- Parameters:
id
- SHOULD be positive integer.setting
- if empty ignore operation.metadata
- aMetadata
object.- Returns:
- a
Software
object.
-
addPublication
public de.isas.mztab2.model.Publication addPublication(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Publication publication)
Add a publiction to metadata. A publication associated with this file. Several publications can be given by indicating the number in the square brackets after "publication". PubMed ids must be prefixed by "pubmed:", DOIs by "doi:". Multiple identifiers MUST be separated by "|".- Parameters:
publication
- SHOULD NOT be null.metadata
- aMetadata
object.- Returns:
- a
Publication
object.
-
addPublicationItem
public de.isas.mztab2.model.Publication addPublicationItem(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.PublicationItem.TypeEnum type, String accession)
Add a publication item to metadata. PubMed ids must be prefixed by "pubmed:", DOIs by "doi:". Multiple identifiers MUST be separated by "|".- Parameters:
id
- SHOULD be positive integer.type
- SHOULD NOT be null.accession
- SHOULD NOT set empty.metadata
- aMetadata
object.- Returns:
- a
Publication
object.
-
addPublicationItems
public de.isas.mztab2.model.Publication addPublicationItems(de.isas.mztab2.model.Metadata metadata, Integer id, Collection<de.isas.mztab2.model.PublicationItem> items)
Add a couple of publication items into publication[id]. Several publications can be given by indicating the number in the square brackets after "publication". PubMed ids must be prefixed by "pubmed:", DOIs by "doi:". Multiple identifiers MUST be separated by "|".- Parameters:
id
- SHOULD be positive integer.items
- SHOULD NOT be null.metadata
- aMetadata
object.- Returns:
- a
Publication
object.
-
addContact
public de.isas.mztab2.model.Contact addContact(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Contact contact)
Add a contact into metadata.- Parameters:
contact
- SHOULD NOT be null.metadata
- aMetadata
object.- Returns:
- a
Contact
object.
-
addContactName
public de.isas.mztab2.model.Contact addContactName(de.isas.mztab2.model.Metadata metadata, Integer id, String name)
Add contact[id]-name. Several contacts can be given by indicating the number in the square brackets after "contact". A contact has to be supplied in the format [first name] [initials] [last name] (see example).- Parameters:
id
- SHOULD be positive integer.name
- SHOULD NOT set empty.metadata
- aMetadata
object.- Returns:
- a
Contact
object.
-
addContactAffiliation
public de.isas.mztab2.model.Contact addContactAffiliation(de.isas.mztab2.model.Metadata metadata, Integer id, String affiliation)
Add contact[id]-affiliation.- Parameters:
id
- SHOULD be positive integer.affiliation
- SHOULD NOT set empty.metadata
- aMetadata
object.- Returns:
- a
Contact
object.
-
addContactEmail
public de.isas.mztab2.model.Contact addContactEmail(de.isas.mztab2.model.Metadata metadata, Integer id, String email)
Add contact[id]-email- Parameters:
id
- SHOULD be positive integer.email
- SHOULD NOT set empty.metadata
- aMetadata
object.- Returns:
- a
Contact
object.
-
addMsRun
public de.isas.mztab2.model.MsRun addMsRun(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.MsRun msRun)
Add a ms_run[id] into metadata. An MS run is effectively one run (or set of runs on pre-fractionated samples) on an MS instrument, and is referenced from assay in different contexts.- Parameters:
msRun
- SHOULD NOT be null.metadata
- aMetadata
object.- Returns:
- a
MsRun
object.
-
addMsRunFormat
public de.isas.mztab2.model.MsRun addMsRunFormat(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter format)
Add ms_run[id]-format into metadata. A parameter specifying the data format of the external MS data file.- Parameters:
id
- SHOULD be positive integer.format
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
MsRun
object.
-
addMsRunLocation
public de.isas.mztab2.model.MsRun addMsRunLocation(de.isas.mztab2.model.Metadata metadata, Integer id, URI location)
Add ms_run[id]-location into metadata. Location of the external data file. If the actual location of the MS run is unknown, a "null" MUST be used as a place holder value.- Parameters:
id
- SHOULD be positive integer.location
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
MsRun
object.
-
addMsRunInstrumentRef
public de.isas.mztab2.model.MsRun addMsRunInstrumentRef(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Instrument instrument)
Add ms_run[id]-instrument_ref into metadata. Reference to a commonly used instrument.- Parameters:
metadata
- aMetadata
object.id
- SHOULD be positive integer.instrument
- if null ignore operation.- Returns:
- a
MsRun
object.
-
addMsRunIdFormat
public de.isas.mztab2.model.MsRun addMsRunIdFormat(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter idFormat)
Add ms_run[id]-id_format into metadata. Parameter specifying the id format used in the external data file.- Parameters:
id
- SHOULD be positive integer.idFormat
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
MsRun
object.
-
addMsRunFragmentationMethod
public de.isas.mztab2.model.MsRun addMsRunFragmentationMethod(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter fragmentationMethod)
Add ms_run[id]-fragmentation_method into metadata. A list of "|" separated parameters describing all the types of fragmentation used in a given ms run.- Parameters:
id
- SHOULD be positive integer.fragmentationMethod
- if null ignore operation.metadata
- aMetadata
object.- Returns:
- a
MsRun
object.
-
addMsRunHash
public de.isas.mztab2.model.MsRun addMsRunHash(de.isas.mztab2.model.Metadata metadata, Integer id, String hash)
addMsRunHash.
-
addMsRunHashMethod
public de.isas.mztab2.model.MsRun addMsRunHashMethod(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter hashMethod)
addMsRunHashMethod.
- Parameters:
metadata
- aMetadata
object.id
- aInteger
object.hashMethod
- aParameter
object.- Returns:
- a
MsRun
object.
-
addMsRunScanPolarity
public de.isas.mztab2.model.MsRun addMsRunScanPolarity(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter scanPolarity)
addMsRunScanPolarity.
- Parameters:
metadata
- aMetadata
object.id
- aInteger
object.scanPolarity
- aParameter
object.- Returns:
- a
MsRun
object.
-
addAssay
public de.isas.mztab2.model.Assay addAssay(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Assay assay)
Add a assay into metadata. The application of a measurement about the sample (in this case through MS) - producing values about small molecules, peptides or proteins. One assay is typically mapped to one MS run in the case of label-free MS analysis or multiple assays are mapped to one MS run for multiplexed techniques, along with a description of the label or tag applied.- Parameters:
assay
- SHOULD NOT be null.metadata
- aMetadata
object.- Returns:
- a
Assay
object.
-
addAssayCustom
public de.isas.mztab2.model.Assay addAssayCustom(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter param)
Add a assay[id]-custom[i] into metadata. The application of a measurement about the sample (in this case through MS) - producing values about small molecules, peptides or proteins. One assay is typically mapped to one MS run in the case of label-free MS analysis or multiple assays are mapped to one MS run for multiplexed techniques, along with a description of the label or tag applied.- Parameters:
metadata
- aMetadata
object.id
- SHOULD NOT be null.param
- the parameter.- Returns:
- a
Assay
object.
-
addAssayExternalUri
public de.isas.mztab2.model.Assay addAssayExternalUri(de.isas.mztab2.model.Metadata metadata, Integer id, URI location)
Add a assay[id]-external_uri into metadata. The application of a measurement about the sample (in this case through MS) - producing values about small molecules, peptides or proteins. One assay is typically mapped to one MS run in the case of label-free MS analysis or multiple assays are mapped to one MS run for multiplexed techniques, along with a description of the label or tag applied.- Parameters:
metadata
- aMetadata
object.id
- the id of the assay element.location
- SHOULD NOT be null.- Returns:
- a
Assay
object.
-
addAssaySample
public de.isas.mztab2.model.Assay addAssaySample(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Sample sample)
Add assay[id]-sample_ref into metadata. An association from a given assay to the sample analysed.- Parameters:
id
- SHOULD be positive integer.sample
- SHOULD NOT be null, and SHOULD be defined in metadata first.metadata
- aMetadata
object.- Returns:
- a
Assay
object.
-
addAssayMsRun
public de.isas.mztab2.model.Assay addAssayMsRun(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.MsRun msRun)
Add assay[id]-ms_run_ref into metadata. An association from a given assay to the source MS run.- Parameters:
id
- SHOULD be positive integer.msRun
- SHOULD NOT be null, and SHOULD be defined in metadata first.metadata
- aMetadata
object.- Returns:
- a
Assay
object.
-
addStudyVariable
public de.isas.mztab2.model.StudyVariable addStudyVariable(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.StudyVariable studyVariable)
Add a study variable into metadata. The variables about which the final results of a study are reported, which may have been derived following averaging across a group of replicate measurements (assays). In files where assays are reported, study variables have references to assays. The same concept has been defined by others as "experimental factor".- Parameters:
studyVariable
- SHOULD NOT be null.metadata
- aMetadata
object.- Returns:
- a
StudyVariable
object.
-
addStudyVariableAssay
public de.isas.mztab2.model.StudyVariable addStudyVariableAssay(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Assay assay)
Add a study_variable[id]-assay_refs. Comma-separated references to the IDs of assays grouped in the study variable.- Parameters:
id
- SHOULD be positive integer.assay
- SHOULD NOT be null, and should be defined in metadata first.metadata
- aMetadata
object.- Returns:
- a
StudyVariable
object.
-
addStudyVariableDescription
public de.isas.mztab2.model.StudyVariable addStudyVariableDescription(de.isas.mztab2.model.Metadata metadata, Integer id, String description)
Add a study_variable[id]-description. A textual description of the study variable.- Parameters:
metadata
- aMetadata
object.id
- SHOULD be positive integer.description
- if empty ignore operation.- Returns:
- a
StudyVariable
object.
-
addStudyVariableFactors
public de.isas.mztab2.model.StudyVariable addStudyVariableFactors(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter checkParameter)
Add a study_variable[id]-factor. A Parameter further refining what is known about the study design.- Parameters:
metadata
- aMetadata
object.id
- id SHOULD be positive integer.checkParameter
- the study variable factor Parameter to add.- Returns:
- a
StudyVariable
object.
-
addStudyVariableVariationFunction
public de.isas.mztab2.model.StudyVariable addStudyVariableVariationFunction(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter checkParameter)
Add a study_variable[id]-variation_function. This is a Parameter detailing how the reported study variable abundances have been calculated.- Parameters:
metadata
- aMetadata
object.id
- SHOULD be positive integer.checkParameter
- the parameter.- Returns:
- a
StudyVariable
object.
-
addStudyVariableAverageFunction
public de.isas.mztab2.model.StudyVariable addStudyVariableAverageFunction(de.isas.mztab2.model.Metadata metadata, Integer id, de.isas.mztab2.model.Parameter checkParameter)
Add a study_variable[id]-average_function. This is a Parameter detailing how the reported study variable abundances have been calculated.- Parameters:
metadata
- aMetadata
object.id
- SHOULD be positive integer.checkParameter
- the parameter.- Returns:
- a
StudyVariable
object.
-
addCV
public de.isas.mztab2.model.CV addCV(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.CV cv)
Add a controlled vocabularies/ontologies into metadata. Define the controlled vocabularies/ontologies used in the mzTab file.- Parameters:
cv
- SHOULD NOT be null.metadata
- aMetadata
object.- Returns:
- a
CV
object.
-
addCVLabel
public de.isas.mztab2.model.CV addCVLabel(de.isas.mztab2.model.Metadata metadata, Integer id, String label)
Add a cv[id]-label. A string describing the labels of the controlled vocabularies/ontologies used in the mzTab file- Parameters:
id
- SHOULD be positive integer.metadata
- aMetadata
object.label
- aString
object.- Returns:
- a
CV
object.
-
addCVFullName
public de.isas.mztab2.model.CV addCVFullName(de.isas.mztab2.model.Metadata metadata, Integer id, String fullName)
Add a cv[id]-full_name. A string describing the full names of the controlled vocabularies/ontologies used in the mzTab file- Parameters:
id
- SHOULD be positive integer.metadata
- aMetadata
object.fullName
- aString
object.- Returns:
- a
CV
object.
-
addCVVersion
public de.isas.mztab2.model.CV addCVVersion(de.isas.mztab2.model.Metadata metadata, Integer id, String version)
Add a cv[id]-version. A string describing the version of the controlled vocabularies/ontologies used in the mzTab file- Parameters:
id
- SHOULD be positive integer.metadata
- aMetadata
object.version
- aString
object.- Returns:
- a
CV
object.
-
addCVURI
public de.isas.mztab2.model.CV addCVURI(de.isas.mztab2.model.Metadata metadata, Integer id, String uri)
Add a cv[id]-uri. A string containing the URIs of the controlled vocabularies/ontologies used in the mzTab file- Parameters:
id
- SHOULD be positive integer.metadata
- aMetadata
object.uri
- aString
object.- Returns:
- a
CV
object.
-
addSmallMoleculeColUnit
public void addSmallMoleculeColUnit(de.isas.mztab2.model.Metadata metadata, String columnName, de.isas.mztab2.model.Parameter param)
Defines the unit for the data reported in a column of the small molecule section. Defines the used unit for a column in the small molecule section. The format of the value has to be {column name}={Parameter defining the unit} This field MUST NOT be used to define a unit for quantification columns. The unit used for small molecule quantification values MUST be set in small_molecule-quantification_unit.- Parameters:
metadata
- aMetadata
object.columnName
- SHOULD NOT be nullparam
- SHOULD NOT be null
-
addSmallMoleculeFeatureColUnit
public void addSmallMoleculeFeatureColUnit(de.isas.mztab2.model.Metadata metadata, String columnName, de.isas.mztab2.model.Parameter param)
Defines the unit for the data reported in a column of the small molecule section. Defines the used unit for a column in the small molecule section. The format of the value has to be {column name}={Parameter defining the unit} This field MUST NOT be used to define a unit for quantification columns. The unit used for small molecule quantification values MUST be set in small_molecule-quantification_unit.- Parameters:
metadata
- aMetadata
object.columnName
- SHOULD NOT be nullparam
- SHOULD NOT be null
-
addSmallMoleculeEvidenceColUnit
public void addSmallMoleculeEvidenceColUnit(de.isas.mztab2.model.Metadata metadata, String columnName, de.isas.mztab2.model.Parameter param)
Defines the unit for the data reported in a column of the small molecule section. Defines the used unit for a column in the small molecule section. The format of the value has to be {column name}={Parameter defining the unit} This field MUST NOT be used to define a unit for quantification columns. The unit used for small molecule quantification values MUST be set in small_molecule-quantification_unit.- Parameters:
metadata
- aMetadata
object.columnName
- SHOULD NOT be nullparam
- SHOULD NOT be null
-
getColUnitMap
public Map<String,String> getColUnitMap()
Defines a method to access the colUnit to help in the transformation from columnName String -> to columnName MZTabColumn- Returns:
- a
Map
object.
-
addDatabase
public de.isas.mztab2.model.Database addDatabase(de.isas.mztab2.model.Metadata metadata, de.isas.mztab2.model.Database database)
addDatabase.
- Parameters:
metadata
- aMetadata
object.database
- aDatabase
object.- Returns:
- a
Database
object.
-
addDatabasePrefix
public de.isas.mztab2.model.Database addDatabasePrefix(de.isas.mztab2.model.Metadata metadata, Integer id, String valueLabel)
addDatabasePrefix.
-
addDatabaseVersion
public de.isas.mztab2.model.Database addDatabaseVersion(de.isas.mztab2.model.Metadata metadata, Integer id, String version)
addDatabaseVersion.
-
addDatabaseUri
public de.isas.mztab2.model.Database addDatabaseUri(de.isas.mztab2.model.Metadata metadata, Integer id, URI checkURI)
addDatabaseUri.
-
-