Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • loba17
    Member
    • Sep 2011
    • 19

    #1

    Illumina Fastq Header Search

    Dear All,

    I would like to retrieve sequences (fastq format) from an Illumina fastq data file using the first part of the sequence header.

    Example of a Illumina fastq header:
    @X01032:109:000000000-AGKF7:1:1101:11950:1779 1:N:0:1

    My query:
    @X01032:109:000000000-AGKF7:1:1101:11950:1779

    I tried usearch (fastx_getseqs), seqtk, and seqret but nothing works because of the special characters (e.g. ":","-") in the header. A simple grep like

    Code:
    grep "@X01032:109:000000000-AGKF7:1:1101:11950:1779" -A 3 in.fastq
    would work but it would take a long time to finish. I could reformat the headers but I prefer not to (if possible).

    Is there a tool out there that would work with Illumina fastq files?

    Thanks for the help!
  • Brian Bushnell
    Super Moderator
    • Jan 2014
    • 2709

    #2
    You can do that with "filterbyname.sh" in the BBMap package.

    filterbyname.sh in=reads.fq out=filtered.fq include=t names=names.txt

    ...where names.txt has 1 name per line. Or, you can say "names=X01032:109:000000000-AGKF7:1:1101:11950:1779" instead. This program will include reads that have non-matching stuff after the first whitespace. You should not include the leading "@" in the query, as it is not part of the name. But, if you do include the leading @ for whatever reason, then add the flag "truncateheadersymbol".

    Comment

    • loba17
      Member
      • Sep 2011
      • 19

      #3
      Works - problem solved!

      Dear Brian,

      thanks for your suggestion!

      I downloaded bbmap and I tried filterbyname.sh

      Code:
      filterbyname.sh in=in.fq out=out.fq names=select.list include=t truncateheadersymbol
      
      Input is being processed as unpaired
      Time:               53.202 seconds.
      Reads Processed:    5747570 	108.03k reads/sec
      Bases Processed:    2296943848 	43.17m bases/sec
      Reads Out:          65246
      Bases Out:          25944173
      Number of reads for in.fq: 5,747,570
      Number of headers selected: 66,182
      Number of reads for out.fq: 65,246

      Works great and I really like the output summary!

      Question 1: Is there a way (setting) to get a list of the records that did not match?

      Question 2: bbmap seems to be a nice and very useful collection of tools - thanks a lot! - but is there an overview or a summary that would describe the tools briefly.

      Thanks for the help !

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        Originally posted by loba17 View Post
        Question 2: bbmap seems to be a nice and very useful collection of tools - thanks a lot! - but is there an overview or a summary that would describe the tools briefly.

        Thanks for the help !
        See this thread for a recap of many things BBMap can do: http://seqanswers.com/forums/showthread.php?t=58221

        I would suggest trying outu=filename with your command to see if that captures reads that did not match.

        Comment

        • Brian Bushnell
          Super Moderator
          • Jan 2014
          • 2709

          #5
          Originally posted by GenoMax View Post
          I would suggest trying outu=filename with your command to see if that captures reads that did not match.
          You know, to be consistent, I should really add that (I'll make a note to do so)! Unfortunately filterbyname does not currently capture outu. Instead, you need to run it twice, with "include=t" to capture the matching reads, and "include=f" to capture the nonmatching reads.

          Comment

          • loba17
            Member
            • Sep 2011
            • 19

            #6
            Thanks

            Dear Brian, thanks for the clarification and the help.

            Comment

            • maubp
              Peter (Biopython etc)
              • Jul 2009
              • 1544

              #7
              My Python script with a Galaxy interface:
              Galaxy tools and wrappers for sequence analysis. Contribute to peterjc/pico_galaxy development by creating an account on GitHub.

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                by SEQadmin2



                Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                ...
                10-14-2026, 09:55 AM
              • SEQadmin2
                New Genomics Technologies Take Aim at Long-Standing Limits
                by SEQadmin2


                Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                ...
                09-28-2026, 10:25 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 10-22-2026, 11:13 AM
              0 responses
              25 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-22-2026, 10:48 AM
              0 responses
              20 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-15-2026, 10:52 AM
              0 responses
              36 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-14-2026, 05:39 AM
              0 responses
              42 views
              0 reactions
              Last Post SEQadmin2  
              Working...