# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
context("Test SmallMoleculeSummary")
model.instance <- SmallMoleculeSummary$new(
`sml_id`=1,
`smf_id_refs`=c(1,2,3),
`adduct_ions`=c("[M+H]1+","[M-H]1-")
)
# model.instance$`sml_id` <- 1
# model.instance$`sml_id_refs` <- list(1,2,3)
test_that("prefix", {
# tests for the property `prefix` (character)
# The small molecule table row prefix. SML MUST be used for rows of the small molecule table.
# uncomment below to test the property
expect_equal(model.instance$`prefix`, "SML")
})
test_that("header_prefix", {
# tests for the property `header_prefix` (character)
# The small molecule table header prefix. SMH MUST be used for the small molecule table header line (the column labels).
# uncomment below to test the property
expect_equal(model.instance$`header_prefix`, "SMH")
})
test_that("sml_id", {
# tests for the property `sml_id` (integer)
# A within file unique identifier for the small molecule.
# uncomment below to test the property
expect_equal(model.instance$`sml_id`, 1)
})
test_that("smf_id_refs", {
# tests for the property `smf_id_refs` (array[integer])
# References to all the features on which quantitation has been based (SMF elements) via referencing SMF_ID values. Multiple values SHOULD be provided as a “|” separated list. This MAY be null only if this is a Summary file.
# uncomment below to test the property
expect_equal(model.instance$`smf_id_refs`, c(1,2,3))
})
test_that("database_identifier", {
# tests for the property `database_identifier` (array[character])
# A list of “|” separated possible identifiers for the small molecule; multiple values MUST only be provided to indicate ambiguity in the identification of the molecule and not to demonstrate different identifier types for the same molecule. Alternative identifiers for the same molecule MAY be provided as optional columns. The database identifier must be preceded by the resource description (prefix) followed by a colon, as specified in the metadata section. A null value MAY be provided if the identification is sufficiently ambiguous as to be meaningless for reporting or the small molecule has not been identified.
# uncomment below to test the property
#expect_equal(model.instance$`database_identifier`, "EXPECTED_RESULT")
})
test_that("chemical_formula", {
# tests for the property `chemical_formula` (array[character])
# A list of “|” separated potential chemical formulae of the reported compound. The number of values provided MUST match the number of entities reported under “database_identifier”, even if this leads to redundant reporting of information (i.e. if ambiguity can be resolved in the chemical formula), and the validation software will throw an error if the number of “|” symbols does not match. “null” values between bars are allowed. This should be specified in Hill notation (EA Hill 1900), i.e. elements in the order C, H and then alphabetically all other elements. Counts of one may be omitted. Elements should be capitalized properly to avoid confusion (e.g., “CO” vs. “Co”). The chemical formula reported should refer to the neutral form. Example: N-acetylglucosamine would be encoded by the string “C8H15NO6”.
# uncomment below to test the property
#expect_equal(model.instance$`chemical_formula`, "EXPECTED_RESULT")
})
test_that("smiles", {
# tests for the property `smiles` (array[character])
# A list of “|” separated potential molecule structures in the simplified molecular-input line-entry system (SMILES) for the small molecule. The number of values provided MUST match the number of entities reported under “database_identifier”, and the validation software will throw an error if the number of “|” symbols does not match. “null” values between bars are allowed.
# uncomment below to test the property
#expect_equal(model.instance$`smiles`, "EXPECTED_RESULT")
})
test_that("inchi", {
# tests for the property `inchi` (array[character])
# A list of “|” separated potential standard IUPAC International Chemical Identifier (InChI) of the given substance. The number of values provided MUST match the number of entities reported under “database_identifier”, even if this leads to redundant information being reported (i.e. if ambiguity can be resolved in the InChi), and the validation software will throw an error if the number of “|” symbols does not match. “null” values between bars are allowed.
# uncomment below to test the property
#expect_equal(model.instance$`inchi`, "EXPECTED_RESULT")
})
test_that("chemical_name", {
# tests for the property `chemical_name` (array[character])
# A list of “|” separated possible chemical/common names for the small molecule, or general description if a chemical name is unavailable. Multiple names are only to demonstrate ambiguity in the identification. The number of values provided MUST match the number of entities reported under “database_identifier”, and the validation software will throw an error if the number of “|” symbols does not match. “null” values between bars are allowed.
# uncomment below to test the property
#expect_equal(model.instance$`chemical_name`, "EXPECTED_RESULT")
})
test_that("uri", {
# tests for the property `uri` (array[character])
# A URI pointing to the small molecule’s entry in a reference database (e.g., the small molecule’s HMDB or KEGG entry). The number of values provided MUST match the number of entities reported under “database_identifier”, and the validation software will throw an error if the number of “|” symbols does not match. “null” values between bars are allowed.
# uncomment below to test the property
#expect_equal(model.instance$`uri`, "EXPECTED_RESULT")
})
test_that("theoretical_neutral_mass", {
# tests for the property `theoretical_neutral_mass` (array[numeric])
# The small molecule’s precursor’s theoretical neutral mass. The number of values provided MUST match the number of entities reported under “database_identifier”, and the validation software will throw an error if the number of “|” symbols does not match. “null” values (in general and between bars) are allowed for molecules that have not been identified only, or for molecules where the neutral mass cannot be calculated. In these cases, the SML entry SHOULD reference features in which exp_mass_to_charge values are captured.
# uncomment below to test the property
#expect_equal(model.instance$`theoretical_neutral_mass`, "EXPECTED_RESULT")
})
test_that("adduct_ions", {
# tests for the property `adduct_ions` (array[character])
# A “|” separated list of detected adducts for this this molecule, following the general style in the 2013 IUPAC recommendations on terms relating to MS e.g. [M+H]1+, [M+Na]1+, [M+NH4]1+, [M-H]1-, [M+Cl]1-, [M+H]1+. If the adduct classification is ambiguous with regards to identification evidence it MAY be null.
# uncomment below to test the property
expect_equal(model.instance$`adduct_ions`, c("[M+H]1+","[M-H]1-"))
})
test_that("reliability", {
# tests for the property `reliability` (character)
# The reliability of the given small molecule identification. This must be supplied by the resource and MUST be reported as an integer between 1-4: identified metabolite (1) putatively annotated compound (2) putatively characterized compound class (3) unknown compound (4) These MAY be replaced using a suitable CV term in the metadata section e.g. to use MSI recommendation levels (see Section 6.2.57 for details). The following CV terms are already available within the PSI MS CV. Future schemes may be implemented by extending the PSI MS CV with new terms and associated levels. The MSI has recently discussed an extension of the original four level scheme into a five level scheme MS:1002896 (compound identification confidence level) with levels isolated, pure compound, full stereochemistry (0) reference standard match or full 2D structure (1) unambiguous diagnostic evidence (literature, database) (2) most likely structure, including isomers, substance class or substructure match (3) unknown compound (4) For high-resolution MS, the following term and its levels may be used: MS:1002955 (hr-ms compound identification confidence level) with levels confirmed structure (1) probable structure (2) unambiguous ms library match (2a) diagnostic evidence (2b) tentative candidates (3) unequivocal molecular formula (4) exact mass (5) A String data type is set to allow for different systems to be specified in the metadata section.
# uncomment below to test the property
#expect_equal(model.instance$`reliability`, "EXPECTED_RESULT")
})
test_that("best_id_confidence_measure", {
# tests for the property `best_id_confidence_measure` (Parameter)
# uncomment below to test the property
#expect_equal(model.instance$`best_id_confidence_measure`, "EXPECTED_RESULT")
})
test_that("best_id_confidence_value", {
# tests for the property `best_id_confidence_value` (numeric)
# The best confidence measure in identification (for this type of score) for the given small molecule across all assays. The type of score MUST be defined in the metadata section. If the small molecule was not identified by the specified search engine, “null” MUST be reported. If the confidence measure does not report a numerical confidence value, “null” SHOULD be reported.
# uncomment below to test the property
#expect_equal(model.instance$`best_id_confidence_value`, "EXPECTED_RESULT")
})
test_that("abundance_assay", {
# tests for the property `abundance_assay` (array[numeric])
# The small molecule’s abundance in every assay described in the metadata section MUST be reported. Null or zero values may be reported as appropriate. \"null\" SHOULD be used to report missing quantities, while zero SHOULD be used to indicate a present but not reliably quantifiable value (e.g. below a minimum noise threshold).
# uncomment below to test the property
#expect_equal(model.instance$`abundance_assay`, "EXPECTED_RESULT")
})
test_that("abundance_study_variable", {
# tests for the property `abundance_study_variable` (array[numeric])
# The small molecule’s abundance in all the study variables described in the metadata section (study_variable[1-n]_average_function), calculated using the method as described in the Metadata section (default = arithmetic mean across assays). Null or zero values may be reported as appropriate. \"null\" SHOULD be used to report missing quantities, while zero SHOULD be used to indicate a present but not reliably quantifiable value (e.g. below a minimum noise threshold).
# uncomment below to test the property
#expect_equal(model.instance$`abundance_study_variable`, "EXPECTED_RESULT")
})
test_that("abundance_variation_study_variable", {
# tests for the property `abundance_variation_study_variable` (array[numeric])
# A measure of the variability of the study variable abundance measurement, calculated using the method as described in the metadata section (study_variable[1-n]_average_function), with a default = arithmethic co-efficient of variation of the small molecule’s abundance in the given study variable.
# uncomment below to test the property
#expect_equal(model.instance$`abundance_variation_study_variable`, "EXPECTED_RESULT")
})
test_that("opt", {
# tests for the property `opt` (array[OptColumnMapping])
# Additional columns can be added to the end of the small molecule table. These column headers MUST start with the prefix “opt_” followed by the {identifier} of the object they reference: assay, study variable, MS run or “global” (if the value relates to all replicates). Column names MUST only contain the following characters: ‘A’-‘Z’, ‘a’-‘z’, ‘0’-‘9’, ‘’, ‘-’, ‘[’, ‘]’, and ‘:’. CV parameter accessions MAY be used for optional columns following the format: opt{identifier}_cv_{accession}_\\{parameter name}. Spaces within the parameter’s name MUST be replaced by ‘_’.
# uncomment below to test the property
#expect_equal(model.instance$`opt`, "EXPECTED_RESULT")
})
test_that("comment", {
# tests for the property `comment` (array[Comment])
# uncomment below to test the property
#expect_equal(model.instance$`comment`, "EXPECTED_RESULT")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.