Unconfigured Ad

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

    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
                Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                by SEQadmin2



                Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                ...
                07-09-2026, 11:10 AM
              • SEQadmin2
                Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                by SEQadmin2



                Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                07-08-2026, 05:17 AM
              • GATTACAT
                Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                by GATTACAT
                Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                07-01-2026, 11:43 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 07-13-2026, 10:26 AM
              0 responses
              20 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-09-2026, 10:04 AM
              0 responses
              31 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-08-2026, 10:08 AM
              0 responses
              20 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-07-2026, 11:05 AM
              0 responses
              34 views
              0 reactions
              Last Post SEQadmin2  
              Working...