Skip to content

Commit

Permalink
Merge pull request #42 from Akazhiel/master
Browse files Browse the repository at this point in the history
Fixed rpk calculation
  • Loading branch information
jfnavarro authored Feb 22, 2021
2 parents d7dd09f + b0b77ba commit e191b79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions merge_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def main(dna_variants,
counts = counts_table.iloc[:, 6].to_numpy()
counts_filtered = list(filter(lambda x: x != 0, counts))
lengths = counts_table['Length'].to_numpy()
rpk = genes / lengths
counts_table['RPKM'] = (rpk / sum(genes)) * 1e9
rpk = counts / lengths
counts_table['RPKM'] = (rpk / sum(counts)) * 1e9
counts_table['TPM'] = (rpk / sum(rpk)) * 1e6
gene_counts = counts_table.iloc[:, [0, 6]].values.tolist()
for gene, expr in gene_counts:
Expand Down

0 comments on commit e191b79

Please sign in to comment.