Skip to content

Commit dc458df

Browse files
committed
fix function to understand more than 1 database
1 parent ea818bc commit dc458df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

falmeida_py/plasmid_function.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ def plasmids_stats(bacannot_summary):
6161
if not results.empty:
6262

6363
# databases
64+
print( results['Database'].unique() )
6465
bacannot_summary[sample]['plasmid']['plasmidfinder']['meta'] = {}
65-
bacannot_summary[sample]['plasmid']['plasmidfinder']['meta']['database'] = results['Database'].unique().item()
66+
db_arr = results['Database'].unique()
67+
bacannot_summary[sample]['plasmid']['plasmidfinder']['meta']['database'] = db_arr.tolist() if len(db_arr) > 1 else db_arr.item()
6668

6769
# number of plasmid annotations
6870
total_number = len(results['Contig'].unique())

0 commit comments

Comments
 (0)