Skip to content

Commit

Permalink
Merge pull request #10 from simpsonlab/add_scorpio_to_summary
Browse files Browse the repository at this point in the history
Fixed pangolin note tag
  • Loading branch information
rdeborja authored Jun 10, 2021
2 parents d98fda2 + 28b6260 commit 32ae56b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions ncov/parser/Lineage.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ def get_notes(self, row):
alt = re.sub(';', '', n_dict[4])
ref = re.sub(';', '', n_dict[7])
amb = n_dict[-1]
return '/'.join([alt, ref, amb])
#return n.replace(" ", "_")
tag = 'alt/ref/amb:'
value = '/'.join([alt, ref, amb])
return ''.join([tag, value])


def get_scorpio_call(self, row):
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_Lineage.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LineageTest(unittest.TestCase):
def test_create_lineage_dictionary(self):
lineage_dict = test_lineage.create_lineage_dictionary()
self.assertEqual(lineage_dict['sampleA']['lineage'], 'B.1.1.7')
self.assertEqual(lineage_dict['sampleA']['notes'], '18/3/0')
self.assertEqual(lineage_dict['sampleA']['notes'], 'alt/ref/amb:18/3/0')
self.assertEqual(lineage_dict['sampleB']['lineage'], 'B.1.1.7')
self.assertEqual(lineage_dict['sampleC']['lineage'], 'B.1.1.7')
self.assertEqual(lineage_dict['sampleC']['scorpio_call'], 'cB.1.1.7')
Expand Down

0 comments on commit 32ae56b

Please sign in to comment.