) / len(reactions_with_gene) ont = self.db.ontologies.find_one({"term": pw.lower()}) if ont: name = ont["name"] else: name = pw pw_obj = PathwaySumary(term=pw, name=name, count=pws_dict[pw]["genes"], properties=pws_dict[pw]) self.pathways.append(pw_obj) if __name__ == "__main__": from SNDG.BioMongo.Process.BioMongoDB import BioMongoDB from SNDG.BioMongo.Process.Importer import _common_annotations, _protein_iter, import_kegg_annotation, \ index_seq_collection, build_statistics, load_pathways mdb = BioMongoDB("tdr", port=27018) # ps = PathwaysAnnotator(mdb.db, "SaureusN315", "/data/organismos/SaureusN315/pathways/") # ps.sbml("Red_Staphylo_Curada_rs.sbml") # ps.species_filter("allfilters_con_c.dat") # ps.extract_genes_from_notes(lambda notes: gene_name_regexp.findall(notes)) # ps.annotate() # index_seq_collection(mdb.db, "SaureusN315", pathways=True, go=True, keywords=True, ec=True, organism_idx=True, # structure=False) build_statistics(mdb.db, "SaureusN315")
from SNDG.BioMongo.Process.Importer import load_pathways, build_statistics from SNDG.BioMongo.Process.BioCyc2Mongo import BioCyc from SNDG.BioMongo.Process.BioMongoDB import BioMongoDB from SNDG.BioMongo.Model.SeqCollection import SeqCollection import pymongo port = 27018 mdb = BioMongoDB("tdr", port=port) db = pymongo.MongoClient(port=port).pdb load_pathways("cruzi", "/data/organismos/cruzi/pathways/pathways-sm.sbml", mdb.db, "/data/organismos/cruzi/pathways/", filter_file="allfilters_con_c.dat") biocyc = BioCyc(mdb.db) biocyc.user = BioMongoDB.demo biocyc.pre_build_index(SeqCollection.objects(name="cruzi").get()) build_statistics(mdb.db, "cruzi")
load_pathways(name, "/data/organismos/" + name + "/annotation/pathways/small.sbml", mdb.db, "/data/organismos/" + name + "/annotation/pathways", 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) 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/
# 200918, # 200930, # 200938, # 200940, # 201174, # 203682, # 203691, # 204441, # 204455, # 204457, # 267890, # 508458, # 544448, # 578822, # 1293497, # 2157} # # from SNDG.BioMongo.Process.BioCyc2Mongo import BioCyc # biocyc = BioCyc("saureus") # biocyc.complete_pathways("ILEX_PARA2", "/data/databases/biocyc/metacyc/pathways.dat", # "/data/databases/biocyc/metacyc/reactions.dat", filter_tax) index_seq_collection(mdb.db, "ILEX_PARA", ec=True, go=False, keywords=True, organism_idx=True, pathways=True, structure=False) build_statistics(mdb.db, "ILEX_PARA")