Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing Sensitive to Susceptible in Outputs #183

Merged
merged 2 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Adds the ability to handle "complex" pbp5 mutations. When appriopriate many pbp5 point mutations will be reported as a single mutation.
* Resfinder CGE-predicted phenotypes are now reported in the summary and detailed summary alongside existing predictions.
* Corrected a typo in the position for acrB in the PointFinder drug key table.
* Changed the word sensitive to susceptible in outputs.

# Version 0.9.1

Expand Down
2 changes: 1 addition & 1 deletion staramr/results/AMRDetectionSummary.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _get_negative_resistance_entries(self, names_set: Set, resistance_frame: Dat

if self._include_phenotype():
negative_resistance_entries = pd.DataFrame(
[[x, 'None', 'Sensitive', '', ''] for x in negative_res_names_set],
[[x, 'None', 'Susceptible', '', ''] for x in negative_res_names_set],
columns=negative_columns).set_index('Isolate ID')
else:
negative_resistance_entries = pd.DataFrame([[x, 'None', '', ''] for x in negative_res_names_set],
Expand Down
2 changes: 1 addition & 1 deletion staramr/results/AMRDetectionSummaryResistance.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def _get_detailed_negative_columns(self):
return ['Isolate ID', 'Gene', 'Predicted Phenotype', 'Start', 'End']

def _get_summary_empty_values(self):
return {'Genotype': 'None', 'Predicted Phenotype': 'Sensitive'}
return {'Genotype': 'None', 'Predicted Phenotype': 'Susceptible'}

def _get_summary_resistance_columns(self):
return ['Genotype', 'Predicted Phenotype', 'CGE Predicted Phenotype', 'Plasmid']
Expand Down
2 changes: 1 addition & 1 deletion staramr/subcommand/Search.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def _setup_args(self, arg_parser):
default=ExcludeGenesList.get_default_exclude_file(),
required=False)
report_group.add_argument('--exclude-negatives', action='store_true', dest='exclude_negatives',
help='Exclude negative results (those sensitive to antimicrobials) [False].',
help='Exclude negative results (those susceptible to antimicrobials) [False].',
required=False)
report_group.add_argument('--exclude-resistance-phenotypes', action='store_true',
dest='exclude_resistance_phenotypes',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def testIndexRangePlasmids(self):
self.assertEqual(len(summary_results.index), 1, 'Wrong number of rows')

self.assertEqual(summary_results['Genotype'].iloc[0], 'None', msg='Wrong Genotype value')
self.assertEqual(summary_results['Predicted Phenotype'].iloc[0], 'Sensitive',
self.assertEqual(summary_results['Predicted Phenotype'].iloc[0], 'Susceptible',
msg='Wrong Predicted Phenotype value')
self.assertEqual(summary_results['Plasmid'].iloc[0], 'IncFII(pKPX1)', msg='Wrong Plasmid Type')

Expand All @@ -217,7 +217,7 @@ def testParseUnderscoresBracketsInFASTA(self):
self.assertEqual(len(summary_results.index), 1, 'Wrong number of rows')

self.assertEqual(summary_results['Genotype'].iloc[0], 'None', msg='Wrong Genotype value')
self.assertEqual(summary_results['Predicted Phenotype'].iloc[0], 'Sensitive',
self.assertEqual(summary_results['Predicted Phenotype'].iloc[0], 'Susceptible',
msg='Wrong Predicted Phenotype value')
self.assertEqual(summary_results['Plasmid'].iloc[0], 'rep21', msg='Wrong Plasmid Type')

Expand Down
8 changes: 4 additions & 4 deletions staramr/tests/unit/results/test_AMRDetectionSummary.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ def testDetailedSummary_noRes_noPoint(self):
self.assertEqual('None', detailed_summary['Gene'].iloc[1], 'Genes not equal')

self.assertEqual('', detailed_summary['Predicted Phenotype'].iloc[0], 'Predicted Phenotype not equal')
self.assertEqual('Sensitive', detailed_summary['Predicted Phenotype'].iloc[1], 'Predicted Phenotype not equal')
self.assertEqual('Susceptible', detailed_summary['Predicted Phenotype'].iloc[1], 'Predicted Phenotype not equal')

def testDetailedSummary_noRes_noPlasmid(self):
point_table = self.pointfinder_table
Expand Down Expand Up @@ -676,7 +676,7 @@ def testDetailedSummary_noFinders(self):
self.assertEqual('None', detailed_summary['Gene'].iloc[1], 'Genes not equal')

self.assertEqual('', detailed_summary['Predicted Phenotype'].iloc[0], 'Predicted Phenotype not equal')
self.assertEqual('Sensitive', detailed_summary['Predicted Phenotype'].iloc[1], 'Predicted Phenotype not equal')
self.assertEqual('Susceptible', detailed_summary['Predicted Phenotype'].iloc[1], 'Predicted Phenotype not equal')

def testDetailedSummary_multiFiles(self):
amr_detection_summary = AMRDetectionSummaryResistance(self.detailed_summary_multi_files,
Expand Down Expand Up @@ -726,8 +726,8 @@ def testDetailedSummary_multiFiles(self):
self.assertEqual('IncFIB(K)', detailed_summary['Gene'].iloc[10], 'Genes not equal')
self.assertEqual('None', detailed_summary['Gene'].iloc[11], 'Genes not equal')

self.assertEqual('Sensitive', detailed_summary['Predicted Phenotype'].iloc[9], 'Predicted Phenotype not equal')
self.assertEqual('Sensitive', detailed_summary['Predicted Phenotype'].iloc[11], 'Predicted Phenotype not equal')
self.assertEqual('Susceptible', detailed_summary['Predicted Phenotype'].iloc[9], 'Predicted Phenotype not equal')
self.assertEqual('Susceptible', detailed_summary['Predicted Phenotype'].iloc[11], 'Predicted Phenotype not equal')

def testSimplifyingPointfinderMutations(self):
df = pd.DataFrame([
Expand Down
Loading