diff options
author | Muriithi Frederick Muriuki | 2021-08-30 09:50:44 +0300 |
---|---|---|
committer | Muriithi Frederick Muriuki | 2021-08-30 09:50:44 +0300 |
commit | bb1fd69fa24cec4ff605450d241601b3f0ced8cb (patch) | |
tree | b29b576c8ddca62d95904d46d75d46b3aaeff212 /gn3 | |
parent | b95ad3bd2ce8bc22d1dcadefdf76c43f28309984 (diff) | |
download | genenetwork3-bb1fd69fa24cec4ff605450d241601b3f0ced8cb.tar.gz |
Remove empty line
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Remove empty line at the end of the traits file
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/computations/qtlreaper.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gn3/computations/qtlreaper.py b/gn3/computations/qtlreaper.py index 49d363b..a88659e 100644 --- a/gn3/computations/qtlreaper.py +++ b/gn3/computations/qtlreaper.py @@ -27,7 +27,9 @@ def generate_traits_file(strains, trait_values, traits_filename): header = "Traits\t{}\n".format("\t".join(strains)) data = [header] + [ "T{}\t{}\n".format(i+1, "\t".join([str(i) for i in t])) - for i, t in enumerate(trait_values)] + for i, t in enumerate(trait_values[:-1])] + [ + "T{}\t{}".format(len(trait_values), "\t".join([str(i) for i in t])) + for t in trait_values[-1:]] with open(traits_filename, "w") as outfile: outfile.writelines(data) |