diff RepEnrich2.py @ 6:388a47ca4199 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/main/tools/repenrich2 commit a9af1284d644055565b6cf3401569694218ab8e9
author artbio
date Mon, 22 Apr 2024 10:31:50 +0000
parents 08e50af788f7
children 61e0404f0d76
line wrap: on
line diff
--- a/RepEnrich2.py	Sun Apr 21 21:52:40 2024 +0000
+++ b/RepEnrich2.py	Mon Apr 22 10:31:50 2024 +0000
@@ -197,14 +197,14 @@
 # print class-, family- and fraction-repeats counts to files
 with open("class_fraction_counts.tsv", 'w') as fout:
     for key in sorted(classfractionalcounts):
-        fout.write(f"{key}\t{classfractionalcounts[key]}\n")
+        fout.write(f"{key}\t{round(classfractionalcounts[key], 2)}\n")
 
 with open("family_fraction_counts.tsv", 'w') as fout:
     for key in sorted(familyfractionalcounts):
-        fout.write(f"{key}\t{familyfractionalcounts[key]}\n")
+        fout.write(f"{key}\t{round(familyfractionalcounts[key], 2)}\n")
 
 with open("fraction_counts.tsv", 'w') as fout:
     for key in sorted(fractionalcounts):
         fout.write(f"{key}\t{repeat_ref[key]['class']}\t"
                    f"{repeat_ref[key]['family']}\t"
-                   f"{fractionalcounts[key]}\n")
+                   f"{round(fractionalcounts[key], 2)}\n")