Skip to content
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: 3 additions & 3 deletions screenpro/ngs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def get_counts_matrix(self, fastq_dir, samples, get_recombinant=False, cas_type=
if get_recombinant:
raise ValueError("Recombinants are not applicable for single guide design!")
if protospacer_length == 'auto':
protospacer_length = self.library['protospacer'].str.lengths().unique().to_list()[0]
protospacer_length = self.library['protospacer'].str.len_bytes().unique().to_list()[0]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@isabelleliuu – is this specific after an specific polars version? It would be helpful if we specify version (e.g. polars>=*.*)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abearab based on the polars github releases ([https://github.com/pola-rs/polars/releases/tag/py-0.19.8]) this change was made with the Python Polars 0.19.8 release


for sample_id in samples:
cnt = self._process_cas9_single_guide_sample(
Expand All @@ -218,8 +218,8 @@ def get_counts_matrix(self, fastq_dir, samples, get_recombinant=False, cas_type=
if get_recombinant: recombinants = {}

if protospacer_length == 'auto':
protospacer_A_length = self.library['protospacer_A'].str.lengths().unique().to_list()[0]
protospacer_B_length = self.library['protospacer_B'].str.lengths().unique().to_list()[0]
protospacer_A_length = self.library['protospacer_A'].str.len_bytes().unique().to_list()[0]
protospacer_B_length = self.library['protospacer_B'].str.len_bytes().unique().to_list()[0]
elif isinstance(protospacer_length, dict):
protospacer_A_length = protospacer_length['protospacer_A']
protospacer_B_length = protospacer_length['protospacer_B']
Expand Down