Class MzTabAccess


  • public class MzTabAccess
    extends Object
    Utility class for easier access to linked information within an mztab-M data object.
    Author:
    nilshoffmann
    • Constructor Detail

      • MzTabAccess

        public MzTabAccess​(MzTab mzTab)
        Create an MzTabAccess object for the provided mzTab object.
        Parameters:
        mzTab -
    • Method Detail

      • getFeatures

        public List<SmallMoleculeFeaturegetFeatures​(SmallMoleculeSummary sms)
        Retrieve all small molecule features in order of definition for the provided small molecule summary.
        Parameters:
        sms - the small molecule summary.
        Returns:
        the list of small molecule features.
      • getEvidences

        public List<SmallMoleculeEvidencegetEvidences​(SmallMoleculeFeature smf)
        Retrieve all small molecule evidences in order of definition for the provided small molecule feature.
        Parameters:
        smf - the small molecule feature.
        Returns:
        the list of small molecule evidences.
      • getEvidencesByEvidenceInputId

        public List<SmallMoleculeEvidencegetEvidencesByEvidenceInputId​(String evidenceInputId)
        Retrieve all small molecule evidences for the provided evidence input id.
        Parameters:
        evidenceInputId - the evidence input it.
        Returns:
        the list of small molecule evidences.
      • getAbundanceFor

        public Double getAbundanceFor​(Assay assay,
                                      SmallMoleculeFeature smf)
        Retrieves the abundance value for the provided assay and small molecule feature object.
        Parameters:
        assay - the assay.
        smf - the small molecule feature object.
        Returns:
        the feature abundance. May be null.
      • getAbundanceFor

        public Double getAbundanceFor​(StudyVariable studyVariable,
                                      SmallMoleculeSummary sms)
        Retrieves the abundance value for the provided study variable and small molecule summary object.
        Parameters:
        studyVariable - the study variable.
        sms - the small molecule summary object.
        Returns:
        the study variable abundance. May be null.
      • getAbundanceVariationFor

        public Double getAbundanceVariationFor​(StudyVariable studyVariable,
                                               SmallMoleculeSummary sms)
        Retrieves the abundance variation value for the provided study variable and small molecule summary object.
        Parameters:
        studyVariable - the study variable.
        sms - the small molecule summary object.
        Returns:
        the study variable abundance variation. May be null.
      • getAbundanceFor

        public Double getAbundanceFor​(Assay assay,
                                      SmallMoleculeSummary sms)
        Retrieves the abundance value for the provided assay and small molecule summary object.
        Parameters:
        assay - the assay.
        sms - the small molecule summary object.
        Returns:
        the assay abundance. May be null.
      • getAssayFor

        public Optional<AssaygetAssayFor​(Integer id,
                                           Metadata metadata)
        Tries to locate the assay referenced by id from the metadata section.
        Parameters:
        id - the assay id.
        metadata - the metadata used to locate the assay.
        Returns:
        an optional with the assay object, or an empty optiona
      • getStudyVariableFor

        public Optional<StudyVariablegetStudyVariableFor​(Integer id,
                                                           Metadata metadata)
        Tries to locate the study variable referenced by id from the metadata section.
        Parameters:
        id - the study variable id.
        metadata - the metadata used to locate the study variable.
        Returns:
        an optional with the study variable object, or an empty optiona
      • getMsRunFor

        public Optional<MsRungetMsRunFor​(Integer id,
                                           Metadata metadata)
        Tries to locate the ms run referenced by id from the metadata section.
        Parameters:
        id - the ms run id.
        metadata - the metadata used to locate the ms run.
        Returns:
        an optional with the ms run object, or an empty optional.
      • getDatabaseFor

        public Optional<DatabasegetDatabaseFor​(Integer id,
                                                 Metadata metadata)
        Tries to locate the database referenced by id from the metadata section.
        Parameters:
        id - the database id.
        metadata - the metadata used to locate the database.
        Returns:
        an optional with the database object, or an empty optional.
      • getAssayFor

        public Optional<AssaygetAssayFor​(OptColumnMapping columnMapping,
                                           Metadata metadata)
        Tries to locate the assay referenced by id from the columnMapping identifier. Returns an empty optional if either the identifier was null or not an assay, or no matching assay was found.
        Parameters:
        columnMapping - the column mapping.
        metadata - the metadata used to locate the assay.
        Returns:
        an optional with the assay object, or an empty optional.