Ejemplo n.º 1
0
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")

print(matrix.to_json(indent=2))

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

    success = matrix.save()

    if success:
        matrix_id = matrix.id
        print("Succesfully saved matrix ID: %s" % matrix_id)

        matrix2 = AbundanceMatrix.load(matrix_id)

        print(matrix2.to_json(indent=2))

        deletion_success = matrix.delete()

        if deletion_success:
Ejemplo n.º 2
0
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!")

    success = matrix.save()

    if success:
        matrix_id = matrix.id
        print("Succesfully saved matrix ID: %s" % matrix_id)

        matrix2 = AbundanceMatrix.load(matrix_id)

        print(matrix2.to_json(indent=2))

        deletion_success = matrix.delete()

        if deletion_success: