Skip to content

? keeping only matching sequence of reads #579

Description

@ashipde

With seqkit grep we can filter reads based on whether their sequence matches a pattern. But is there a way to use seqkit on fastq input to also trim the reads so that they only contain the matching sequence?

E.g. for pattern "T.{9}TGAGGTTAG.{9}TTGTGAGTA.{9}T":

Input:

@NB501936:87:HJCMMBGX5:1:22305:4332:2522 1:N:0:CGCTCATT+CTTCGCCT
CCAAGGGAAGGAGAGGTGAGATGATTCGCCTATTTGAGGTTAGCATCCGCGGTTGTGAGTATACACACGGTAGGT
+
AAAAAEEEEEEEEAEEEEEEEEEEEEEEEAAEEEAEEEEEEEEEEEEEEEEEAEE6EEAEEEEEEEEEEEEEE<E

Output:

@NB501936:87:HJCMMBGX5:1:22305:4332:2522 1:N:0:CGCTCATT+CTTCGCCT
TTCGCCTATTTGAGGTTAGCATCCGCGGTTGTGAGTATACACACGGT
+
EEEEEAAEEEAEEEEEEEEEEEEEEEEEAEE6EEAEEEEEEEEEEEE

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