# HG changeset patch # User dfornika # Date 1569452896 14400 # Node ID b5df889acab307262c7117d160861e2cd30ebecd # Parent d099ef46fd42dbb9132a81d3656abfd7815cbe3c planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/tools/micall-lite commit 822e7e1c2de31a72c2a13bcc15b9df06b699561f-dirty diff -r d099ef46fd42 -r b5df889acab3 amino2consensus.py --- a/amino2consensus.py Wed Sep 25 18:51:15 2019 -0400 +++ b/amino2consensus.py Wed Sep 25 19:08:16 2019 -0400 @@ -10,7 +10,7 @@ def determine_amino(amino_counts, threshold): amino = "" total_count = sum(amino_counts.values()) - amino_with_max_counts, count = sorted(amino_counts.items(), key=lambda item: item[1], reverse=True)[0] + amino_with_max_counts = sorted(amino_counts, key=amino_counts.get, reverse=True)[0] if total_count == 0: amino = "#" elif (amino_counts[amino_with_max_counts] / float(total_count)) > threshold: @@ -55,6 +55,6 @@ if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("amino", help="MiCall amino.csv output file") - parser.add_argument("--threshold", default=0.15, help="Threshold for calling") + parser.add_argument("--threshold", default=0.15, type=float, help="Threshold for calling") args = parser.parse_args() main(args)