Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Colorful_Seq
    Junior Member
    • Mar 2009
    • 5

    #1

    het. and hom. SNP?

    HI,
    I use MAQ software mapping the reads.
    Is there anybody know how to get the het and hom SNPs from MAQ software?

    Thx!
  • qtrinh
    Member
    • May 2008
    • 20

    #2
    Hi,
    Running the command 'maq cns2snp in.cns > out.snp' should give you the info you are looking for - see http://maq.sourceforge.net/maq-manpage.shtml for output column descriptions.

    Q

    Comment

    • Colorful_Seq
      Junior Member
      • Mar 2009
      • 5

      #3
      Thx Q...
      I already Runing the command 'maq cns2snp in.cns > out.snp'.
      Now I write a simple perl script to split the snp file to hom snp and het snp.

      Comment

      • qtrinh
        Member
        • May 2008
        • 20

        #4
        No ... no ... no perl ... a one-liner bash with awk will do. Let me know if you need the one-liner ... :-)

        Q

        Comment

        • Colorful_Seq
          Junior Member
          • Mar 2009
          • 5

          #5
          Really?
          I am sorry,I am not familiar with Linux command.
          But I'd like to know!
          Thanks a million!

          Comment

          • qtrinh
            Member
            • May 2008
            • 20

            #6
            cat MAQ_SNP_FILE | awk '{ if (($4!="A") && ($4!="C") && ($4!="G") && ($4!="T") ) { print $0 } }' > het.snps



            cat MAQ_SNP_FILE | awk '{ if (($4=="A") || ($4=="C") || ($4=="G") || ($4=="T") ) { print $0 } }' > homo.snps


            $4 means column number 4 in your MAQ_SNP_FILE.

            Q

            Comment

            • Colorful_Seq
              Junior Member
              • Mar 2009
              • 5

              #7
              Ha~cool!
              It's works...
              It's better than perl!
              faster and just a liner~

              Thanks a million!
              Thank you Q...

              Comment

              • westerman
                Rick Westerman
                • Jun 2008
                • 1104

                #8
                Perl is also good

                Of course perl can be a one-liner as well. And, IMHO, a cleaner one than awk.

                perl -nle '@z = split /\t/; print if $z[3] !~ /[ACGT]/' MAQ_SNP_FILE > het.snps

                perl -nle '@z = split /\t/; print if $z[3] =~ /[ACGT]/' MAQ_SNP_FILE > homo.snps


                Basically, the 'perl -nle' means:

                'n' ==> loop through the file
                'l' ==> remove and add newlines as needed
                'e' ==> execute the following script.

                The script is in two parts:

                @z = split /\t/ ==> takes the line and splits it along tabs into an array called '@z'
                print if the 4th element of the array (called [3] in the perl 0-based array structure) is not (hets) or is (homo) one of A, C, G, or T.

                All-in-all the perl method seems more clean to me since the character to look for can be bundled into the square brackets; e.g., [ACGT]. But then I am mainly a Perl programmer.

                Comment

                • qtrinh
                  Member
                  • May 2008
                  • 20

                  #9
                  Yes, I agree with westerman, Perl is also good. I found myself using a bit of Perl, awk, and sed everyday.

                  Q

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