diff --git a/scripts/report/makePDF_indivMD.py b/scripts/report/makePDF_indivMD.py index 52a2cf291a1c79b690b84efc1c117d0911861a86..00170522d3a62ce3f77b71e3c9783fa71358c3b6 100644 --- a/scripts/report/makePDF_indivMD.py +++ b/scripts/report/makePDF_indivMD.py @@ -139,6 +139,9 @@ if params_asm2provided: lines = scoresOnlyFile.readlines() lines = [line.rstrip() for line in lines] + percentage_data = re.split(r'[,\[\]]', lines[0]) + percentage_values = {item.split(':')[0]: item.split(':')[1].split('[')[0] for item in percentage_data if len(item) > 0} + percentages = [] numbers = [] # Iterate through the data starting from the second line @@ -163,13 +166,18 @@ if params_asm2provided: }) busco_table = pd.merge(busco_table, busco_table_2, on='Metric') - print (busco_table) + print(busco_table) else: gfastats_asm2="" busco_asm2="" +# Change the percentage values to 100.0 for 'Total searched groups' +busco_table.loc[busco_table['Metric'] == 'Total searched groups', 'asm1 %'] = 100.0 +if 'asm2 %' in busco_table.columns: + busco_table.loc[busco_table['Metric'] == 'Total searched groups', 'asm2 %'] = 100.0 + output_file=snakemake.output[0] with open(output_file, 'w') as outFile: @@ -271,4 +279,4 @@ with open(output_file, 'w') as outFile: print("\\", file=outFile) print("\\Large", file=outFile) print("", file=outFile) - + \ No newline at end of file