Ejemplo n.º 1
0
set_logging()

session = iHMPSession(username, password)

print("Creating a temp file for example/testing purposes.")
temp_file = tempfile.NamedTemporaryFile(delete=False).name
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 = "fastq"
matrix.format_doc = "http://format.url"
matrix.matrix_type = "host_cytokine"
matrix.study = "prediabetes"
matrix.size = 1000
matrix.local_file = temp_file

# 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")
Ejemplo n.º 2
0
set_logging()

session = iHMPSession(username, password)

print("Creating a temp file for example/testing purposes.")
temp_file = tempfile.NamedTemporaryFile(delete=False).name
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"]