def create_clusters(f_clusters,f_arag,fasta_file,f_family, f_biomart): ''' Loads an orthomcl output file, to create clusters. In addition proteins are added from the corresponding hmmout file, species information is added from speciesMapping(Andreas) and fasta sequences for each protein are loaded. Function returns an interable with cluster objects''' proteinortho, arangements = ProteinOrtho(), Arangements() family, biomart = Family(), Biomart() proteinortho.load(f_clusters) arangements.load(f_arag) family.load(f_family) biomart.load(f_biomart) for protein in arangements: protein.add_sequence(fasta_file,"fasta") protein.add_family(family) protein.add_identifiers(biomart) for cluster in proteinortho: cluster.add_proteins(arangements) cluster.add_cluster_to_members() cluster.add_family() return proteinortho
def main(): #clusters = create_clusters(options.clusters, #options.hmmout, #options.fasta, #options.species, #options.family) #pickle.dump(clusters, open(options.pickle, "wb")) proteinortho = ProteinOrtho() proteinortho.load(options.clusters)