def resultfiletopairs(filename, outname): print "init gene level proteins ..." proteinsA, proteinsB, orthologs = GeneLevelProtein.initGeneLevelProteins(filename, None, None, False) print "pairwise orthology mappings ..." pairwise = Helper.pairwiseOrthologs(orthologs, proteinsA, proteinsB) Helper.printPairsToFile(pairwise, outname)
def resultfiletopairs(filename, outname): print "init gene level proteins ..." proteinsA, proteinsB, orthologs = GeneLevelProtein.initGeneLevelProteins( filename, None, None, False) print "pairwise orthology mappings ..." pairwise = Helper.pairwiseOrthologs(orthologs, proteinsA, proteinsB) Helper.printPairsToFile(pairwise, outname)
tsvB = rcp.get("Filepaths", "tsvpath") + arg + ".tsv" taxB = arg elif opt in ("-w", "--write"): write = True else: ok = False if ok: if not write: "Option -w was not set." cutoff = rcp.getint("Options","domainlengthcutoff") #intialising proteinsA, proteinsB, orthologs, shortA, shortB = GeneLevelProtein.initGeneLevelProteins(fullfile, tsvA, tsvB, True) domainsA, domainsB, orthologsD = DomainLevelProtein.initDomainLevelProteins(domainfile) #calc pairwise ortholog mappings print "pairwise orthology mappings ..." pairwise = Helper.pairwiseOrthologs(orthologs, proteinsA, proteinsB) print "pairwise domain orthology mappings ..." pairwiseDomains = Helper.pairwiseOrthologs(orthologsD, domainsA, domainsB) #analysing stuff print "mapping domains to proteins ..." mapping = mapDomainOrthologsToProteins(pairwiseDomains, domainsA, domainsB) print "add counters to full sequence orthologs ..." counters = addMinimumDomainCountToFullOrthologs(pairwise) print "find proteins where all / not all / not any domains infer orthology ..." allDomains, notAll, notAny = findProteinsWhereAllDomainsInferOrthology(counters, mapping)