Skip to content

Commit

Permalink
Bump make_count_table.py to 1.2.0, reduce memory usage by 90% in exam…
Browse files Browse the repository at this point in the history
…ple data
  • Loading branch information
boulund committed Apr 24, 2018
1 parent 349303d commit 6341201
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/make_count_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""Make count table of all samples from BBMap pileup.sh rpkm tables, and two-column annotation file."""
__author__ = "Fredrik Boulund"
__date__ = "2018-04-24"
__version__ = "1.1.0"
__version__ = "1.2.0"

from sys import argv, exit, stderr
from collections import defaultdict
Expand Down Expand Up @@ -39,7 +39,8 @@ def parse_rpkm(rpkm_file):
except ValueError:
print("ERROR: Could not parse RPKM file line {}:\n{}".format(line_no, rpkm_file),
file=stderr)
read_counts[ref] = int(reads)
if int(reads) != 0:
read_counts[ref] = int(reads)
return read_counts


Expand Down

0 comments on commit 6341201

Please sign in to comment.