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

fix out of order output in process_paired_reads #22

Merged
merged 2 commits into from
Jan 24, 2023

Conversation

slambert-git
Copy link
Contributor

Intermittent failures in test cases 06 and 09 of test_reads_when_count_false were caused by paired-end, interleaved records written out of order.

Maintain the order of records by calling .collect() on the ParIter before writing. Tests pass consistently now.

Disclaimer: I am very new to Rust. I apologize if this is unhelpful.

@slambert-git
Copy link
Contributor Author

Also to note. I think tests would have failed more reliably if the test cases used more than 2 read pairs (have a 50/50 shot of getting the right order). Id be happy to add to the test data to this PR if it's appreciated.

@nh13
Copy link
Member

nh13 commented Jan 23, 2023

@SheaML thank-you for spotting this, yes another PR would be great to add more read pairs. I am running lints the test suite (please make sure it passes, then I'll review). This is very much appreciated!

Copy link
Member

@nh13 nh13 left a comment

Choose a reason for hiding this comment

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

This LGTM, and mirrors the .flatten().collect() we're using for single-end/fragment reads. Very nice catch indeed!

@nh13 nh13 merged commit 2fa7584 into fulcrumgenomics:main Jan 24, 2023
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.

2 participants