Skip to content

seqtk hrun bin size #185

Open
Open

Description

@kimin0402

Hi, thank you for making such a great tool.

I'm trying to mask a reference file based on homopolymers. Upon searching for a while, I encountered this web page (https://gist.github.com/lh3/9d6dcfc3436a735ef197) and found out seqtk is able to output homopolymers.

However, seqtk hrun command only outputs hompolymers longer than 7 bps. Is there an option for adjusting this size? I'm trying to create a mask file with homopolymers both smaller and larger than 7 bps. (In fact, I'm thinking about dividing a reference file and applying different cutoff for homopolymer masking) For larger ones, I guess I could use awk to pipe and select homopolymers larger than some number, but I'm afraid this process might be slow.

Is seqtk hrun for a hidden usage only? If this is the case, could you recommend me another tool that can calculate homopolymer sites?

Thank you.

Activity

  1. CharlotteAnne commented on Jul 27, 2023

    @CharlotteAnne

    Hi - would be great to have an answer on this if not already answered elsewhere as I'm also wondering about this?

  2. rodtheo commented on Jul 18, 2025

    @rodtheo

    I couldn't find in docs, but by looking the function's code you can specify the minimum length as a second argument.

    For instance, to report homopolymers equal or longer than 5 bp in sample.fa you just run seqtk hrun sample.fa 5.

    So the second parameter [minLen=7] is optional - if you don't provide it, it defaults to 7, but you can set it to any value you want.

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