Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Extract reads with a specific mutation

    Hi everyone,
    I would like to extract from a bam file all the reads that are carrying a specific mutation.
    I know that samtools give the possibility to extract reads in a specific region, but if I would like to extract just these one that have a mutation what can I do?
    I would really appreciate any kind of help
    Thanks in advance

  • #2
    I am not quite sure, if this is what you want, but with Biopieces (www.biopieces.org) you can read in a SAM file and grab for a specific position, and then a specific event like this:

    Code:
    read_sam -i input.sam |
    find_SNPs |
    grab -e 'POS == 1234' |
    grab -e 'EVENT eq 'G>C'
    Unfortunately Biopieces cannot write SAM format (which is evil), but you can dump a table with write_tab.

    Comment


    • #3
      Thanks Maasha,
      your suggestion was really good. I've installed biopieces and it works great but I have one more question. Do you know how to run biopieces from a perl script? I need it to solve my problem. I don't know if you use perl. If yes do you know why it doesn't work with the command system?

      $cmd='read_sam -i FileIN.txt -O FileOUT.txt';
      #system($cmd);

      Comment


      • #4
        That should work just fine. This does:

        Code:
        perl -e '$cmd = "read_sam -n 1 -i test.sam | count_records"; system($cmd);'

        Comment


        • #5
          Thanks. It works great. And thanks for let me know about biopieces, it looks really helpful.

          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...
            04-22-2024, 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, Yesterday, 11:49 AM
          0 responses
          13 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-24-2024, 08:47 AM
          0 responses
          16 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-11-2024, 12:08 PM
          0 responses
          61 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 10:19 PM
          0 responses
          60 views
          0 likes
          Last Post seqadmin  
          Working...
          X