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

feat: skip too short reads #32

Merged
merged 3 commits into from
Jul 28, 2023
Merged

Conversation

nh13
Copy link
Member

@nh13 nh13 commented Jun 26, 2023

Fixes: #27

@nh13 nh13 requested a review from tfenne July 11, 2023 23:21
Copy link
Member

@tfenne tfenne left a comment

Choose a reason for hiding this comment

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

Something about this PR doesn't sit right with me, beyond my inline comments.

E.g. I think this could lead to empty records in the output files, and lots of tools struggle with that. I know it would be a bigger change, but I wonder if it would be better to output such reads to a "rejected" file as opposed to an "unmatched" pile.

Similarly, what happens if the reads are supposed to have UMIs, and have enough bases to cover the sample barcodes, but not the UMIs? Those will demux just fine and end up in output files, but with blank UMIs?

e
)
});
.unwrap_or((&EMPTY_BASES, &EMPTY_QUALS));
Copy link
Member

Choose a reason for hiding this comment

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

I don't like doing this here because it will also eat any other errors coming out of extract_bases_and_quals. I think this will also (unexpectedly) lead to situations where a segment gets returned with 0 bases if it is defined as 8bp long and there are only 7bp available?

Should we perhaps change .extract_bases_and_quals() to extract the sub-set of bases that are available, and update the documentation to match?

src/lib/barcode_matching.rs Outdated Show resolved Hide resolved
The --skip-reasons options specifies the reason(s) to skip reads, with
only TooFewBases currently supported.
@nh13 nh13 force-pushed the feature/do-not-match-too-short-reads branch from 33dd5c4 to 6fe2ce9 Compare July 13, 2023 00:52
Copy link
Member

@tfenne tfenne left a comment

Choose a reason for hiding this comment

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

Approved once comments addressed.

src/bin/commands/demux.rs Outdated Show resolved Hide resolved
src/bin/commands/demux.rs Outdated Show resolved Hide resolved
src/bin/commands/demux.rs Show resolved Hide resolved
@nh13 nh13 merged commit ae91e90 into main Jul 28, 2023
4 checks passed
@nh13 nh13 deleted the feature/do-not-match-too-short-reads branch July 28, 2023 16:57
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.

FQTK fails if reads are too short
2 participants