本文整理汇总了Python中dark.titles.TitlesAlignments.itervalues方法的典型用法代码示例。如果您正苦于以下问题:Python TitlesAlignments.itervalues方法的具体用法?Python TitlesAlignments.itervalues怎么用?Python TitlesAlignments.itervalues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dark.titles.TitlesAlignments
的用法示例。
在下文中一共展示了TitlesAlignments.itervalues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Reads
# 需要导入模块: from dark.titles import TitlesAlignments [as 别名]
# 或者: from dark.titles.TitlesAlignments import itervalues [as 别名]
scoreCutoff=args.scoreCutoff,
whitelist=args.whitelist,
blacklist=args.blacklist,
titleRegex=args.titleRegex,
negativeTitleRegex=args.negativeTitleRegex,
truncateTitlesAfter=args.truncateTitlesAfter,
taxonomy=args.taxonomy)
reads = Reads()
if (args.minMatchingReads is None and args.minMedianScore is None and
args.withScoreBetterThan is None and args.minNewReads is None):
# No need to collect into titles, just get the read ids from
# the matching alignments.
for readAlignment in readsAlignments:
reads.add(readAlignment.read)
else:
# We need to collect alignments into titles.
titlesAlignments = TitlesAlignments(readsAlignments).filter(
minMatchingReads=args.minMatchingReads,
minMedianScore=args.minMedianScore,
withScoreBetterThan=args.withScoreBetterThan,
minNewReads=args.minNewReads)
for titleAlignments in titlesAlignments.itervalues():
for alignment in titleAlignments.alignments:
reads.add(alignment.read)
reads.save(sys.stdout)
print >>sys.stderr, 'Found %d matching reads.' % len(reads)