本文整理汇总了Python中Helper.pairwiseOrthologs方法的典型用法代码示例。如果您正苦于以下问题:Python Helper.pairwiseOrthologs方法的具体用法?Python Helper.pairwiseOrthologs怎么用?Python Helper.pairwiseOrthologs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Helper
的用法示例。
在下文中一共展示了Helper.pairwiseOrthologs方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: resultfiletopairs
# 需要导入模块: import Helper [as 别名]
# 或者: from Helper import pairwiseOrthologs [as 别名]
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)
示例2: mapDomainOrthologsToProteins
# 需要导入模块: import Helper [as 别名]
# 或者: from Helper import pairwiseOrthologs [as 别名]
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)
print "find protein orthology only by domains ..."
onlyByDomains = findProteinsOrthologyOnlyByDomains(proteinsA, proteinsB, mapping, counters, taxA, taxB, cutoff)
print "start filtering ..."
# run length filter
示例3: DomainInfo
# 需要导入模块: import Helper [as 别名]
# 或者: from Helper import pairwiseOrthologs [as 别名]
for line in handle.readlines():
splitted = line.split()
for entry in tsvA[splitted[0]]:
d = DomainInfo(accession=entry.seqId, start=entry.alignmentStart, end=entry.alignmentEnd)
if d not in allDomains:
allDomains.append(d)
countA += 1
for entry in tsvB[splitted[1]]:
d = DomainInfo(accession=entry.seqId, start=entry.alignmentStart, end=entry.alignmentEnd)
if d not in allDomains:
allDomains.append(d)
countB += 1
handle.close()
domainsA, domainsB, orthologsD = DomainLevelProtein.initDomainLevelProteins(dfile)
pairwiseDomains = Helper.pairwiseOrthologs(orthologsD, domainsA, domainsB)
supportedDomains = []
for pair in pairwiseDomains:
d1 = DomainInfo(accession = pair.first.accession, start=pair.first.start, end=pair.first.end)
d2 = DomainInfo(accession = pair.second.accession, start=pair.second.start, end=pair.second.end)
if d1 in allDomains and d1 not in supportedDomains:
supportedDomains.append(d1)
if d2 in allDomains and d2 not in supportedDomains:
supportedDomains.append(d2)
#list_a = [n for n in list_a if n not in list_b]
notSupportedDomains = [item for item in allDomains if item not in supportedDomains]