Helper function to sort a mzTab-M MTD matrix, such as generated by
mtdSkeleton(), into the correct order of the metadata fields.
See also
MTD-export for other functions defining metadata information
Examples
## Minimal MTD section
mtd <- mtdSkeleton(id = "001", software = "[MS, MS:1001582, xmcs, 4.0.0]")
mtdSort(mtd)
#> [,1]
#> [1,] "mzTab-version"
#> [2,] "mzTab-ID"
#> [3,] "mzTab-profile"
#> [4,] "software[1]"
#> [5,] "quantification_method"
#> [6,] "cv[1]-label"
#> [7,] "cv[1]-full_name"
#> [8,] "cv[1]-version"
#> [9,] "cv[1]-uri"
#> [10,] "cv[2]-label"
#> [11,] "cv[2]-full_name"
#> [12,] "cv[2]-version"
#> [13,] "cv[2]-uri"
#> [14,] "cv[3]-label"
#> [15,] "cv[3]-full_name"
#> [16,] "cv[3]-version"
#> [17,] "cv[3]-uri"
#> [18,] "database[1]"
#> [19,] "database[1]-prefix"
#> [20,] "database[1]-version"
#> [21,] "database[1]-uri"
#> [22,] "small_molecule-quantification_unit"
#> [23,] "small_molecule_feature-quantification_unit"
#> [24,] "small_molecule-identification_reliability"
#> [,2]
#> [1,] "2.1.0-M"
#> [2,] "001"
#> [3,] "M"
#> [4,] "[MS, MS:1001582, xmcs, 4.0.0]"
#> [5,] "[MS, MS:1001834, LC-MS label-free quantitation analysis, ]"
#> [6,] "MS"
#> [7,] "PSI-MS controlled vocabulary"
#> [8,] "4.1.138"
#> [9,] "https://www.ebi.ac.uk/ols4/ontologies/ms"
#> [10,] "PRIDE"
#> [11,] "PRIDE PRoteomics IDEntifications (PRIDE) database controlled vocabulary"
#> [12,] "16:10:2023 11:38"
#> [13,] "https://www.ebi.ac.uk/ols/ontologies/pride"
#> [14,] "STATO"
#> [15,] "General purpose STATistics Ontology"
#> [16,] "2026-04-20"
#> [17,] "https://www.ebi.ac.uk/ols4/ontologies/stato"
#> [18,] "[,, \"no database\", null ]"
#> [19,] "null"
#> [20,] "Unknown"
#> [21,] "null"
#> [22,] "[PRIDE, PRIDE:0000330, Arbitrary quantification unit, ]"
#> [23,] "[PRIDE, PRIDE:0000330, Arbitrary quantification unit, ]"
#> [24,] "[MS, MS:1002896, compound identification confidence level, ]"
mtd
#> [,1]
#> [1,] "mzTab-version"
#> [2,] "mzTab-ID"
#> [3,] "mzTab-profile"
#> [4,] "software[1]"
#> [5,] "quantification_method"
#> [6,] "cv[1]-label"
#> [7,] "cv[1]-full_name"
#> [8,] "cv[1]-version"
#> [9,] "cv[1]-uri"
#> [10,] "cv[2]-label"
#> [11,] "cv[2]-full_name"
#> [12,] "cv[2]-version"
#> [13,] "cv[2]-uri"
#> [14,] "cv[3]-label"
#> [15,] "cv[3]-full_name"
#> [16,] "cv[3]-version"
#> [17,] "cv[3]-uri"
#> [18,] "database[1]"
#> [19,] "database[1]-prefix"
#> [20,] "database[1]-version"
#> [21,] "database[1]-uri"
#> [22,] "small_molecule-quantification_unit"
#> [23,] "small_molecule_feature-quantification_unit"
#> [24,] "small_molecule-identification_reliability"
#> [,2]
#> [1,] "2.1.0-M"
#> [2,] "001"
#> [3,] "M"
#> [4,] "[MS, MS:1001582, xmcs, 4.0.0]"
#> [5,] "[MS, MS:1001834, LC-MS label-free quantitation analysis, ]"
#> [6,] "MS"
#> [7,] "PSI-MS controlled vocabulary"
#> [8,] "4.1.138"
#> [9,] "https://www.ebi.ac.uk/ols4/ontologies/ms"
#> [10,] "PRIDE"
#> [11,] "PRIDE PRoteomics IDEntifications (PRIDE) database controlled vocabulary"
#> [12,] "16:10:2023 11:38"
#> [13,] "https://www.ebi.ac.uk/ols/ontologies/pride"
#> [14,] "STATO"
#> [15,] "General purpose STATistics Ontology"
#> [16,] "2026-04-20"
#> [17,] "https://www.ebi.ac.uk/ols4/ontologies/stato"
#> [18,] "[,, \"no database\", null ]"
#> [19,] "null"
#> [20,] "Unknown"
#> [21,] "null"
#> [22,] "[PRIDE, PRIDE:0000330, Arbitrary quantification unit, ]"
#> [23,] "[PRIDE, PRIDE:0000330, Arbitrary quantification unit, ]"
#> [24,] "[MS, MS:1002896, compound identification confidence level, ]"
