Skip to content

[Feature request] Filter for a number of N's with seqkit seq #584

Description

@stas-malavin

Hi Wei,
I'd appreciate if something like this was possible with seqkit seq natively:

seqkit fx2tab -i input.fasta |\
awk -v maxN=5 '{
  seq=$2
  n=gsub(/[Nn]/, "", seq)
  if (n <= maxN) print $1
}' |\
seqkit grep -f - input.fasta > filtered.fasta

Thanks,
Stas

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions