Esempio n. 1
0
#                         )
# import_prop_blast(mdb.db, name, "hit_in_deg",
#                   "/data/organismos/" + name + "/annotation/offtarget/degaa-p.tbl",
#                   "table", "Hit in DEG database",
#                   value_fn=lambda x: x.identity > 70,
#                   default_value=True,
#                   no_hit_value=False, choices=["True", "False"], type="value", defaultOperation="equal")
#
# import_prop_blast(mdb.db, name, "human_offtarget",
#                   "/data/organismos/" + name + "/annotation/offtarget/gencode.tbl",
#                   "table", "Human offtarget score (1 - best hit identity)",
#                   value_fn=lambda x: 1 - (x.identity * 1.0 / 100),
#                   default_value=0.4,
#                   no_hit_value=1)
# import_prop_blast(mdb.db, name, "gut_microbiota_offtarget",
#                   "/data/organismos/" + name + "/annotation/offtarget/gut_microbiota.tbl",
#                   "table", "Gut microbiota offtarget score (1 - best hit identity)",
#                   value_fn=lambda x: 1 - (x.identity * 1.0 / 100),
#                   default_value=0.4,
#                   no_hit_value=1)


# index_seq_collection(mdb.db,name,pathways=False,go=False,keywords=False,ec=False,organism_idx=False,structure=True)
# load_pathways(name, "/data/organismos/Ainsu/annotation/pwtools/small_molecule.sbml", mdb.db,
#               "/data/organismos/Ainsu/annotation/pathways",
#               gregexp="\(([\-\w\.]+)\)", filter_file="allfilters_con_c.dat")
# index_seq_collection(mdb.db,name,pathways=False,go=False,keywords=True,ec=False,organism_idx=True,structure=False)
# build_statistics(mdb.db,name)
dst_db = pymongo.MongoClient(port=27018).tdr
mdb.copy_genome(name,name,dst_db)
Esempio n. 2
0
                         keywords=True,
                         ec=True,
                         organism_idx=True,
                         structure=False)
    build_statistics(mdb.db, name)

import subprocess as sp
for xx in orgs:
    x = xx[0]
    for y in tqdm(
            glob("/data/organismos/" + x +
                 "/estructura/sndg/modelos/*.pocket.json")):
        sp.call("ln %s %s" %
                (y, ("/data/organismos/%s/estructura/sndg/pockets/" % x) +
                 y.split("/")[-1].replace(".pdb.pocket", "")),
                shell=True)

# rsync -avzh /data/organismos/Mbovis/estructura/sndg/pockets/* marvin:/data/organismos/Mbovis/estructura/sndg/pockets/
# rsync -avzh /data/organismos/Mbovis/estructura/sndg/modelos/*.pdb marvin:/data/organismos/Mbovis/estructura/sndg/modelos/

# ssh -L 27018:localhost:27017 marvin

pdbdb = dbdst = MongoClient(port=27017).pdb
dbdst = MongoClient(port=27018).pdb
for xx in orgs:
    x = xx[0]
    mdb.copy_genome(x, dst_db=MongoClient(port=27018).tdr)
    for s in tqdm(pdbdb.structures.find({"organism": x}),
                  total=pdbdb.structures.count({"organism": x})):
        dbdst.structures.insert(s)
Esempio n. 3
0
#                   value_fn=lambda x: 1 - (x.identity * 1.0 / 100),
#                   default_value=0.4,
#                   no_hit_value=1)

#add column names
# mdb.load_metadata( name,"/mnt/data/data/organismos/Aaye/annotation/gut_microbiome.tbl")

# from pymongo import MongoClient
# db = MongoClient().pdb
# sa = StructureAnotator(basepath, struct_path=lambda wd, modeldoc: glob("/".join(
#     [wd, modeldoc.templates[0].aln_query.name, modeldoc.templates[0].aln_query.name, modeldoc.name, "*.pdb"]))[0])
# total = sa.total(db, organism, {})
#
# with tqdm(sa.iterator(db, organism, {}), total=total) as pbar:
#     for model in pbar:
#         pbar.set_description(model.name)
#
#         template = model. templates[0]
#         protein = Protein.objects(organism=organism, alias=template.aln_query.name).get()
#         sa.annotate_model(model, protein.domains())
#         model.save()

# index_seq_collection(mdb.db,name,pathways=False,go=False,keywords=False,ec=False,organism_idx=False,structure=True)
# load_pathways(name, "/data/organismos/Aaye/annotation/pathways/small.sbml", mdb.db,
#               "/data/organismos/Aaye/annotation/pathways_data/",
#               gregexp="\(([\-\w\.]+)\)", filter_file="allfilters_con_c.dat")
# index_seq_collection(mdb.db,name,pathways=True,go=True,keywords=True,ec=True,organism_idx=True,structure=False)
# build_statistics(mdb.db,name)

mdb.copy_genome("Aaye", dst_db=pymongo.MongoClient(port=27018).tdr)