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 sorting by average quality to seqkit sort #482

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

Conversation

vmikk
Copy link

@vmikk vmikk commented Jul 31, 2024

Hello!

This PR adds a new feature to the seqkit sort command, allowing sequences to be sorted by their average Phred quality. The following options have been introduced:

  • -q or --by-avg-qual
  • --qual-ascii-base

With the implementation of quality estimation, I tried to follow the approach used in the fx2tab command.

However, the code currently won't work because the StringCount type (which was used for storing sequence length) cannot be used for storing average quality. Therefore, a new type (e.g., StringFloat), probably should be added to util/stringutil.

Could you please confirm that this is a useful feature and, if so, review the code?

PS. For the short ASCII base flag, -b is already occupied by --by-bases option, so it is not consistent with -b in fx2tab.

@shenwei356
Copy link
Owner

It looks good to me, thank you Vladimir! I'll handle the util package and merge this later.

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