Skip to content

Commit

Permalink
Программа пересечения и вычитания, V4.2
Browse files Browse the repository at this point in the history
- Уменьшил вложенность в пайплайне объединения интервалов. Issue #7 это, к сожалению, не решает. Новый код пусть будет отправной точкой для дальнейшего исследования проблемы.
  • Loading branch information
PlatonB authored Apr 18, 2020
1 parent f4e2125 commit 0478a36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions intersect_subtract.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = 'V4.1'
__version__ = 'V4.2'

def add_args():
'''
Expand Down Expand Up @@ -226,8 +226,8 @@ def intersect_subtract(self, left_coll_name):
pipeline = [{'$lookup': {'from': right_coll_name,
'let': {'chrom': '$chrom', 'start': '$start', 'end': '$end'},
'pipeline': [{'$match': {'$expr': {'$and': [{'$eq': ['$$chrom', '$chrom']},
{'$lt': [{'$max': ['$$start', '$start']},
{'$min': ['$$end', '$end']}]}]}}}],
{'$lt': ['$$start', '$end']},
{'$lt': ['$start', '$$end']}]}}}],
'as': right_coll_name.replace('.', '_')}} for right_coll_name in right_coll_names]
else:
pipeline = [{'$lookup': {'from': right_coll_name,
Expand Down

0 comments on commit 0478a36

Please sign in to comment.