Enum Section

  • All Implemented Interfaces:
    Serializable, Comparable<Section>

    public enum Section
    extends Enum<Section>
    Every line in an mzTab file MUST start with a three letter code identifying the type of line delimited by a Tab character. The three letter codes are as follows : - MTD for metadata - PRH for the protein table header line (the column labels) - PRT for rows of the protein table - PEH for the peptide table header line (the column labels) - PEP for rows of the peptide table - PSH for the PSM table header (the column labels) - PSM for rows of the PSM table - SMH for small molecule table header line (the column labels) - SML for rows of the small molecule table - COM for comment lines
    Since:
    31/01/13
    Author:
    qingwei, jgriss, nilshoffmann
    • Method Detail

      • values

        public static Section[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Section c : Section.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Section valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getLevel

        public int getLevel()

        Getter for the field level.

        Returns:
        a int.
      • findSection

        public static Section findSection​(int level)

        findSection.

        Parameters:
        level - a int.
        Returns:
        a Section object.
      • isComment

        public boolean isComment()
        Judge the section is comment section or not.
        Returns:
        a boolean.
      • isMetadata

        public boolean isMetadata()
        Judge the section is metadata section or not.
        Returns:
        a boolean.
      • isHeader

        public boolean isHeader()
        Judge the section is protein_header, peptide_header, psm_header, small_molecule_header, small_molecule_feature_header or small_molecule_evidence_header section.
        Returns:
        a boolean.
      • isData

        public boolean isData()
        Judge the section is protein, peptide, psm, small_molecule, small_molecule_feature or small_molecule_evidence section.
        Returns:
        a boolean.
      • toHeaderSection

        public static Section toHeaderSection​(Section section)
        Translate the section to corresponding header section. If can not mapping, return null. Metadata, Comment --> null Protein, Protein_Header --> ProteinHeader Peptide, Peptide_Header --> PeptideHeader PSM, PSM_Header --> PSMHeader SmallMolecule, SmallMolecule_Header --> SmallMoleculeHeader SmallMoleculeFeature, SmallMoleculeFeature_Header --> SmallMoleculeFeatureHeader SmallMoleculeEvidence, SmallMoleculeEvidence_Header --> SmallMoleculeEvidenceHeader
        Parameters:
        section - a Section object.
        Returns:
        a Section object.
        See Also:
        toDataSection(Section)
      • toDataSection

        public static Section toDataSection​(Section section)
        Translate the section to corresponding data section. If can not mapping, return null. Metadata, Comment --> null Protein, Protein_Header --> Protein Peptide, Peptide_Header --> Peptide PSM, PSM_Header --> PSMHeader SmallMolecule, SmallMolecule_Header --> SmallMolecule SmallMoleculeFeature, SmallMoleculeFeature_Header --> SmallMoleculeFeature SmallMoleculeEvidence, SmallMoleculeEvidence_Header --> SmallMoleculeEvidence
        Parameters:
        section - a Section object.
        Returns:
        a Section object.
        See Also:
        toHeaderSection(Section)
      • findSection

        public static Section findSection​(String key)
        Query section based on its name or prefix with case-insensitive. For example: findSection("protein") == findSection("PRT"); Both of them to locate the Protein
        Parameters:
        key - if empty, return null.
        Returns:
        a Section object.