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 read_length() to ShortRead type #126

Open
unode opened this issue Dec 5, 2019 · 2 comments
Open

Add read_length() to ShortRead type #126

unode opened this issue Dec 5, 2019 · 2 comments

Comments

@unode
Copy link
Member

unode commented Dec 5, 2019

This was something that was requested in an offline discussion.

Given a Fastq file with variable read length (e.g. after preprocessing):

mapped = select(mapped) using |mr|:
    mr = mr.filter(min_match_size={read_length}, action={drop})
    if not mr.flag({mapped}):     ^^^^^^^^^^^^^
        discard

here {read_length} could be mr.read_length().

@luispedro
Copy link
Member

In a paired-end read, does this apply to both mates?

@unode
Copy link
Member Author

unode commented Dec 9, 2019

In a paired-end read, does this apply to both mates?

Tricky question, but I see your point. I'd say read_length() == forward + reverse.
However from the offline discussion I think the goal was per-read length which would require two methods.

So given this we could have forward_read_length() and reverse_read_length().
However these would not make sense in a single-end context and error'ing there would be inconvenient.

What do you say to return read_length() for forward_read_length() and 0 for reverse_read_length() when in a single-end context?

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

No branches or pull requests

2 participants