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

Bug fix for issue 132 #137

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

Conversation

zlian1758
Copy link

@zlian1758 zlian1758 commented Jan 8, 2025

singletons are a list of tuples that have None in it. Python cannot perform sorted([(3, None), (2, None), (1, None)])

@joshfactorial
Copy link
Collaborator

joshfactorial commented Jan 21, 2025

The only problem with this solution is that it leaves singletons unsorted, which changes the result. I believe changing

                properly_paired_reads.append((read_1, read_2))
            elif read1_is_singleton:
                # This will be the choice for all single-ended reads
                singletons.append((read_1, None))
            else:
                singletons.append((None, read_2))

to

                properly_paired_reads.append((read_1, read_2))
            elif read1_is_singleton:
                # This will be the choice for all single-ended reads
                singletons.append((read_1, None))
            else:
                singletons.append((read_2, None))

would preserve the order of the records, while enabling a sort. I'm testing this fix out in another branch.

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