File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -130,10 +130,13 @@ def resistance_stats(bacannot_summary):
130
130
#
131
131
# check for rgi orthologies
132
132
#
133
- if gene in bacannot_summary [sample ]['resistance' ]['rgi' ]:
134
- bacannot_summary [sample ]['resistance' ]['amrfinderplus' ][gene ]['card_aro' ] = bacannot_summary [sample ]['resistance' ]['rgi' ][gene ]['card_aro' ]
135
- else :
136
- bacannot_summary [sample ]['resistance' ]['amrfinderplus' ][gene ]['card_aro' ] = None
133
+ try :
134
+ if gene in bacannot_summary [sample ]['resistance' ]['rgi' ]:
135
+ bacannot_summary [sample ]['resistance' ]['amrfinderplus' ][gene ]['card_aro' ] = bacannot_summary [sample ]['resistance' ]['rgi' ][gene ]['card_aro' ]
136
+ else :
137
+ bacannot_summary [sample ]['resistance' ]['amrfinderplus' ][gene ]['card_aro' ] = None
138
+ except :
139
+ bacannot_summary [sample ]['resistance' ]['amrfinderplus' ][gene ]['card_aro' ] = None
137
140
138
141
#################
139
142
### resfinder ###
You can’t perform that action at this time.
0 commit comments