Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • super0925
    Senior Member
    • Feb 2014
    • 206

    #1

    how to test number of 'AAAAA' segment in reads file?

    Hi all
    A naive question.

    I want to test how many reads contain the segment of 'AAAAA'?

    Is this command work?

    grep 'AAAAA' -c sample1.fastq

    Q1:
    If it is OK. why the counts result is different from the statistic of 'AAAAA' on the Kmer content slides in FASTQC software ?
    Q2:
    How to how many reads contain the segment of >5A? ('A' continously more than 5 times sth like AAAAAAA,AAAAAAAAAA)
    Q3:
    If I want to count the reads not only contain 'AAAAA' but also with end of 'AAAAA'
    I mean ACTG..........AAAAA.
    How could I do it?
    Last edited by super0925; 07-31-2014, 07:11 AM.
  • holmrenser
    Junior Member
    • Jul 2013
    • 9

    #2
    First off: your grep will 'work', as in that it will return some value.

    Q1:
    My guess would be that it is different because your grep only returns line numbers. So for a read containing the pattern twice it will only return a count of one.
    Q2:
    You could try a grep with a regular expression.
    Something like: egrep -c '[A]{5,100}' sample1.fastq

    5 = lower bound
    100 = upper bound, assuming your reads are max 100bp

    Comment

    • super0925
      Senior Member
      • Feb 2014
      • 206

      #3
      Thank you!

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        For Q1:

        Code:
        $ grep -oh string_being_searched file | wc -w
        Will account for multiple occurrences on a single line and give the correct count.

        Comment

        • super0925
          Senior Member
          • Feb 2014
          • 206

          #5
          Originally posted by GenoMax View Post
          For Q1:

          Code:
          $ grep -oh string_being_searched file | wc -w
          Will account for multiple occurrences on a single line and give the correct count.
          Thank you! I don't want the multiple counts in a single line . but what you post here is so useful and probably for my furture work.
          PS:
          If I want to count the reads not only contain 'AAAAA' but also with end of 'AAAAA'
          I mean ACTG..........AAAAA.
          How could I do it?
          Last edited by super0925; 07-31-2014, 07:08 AM.

          Comment

          • m4merg
            Member
            • Jul 2014
            • 21

            #6
            egrep "AAAAA$" input > output
            I also suppose that when you work with fastq line with quality can disturb information u need. So id better created fasta and worked with it
            Last edited by m4merg; 07-31-2014, 07:15 AM.

            Comment

            • super0925
              Senior Member
              • Feb 2014
              • 206

              #7
              Originally posted by m4merg View Post
              egrep "AAAAA$" input > output
              Thanks!!!!

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
                by SEQadmin2




                NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification, detection...
                Today, 06:46 AM
              • 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

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 10-28-2026, 09:57 AM
              0 responses
              22 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-28-2026, 09:51 AM
              0 responses
              14 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-22-2026, 11:13 AM
              0 responses
              67 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-22-2026, 10:48 AM
              0 responses
              47 views
              0 reactions
              Last Post SEQadmin2  
              Working...