Skip to content

Commit

Permalink
update numeric indexing to suppress pandas warning, remove debug prin…
Browse files Browse the repository at this point in the history
…t output
  • Loading branch information
jykr committed Oct 2, 2023
1 parent ee0e4e2 commit 1a218af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
8 changes: 4 additions & 4 deletions bean/mapping/GuideEditCounter.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,13 @@ def _count_guide_edits(
def _get_strand_offset_from_guide_index(self, guide_idx: int) -> Tuple[int, int]:
"""Returns guide starnd and offset for a given guide index."""
if self.guides_has_strands:
strand = self.screen.guides.strand[guide_idx]
strand = self.screen.guides.strand.iloc[guide_idx]
if strand in strand_str_to_int:
guide_strand = strand_str_to_int[strand]
offset = _get_stranded_guide_offset(
strand=guide_strand,
start_pos=self.screen.guides.start_pos[guide_idx],
guide_len=self.screen.guides.guide_len[guide_idx],
start_pos=self.screen.guides.start_pos.iloc[guide_idx],
guide_len=self.screen.guides.guide_len.iloc[guide_idx],
)
else:
guide_strand = 1
Expand Down Expand Up @@ -448,7 +448,7 @@ def _count_reporter_edits(
single_base_qual_cutoff: Ignore this base if the Phread quality score is less than this threshold
guide_allele: Allele from baseedit in gRNA spacer sequence when paired with guide allele.
"""
ref_reporter_seq = self.screen.guides.reporter[matched_guide_idx]
ref_reporter_seq = self.screen.guides.reporter.iloc[matched_guide_idx]
read_reporter_seq, read_reporter_qual = self.get_reporter_seq_qual(R2_record)

guide_strand, offset = self._get_strand_offset_from_guide_index(
Expand Down
3 changes: 0 additions & 3 deletions bean/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ def NormalModel(
with replicate_plate2:
with pyro.plate("guide_plate3", data.n_guides, dim=-1):
a = get_alpha(expected_guide_p, data.size_factor, data.sample_mask, data.a0)
print(a)
print(a.max())
print(a.min())
a_bcmatch = get_alpha(
expected_guide_p,
data.size_factor_bcmatch,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="crispr-bean",
version="0.2.6",
version="0.2.7",
python_requires=">=3.8.0",
author="Jayoung Ryu",
author_email="[email protected]",
Expand Down

0 comments on commit 1a218af

Please sign in to comment.