Example #1
0
      "seq_meth": "blah",
      "sop": ["a", "b", "c"],
      "source_mat_id": ["a", "b", "c"],
      "submitted_to_insdc": True,
      "target_gene": "blah",
      "target_subfragment": "blah",
      "url": ["a", "b", "c"]
    }

print("Required fields: ")
print(SixteenSDnaPrep.required_fields())

test_prep = SixteenSDnaPrep()

test_prep.comment = "test comment. Hello world!"
test_prep.frag_size = 2
test_prep.lib_layout = "test lib_layout"
test_prep.lib_selection = "test lib_selection"
test_prep.mimarks = mimarks
test_prep.storage_duration = 3
test_prep.sequencing_center = "test center"
test_prep.sequencing_contact = "test contact"
test_prep.prep_id = "test prep id"
test_prep.ncbi_taxon_id = "NCBI123ABC"
test_prep.links = { "prepared_from": [ "610a4911a5ca67de12cdc1e4b4011876" ] }

test_prep.tags = [ "test", "16s_dna_prep", "ihmp" ]
test_prep.add_tag("another")
test_prep.add_tag("and_another")

print(test_prep.to_json(indent=2))
Example #2
0
    "seq_meth": "blah",
    "sop": ["a", "b", "c"],
    "source_mat_id": ["a", "b", "c"],
    "submitted_to_insdc": True,
    "target_gene": "blah",
    "target_subfragment": "blah",
    "url": ["a", "b", "c"]
}

print("Required fields: ")
print(SixteenSDnaPrep.required_fields())

test_prep = SixteenSDnaPrep()

test_prep.comment = "test comment. Hello world!"
test_prep.frag_size = 2
test_prep.lib_layout = "test lib_layout"
test_prep.lib_selection = "test lib_selection"
test_prep.mimarks = mimarks
test_prep.storage_duration = 3
test_prep.sequencing_center = "test center"
test_prep.sequencing_contact = "test contact"
test_prep.prep_id = "test prep id"
test_prep.ncbi_taxon_id = "NCBI123ABC"
test_prep.links = {"prepared_from": ["610a4911a5ca67de12cdc1e4b4011876"]}

test_prep.tags = ["test", "16s_dna_prep", "ihmp"]
test_prep.add_tag("another")
test_prep.add_tag("and_another")

print(test_prep.to_json(indent=2))