Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mem dev #6

Merged
merged 4 commits into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading