Exemple #1
0
print("Local file: %s" % temp_file)

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

matrix = AbundanceMatrix()

matrix.comment = "test comment"
matrix.checksums = {"md5": "72bdc024d83226ccc90fbd2177e78d56"}
matrix.format = "csv"
matrix.format_doc = "http://format.url"
matrix.matrix_type = "host_cytokine"
matrix.study = "prediabetes"
matrix.size = 1000
matrix.local_file = temp_file
matrix.private_files = False

# Optional properties
matrix.sop = "the SOP"

# Annotations are 'computed_from' a 16S trimmed sequence set
matrix.links = {"computed_from": ["9bb18fe313e7fe94bf243da07e0032e4"]}

matrix.tags = ["test", "abundance", "ihmp"]
matrix.add_tag("matrix")

print(matrix.to_json(indent=2))

if matrix.is_valid():
    print("Valid!")
Exemple #2
0
print("Local file: %s" % temp_file)

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

matrix = AbundanceMatrix()

matrix.comment = "test comment"
matrix.checksums = { "md5": "72bdc024d83226ccc90fbd2177e78d56" }
matrix.format = "csv"
matrix.format_doc = "http://format.url"
matrix.matrix_type = "host_cytokine"
matrix.study = "prediabetes"
matrix.size = 1000
matrix.local_file = temp_file
matrix.private_files = False

# Optional properties
matrix.sop = "the SOP"

# Annotations are 'computed_from' a 16S trimmed sequence set
matrix.links = { "computed_from": [ "9bb18fe313e7fe94bf243da07e0032e4" ] }

matrix.tags = [ "test", "abundance", "ihmp" ]
matrix.add_tag("matrix")

print(matrix.to_json(indent=2))

if matrix.is_valid():
    print("Valid!")