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

Add option to save single mapped counts by side #248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Phlya
Copy link
Member

@Phlya Phlya commented Sep 6, 2024

No description provided.

@@ -739,6 +787,19 @@ def add_pairs_from_dataframe(self, df, unmapped_chrom="!"):
self._stat[key]["total_single_sided_mapped"] += int(
total_count - (mapped_count + unmapped_count)
)
if self.single_mapped_by_side:
left_only_mapped_count = np.logical_and(
df_filtered["chrom1"] != unmapped_chrom,
Copy link
Member

Choose a reason for hiding this comment

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

Hmmm, this definition of "one-sided mapped" won't work for chimeric reads originating from R1. It will count them as "two-sided" although they factually come from R1 oly. This looks like a re-implementation of single-end mapped pairs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ummm is there a way to account for those properly at all at this stage? I think without some extra arguments this information is just lost...

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, you need walk_pair_type column for that
https://pairtools.readthedocs.io/en/latest/parsing.html#rescuing-complex-walks section walk_pair_types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants