Skip to content

Commit

Permalink
Merge pull request #6 from treangenlab/mem-dev
Browse files Browse the repository at this point in the history
Mem dev
  • Loading branch information
bkille authored Mar 25, 2024
2 parents 839fb98 + 2d70adf commit 97d396a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lemur
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import numpy as np
import pysam


__version__ = "1.0.0"
__version__ = "1.0.1"


def CTRLChandler(signum, frame):
Expand Down Expand Up @@ -422,7 +422,8 @@ class LemurRunEnv():

P_rgs_data["Read_ID"].append(qname)
P_rgs_data["Target_ID"].append(species_tid)
P_rgs_data["cigar"].append(cigar)
if not self.args.aln_score == "AS":
P_rgs_data["cigar"].append(cigar)
P_rgs_data["Gene"].append(gene)
P_rgs_data["Reference"].append(aln.reference_name)
P_rgs_data["aln_len"].append(self.__get_aln_len(aln))
Expand Down Expand Up @@ -459,6 +460,7 @@ class LemurRunEnv():
repeat(self.fixed_cigar)))

del P_rgs_data["cigar"]

self.P_rgs_df = pd.DataFrame(data=P_rgs_data)
self.P_rgs_df["max_aln_len"] = self.P_rgs_df.groupby("Read_ID")["aln_len"].transform('max')
self.P_rgs_df["log_P"] = self.P_rgs_df["log_P"] * self.P_rgs_df["max_aln_len"] / self.P_rgs_df["aln_len"]
Expand Down

0 comments on commit 97d396a

Please sign in to comment.