示例#1
0
root = logging.getLogger()
root.setLevel(logging.DEBUG)
ch = logging.StreamHandler(sys.stdout)
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
root.addHandler(ch)

session = iHMPSession(username, password)

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

lip = Lipidome()

lip.checksums = { "md5": "72bdc024d83226ccc90fbd2177e78d56" }
lip.study = "prediabetes"
lip.subtype = "host"

print("Creating a temp file for example/testing purposes.")
temp_file = tempfile.NamedTemporaryFile(delete=False).name
print("Local file: %s" % temp_file)

lip.local_file = temp_file

# Optional properties
lip.comment = "test lipidome comment"
lip.format = "gff3"
lip.format_doc = "the format url"

# Lipidomes are 'derived_from' MicrobiomeAssayPreps and HostAssayPreps
示例#2
0
    ch = logging.StreamHandler(sys.stdout)
    ch.setLevel(logging.DEBUG)
    formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
    ch.setFormatter(formatter)
    root.addHandler(ch)

set_logging()

session = iHMPSession(username, password)

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

lip = Lipidome()

lip.checksums = {"md5": "72bdc024d83226ccc90fbd2177e78d56"}
lip.study = "prediabetes"
lip.subtype = "host"

print("Creating a temp file for example/testing purposes.")
temp_file = tempfile.NamedTemporaryFile(delete=False).name
print("Local file: %s" % temp_file)

# Optional properties
lip.comment = "test lipidome comment"
lip.format = "gff3"
lip.format_doc = "the format url"
lip.local_file = temp_file
lip.private_files = True

# Lipidomes are 'derived_from' MicrobiomeAssayPreps and HostAssayPreps