Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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


    • #3
      Thank you!

      Comment


      • #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


        • #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


          • #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


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

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Essential Discoveries and Tools in Epitranscriptomics
                by seqadmin


                The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist on Modified Bases...
                Yesterday, 07:01 AM
              • seqadmin
                Current Approaches to Protein Sequencing
                by seqadmin


                Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                04-04-2024, 04:25 PM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, 04-11-2024, 12:08 PM
              0 responses
              39 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-10-2024, 10:19 PM
              0 responses
              41 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-10-2024, 09:21 AM
              0 responses
              35 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-04-2024, 09:00 AM
              0 responses
              55 views
              0 likes
              Last Post seqadmin  
              Working...
              X