Skip to content

Commit

Permalink
Fix a bug left by changes for #467: translate "INT" region to "IN".
Browse files Browse the repository at this point in the history
Also link to DOI number on Zenodo's web site.
  • Loading branch information
donkirkby committed May 13, 2019
1 parent 8d11a09 commit b3d9292
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 2 deletions.
9 changes: 8 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,13 @@ similar steps to setting up a development workstation. Follow these steps:
18. Send an e-mail to users describing the major changes in the release.
19. Close the milestone for this release, create one for the next release, and
decide which issues you will include in that milestone.
20. When the release is stable, check that it's included on the [Zenodo] page.
If you included more than one tag in the same release, the new tags have
not triggered Zenodo versions. Edit the release on GitHub, copy the
description text, update the release, then click the Delete button. Then
create a new release with the same description, and that will trigger a
Zenodo version.

[release]: https://help.github.com/categories/85/articles
[parse_args]: https://github.com/cfe-lab/MiCall/blame/master/micall_watcher.py
[parse_args]: https://github.com/cfe-lab/MiCall/blame/master/micall_watcher.py
[Zenodo]: https://doi.org/10.5281/zenodo.2644171
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
## Processing FASTQ data from an Illumina MiSeq ##
[![Build Status]][travis]
[![Code Coverage]][codecov]
[![DOI]][zenodo]


[Build Status]: https://travis-ci.org/cfe-lab/MiCall.svg?branch=master
[travis]: https://travis-ci.org/cfe-lab/MiCall
[Code Coverage]: https://codecov.io/github/cfe-lab/MiCall/coverage.svg?branch=master
[codecov]: https://codecov.io/github/cfe-lab/MiCall?branch=master
[DOI]: https://zenodo.org/badge/DOI/10.5281/zenodo.2644171.svg
[zenodo]: https://doi.org/10.5281/zenodo.2644171

Maps all the reads from a sample against a set of reference sequences, then
stitches all the reads into consensus sequences and coverage maps.
Expand Down
2 changes: 2 additions & 0 deletions micall/resistance/asi_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ def load_yaml(self, rules_config, genotype):
self.drugs[drug_code] = (drug['name'], drug_rules)

def get_gene_positions(self, gene):
if gene == 'INT':
gene = 'IN'
positions = set([])
for drug_class in self.gene_def[gene]:
for drug_code in self.drug_class[drug_class]:
Expand Down
54 changes: 53 additions & 1 deletion micall/tests/test_asi_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def test_negative_positions(self):

self.assertEqual(expected_positions, positions)

def test(self):
def test_multiple_positions(self):
drugs = """\
<DRUG>
<NAME>ABC</NAME>
Expand All @@ -457,6 +457,58 @@ def test(self):

self.assertEqual(expected_positions, positions)

def test_integrase_position(self):
xml = """\
<ALGORITHM>
<ALGNAME>HIVDB</ALGNAME>
<ALGVERSION>fake</ALGVERSION>
<ALGDATE>2017-03-02</ALGDATE>
<DEFINITIONS>
<GENE_DEFINITION>
<NAME>IN</NAME>
<DRUGCLASSLIST>INSTI</DRUGCLASSLIST>
</GENE_DEFINITION>
<LEVEL_DEFINITION>
<ORDER>1</ORDER>
<ORIGINAL>Susceptible</ORIGINAL>
<SIR>S</SIR>
</LEVEL_DEFINITION>
<LEVEL_DEFINITION>
<ORDER>5</ORDER>
<ORIGINAL>High-Level Resistance</ORIGINAL>
<SIR>R</SIR>
</LEVEL_DEFINITION>
<DRUGCLASS>
<NAME>INSTI</NAME>
<DRUGLIST>BIC</DRUGLIST>
</DRUGCLASS>
<GLOBALRANGE><![CDATA[(-INF TO 9 => 1, 10 TO INF => 5)]]></GLOBALRANGE>
<COMMENT_DEFINITIONS>
</COMMENT_DEFINITIONS>
</DEFINITIONS>
<DRUG>
<NAME>BIC</NAME>
<FULLNAME>bictegravir</FULLNAME>
<RULE>
<CONDITION><![CDATA[SCORE FROM(51Y => 10)]]></CONDITION>
<ACTIONS>
<SCORERANGE>
<USE_GLOBALRANGE/>
</SCORERANGE>
</ACTIONS>
</RULE>
</DRUG>
<MUTATION_COMMENTS>
</MUTATION_COMMENTS>
</ALGORITHM>
"""
asi = AsiAlgorithm(StringIO(xml))
expected_positions = {51}

positions = asi.get_gene_positions('INT')

self.assertEqual(expected_positions, positions)

def test_custom_score_range(self):
drugs = """\
<DRUG>
Expand Down

0 comments on commit b3d9292

Please sign in to comment.