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

shorten reads: also allow to keep only the end of the reads #299

Merged
merged 2 commits into from Apr 27, 2018

Conversation

Projects
None yet
2 participants
@klugem
Contributor

klugem commented Apr 6, 2018

I have some Ion Torrent reads that were generated using polyA priming.
I want to remove the polyA tails and then shorten the reads to a maximal length (and keep the end of the reads).

Currently the --length parameter keeps the beginning of the reads when a positive value is given. If a negative value is given, it behaves like the UnconditionalCutter modifier.

This little path changes that behavior.

return read[:self.length]
if self.length >= 0:
return read[:self.length]
elif self.length < 0:

This comment has been minimized.

@marcelm

marcelm Apr 12, 2018

Owner

Can you change this into a simple else:, please? No need to check whether length is negative - it must be since the if branch wasn’t taken.

@marcelm

This comment has been minimized.

Owner

marcelm commented Apr 12, 2018

Looks otherwise good, thanks!

@klugem

This comment has been minimized.

Contributor

klugem commented Apr 19, 2018

Done.

@marcelm marcelm merged commit c3ecc1d into marcelm:master Apr 27, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@marcelm

This comment has been minimized.

Owner

marcelm commented Apr 27, 2018

Thanks again! I’ll add a changelog entry as well.

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