tests/testthat/test-small_molecule_feature.R

# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate

context("Test SmallMoleculeFeature")

model.instance <- SmallMoleculeFeature$new()

test_that("prefix", {
  # tests for the property `prefix` (character)
  # The small molecule feature table row prefix. SMF MUST be used for rows of the small molecule feature table.

  # uncomment below to test the property 
  #expect_equal(model.instance$`prefix`, "EXPECTED_RESULT")
})

test_that("header_prefix", {
  # tests for the property `header_prefix` (character)
  # The small molecule feature table header prefix. SFH MUST be used for the small molecule feature table header line (the column labels).

  # uncomment below to test the property 
  #expect_equal(model.instance$`header_prefix`, "EXPECTED_RESULT")
})

test_that("smf_id", {
  # tests for the property `smf_id` (integer)
  # A within file unique identifier for the small molecule feature.

  # uncomment below to test the property 
  #expect_equal(model.instance$`smf_id`, "EXPECTED_RESULT")
})

test_that("sme_id_refs", {
  # tests for the property `sme_id_refs` (array[integer])
  # References to the identification evidence (SME elements) via referencing SME_ID values. Multiple values MAY be provided as a “|” separated list to indicate ambiguity in the identification or to indicate that different types of data supported the identifiction (see SME_ID_REF_ambiguity_code). For the case of a consensus approach where multiple adduct forms are used to infer the SML ID, different features should just reference the same SME_ID value(s).

  # uncomment below to test the property 
  #expect_equal(model.instance$`sme_id_refs`, "EXPECTED_RESULT")
})

test_that("sme_id_ref_ambiguity_code", {
  # tests for the property `sme_id_ref_ambiguity_code` (integer)
  # If multiple values are given under SME_ID_REFS, one of the following codes MUST be provided. 1&#x3D;Ambiguous identification; 2&#x3D;Only different evidence streams for the same molecule with no ambiguity; 3&#x3D;Both ambiguous identification and multiple evidence streams. If there are no or one value under SME_ID_REFs, this MUST be reported as null.

  # uncomment below to test the property 
  #expect_equal(model.instance$`sme_id_ref_ambiguity_code`, "EXPECTED_RESULT")
})

test_that("adduct_ion", {
  # tests for the property `adduct_ion` (character)
  # The assumed classification of this molecule’s adduct ion after detection, 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+.

  # uncomment below to test the property 
  #expect_equal(model.instance$`adduct_ion`, "EXPECTED_RESULT")
})

test_that("isotopomer", {
  # tests for the property `isotopomer` (Parameter)

  # uncomment below to test the property 
  #expect_equal(model.instance$`isotopomer`, "EXPECTED_RESULT")
})

test_that("exp_mass_to_charge", {
  # tests for the property `exp_mass_to_charge` (numeric)
  # The experimental mass/charge value for the feature, by default assumed to be the mean across assays or a representative value. For approaches that report isotopomers as SMF rows, then the m/z of the isotopomer MUST be reported here.

  # uncomment below to test the property 
  #expect_equal(model.instance$`exp_mass_to_charge`, "EXPECTED_RESULT")
})

test_that("charge", {
  # tests for the property `charge` (integer)
  # The feature’s charge value using positive integers both for positive and negative polarity modes.

  # uncomment below to test the property 
  #expect_equal(model.instance$`charge`, "EXPECTED_RESULT")
})

test_that("retention_time_in_seconds", {
  # tests for the property `retention_time_in_seconds` (numeric)
  # The apex of the feature on the retention time axis, in a Master or aggregate MS run. Retention time MUST be reported in seconds. Retention time values for individual MS runs (i.e. before alignment) MAY be reported as optional columns. Retention time SHOULD only be null in the case of direct infusion MS or other techniques where a retention time value is absent or unknown. Relative retention time or retention time index values MAY be reported as optional columns, and could be considered for inclusion in future versions of mzTab as appropriate.

  # uncomment below to test the property 
  #expect_equal(model.instance$`retention_time_in_seconds`, "EXPECTED_RESULT")
})

test_that("retention_time_in_seconds_start", {
  # tests for the property `retention_time_in_seconds_start` (numeric)
  # The start time of the feature on the retention time axis, in a Master or aggregate MS run. Retention time MUST be reported in seconds. Retention time start and end SHOULD only be null in the case of direct infusion MS or other techniques where a retention time value is absent or unknown and MAY be reported in optional columns.

  # uncomment below to test the property 
  #expect_equal(model.instance$`retention_time_in_seconds_start`, "EXPECTED_RESULT")
})

test_that("retention_time_in_seconds_end", {
  # tests for the property `retention_time_in_seconds_end` (numeric)
  # The end time of the feature on the retention time axis, in a Master or aggregate MS run. Retention time MUST be reported in seconds. Retention time start and end SHOULD only be null in the case of direct infusion MS or other techniques where a retention time value is absent or unknown and MAY be reported in optional columns..

  # uncomment below to test the property 
  #expect_equal(model.instance$`retention_time_in_seconds_end`, "EXPECTED_RESULT")
})

test_that("abundance_assay", {
  # tests for the property `abundance_assay` (array[numeric])
  # The feature’s abundance in every assay described in the metadata section MUST be reported. Null or zero values may be reported as appropriate.

  # uncomment below to test the property 
  #expect_equal(model.instance$`abundance_assay`, "EXPECTED_RESULT")
})

test_that("opt", {
  # tests for the property `opt` (array[OptColumnMapping])
  # Additional columns can be added to the end of the small molecule feature 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")
})
lifs-tools/rmzTab-m documentation built on Jan. 26, 2023, 4:45 p.m.