Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mcrawford
    Member
    • Jun 2015
    • 10

    #1

    How to isolate and examine discordant pairs?

    Hello,
    I am examining yeast that have undergone meiotic recombination, using paired-end sequencing on the Illumina MiSeq and aligned with bowtie2.
    I want to look in my sequencing data for ectopic recombination, e.g. if one read pair mate aligns to one chromosome and the other mate to another chromosome. I think I can do this by isolating 'discordant' pairs, e.g. in the command line output you get something like:

    650 pairs aligned concordantly 0 times; of these:
    34 (5.23%) aligned discordantly 1 time

    I want to be able to isolate and take a closer look at the discordant pairs, but I can't figure out how they are marked in the SAM file - I have been reading about the CIGAR string and FLAG field, but I don't think any of the values match what I want.

    Many thanks for any help with this
  • Brian Bushnell
    Super Moderator
    • Jan 2014
    • 2709

    #2
    The FLAG field has bit 0x2 set if reads are properly paired. So, you want to filter for reads that have bit 0x2 unset. For example, with Reformat:

    reformat.sh in=mapped.sam out=filtered.sam requiredbits=1 filterbits=14

    That will require reads to have a mate (1) and forbid them from being properly paired, unmapped, or having an unmapped mate (2 & 4 & 8 = 14).

    You can do the same thing with samtools -f and -F flags.

    Comment

    • mcrawford
      Member
      • Jun 2015
      • 10

      #3
      Originally posted by Brian Bushnell View Post
      The FLAG field has bit 0x2 set if reads are properly paired. So, you want to filter for reads that have bit 0x2 unset. For example, with Reformat:

      reformat.sh in=mapped.sam out=filtered.sam requiredbits=1 filterbits=14

      That will require reads to have a mate (1) and forbid them from being properly paired, unmapped, or having an unmapped mate (2 & 4 & 8 = 14).

      You can do the same thing with samtools -f and -F flags.
      Thank you very much for your reply!

      I am now trying to run bbmap reformat on Windows via the command line by entering:

      java -ea -Xmx200m C:\bbmap\current\ jgi.ReformatReads in=reads.sam out=discordant.sam requiredbits=1 filterbits=14

      However, I get the error: "Could not find or load main class C:\bbmap\current\". From googling the error it seems there is probably something wrong with the filepath but I tried a few different things and it still doesn't work. I'm not very experienced with java!

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        Is your BBMap directory under c:\? If you put it someplace else then replace the c:\ with that path (e.g. c:\download\bbmap\current).

        Comment

        • mcrawford
          Member
          • Jun 2015
          • 10

          #5
          Originally posted by GenoMax View Post
          Is your BBMap directory under c:\? If you put it someplace else then replace the c:\ with that path (e.g. c:\download\bbmap\current).
          Yes, it is under C:\ (I deliberately put it there to make the path nice and short )

          Comment

          • GenoMax
            Senior Member
            • Feb 2008
            • 7142

            #6
            There should be a space between C:\bbmap\current\ and jgi.ReformatReads. Is it there? Hard to tell from post. Hopefully you did not move any files under bbmap folder.

            Comment

            • mcrawford
              Member
              • Jun 2015
              • 10

              #7
              Originally posted by GenoMax View Post
              There should be a space between C:\bbmap\current\ and jgi.ReformatReads. Is it there? Hard to tell from post. Hopefully you did not move any files under bbmap folder.
              Yes, there is a space. I didn't move any files either, but I might try re-downloading bbmap just in case.

              Comment

              • westerman
                Rick Westerman
                • Jun 2008
                • 1104

                #8
                I am not that good at Java either but I do think you need a 'cp' before your path. When I run 'reformat.sh' from a Linux command line it says that it is running the program like so (single line broken down into multiple lines for clarity)

                java
                -ea
                -Xmx200m
                -cp /group/bioinfo/apps/apps/BBMap-34.94/current/
                jgi.ReformatReads
                PhiX_NoIndexfastq.gz
                out=rick.tmp

                Comment

                • mcrawford
                  Member
                  • Jun 2015
                  • 10

                  #9
                  Originally posted by westerman View Post
                  I am not that good at Java either but I do think you need a 'cp' before your path. When I run 'reformat.sh' from a Linux command line it says that it is running the program like so (single line broken down into multiple lines for clarity)

                  java
                  -ea
                  -Xmx200m
                  -cp /group/bioinfo/apps/apps/BBMap-34.94/current/
                  jgi.ReformatReads
                  PhiX_NoIndexfastq.gz
                  out=rick.tmp
                  Thanks so much! Adding '-cp' works. However... it now can't find my .sam file. Which folder is it looking in? I tried putting the file in the 'bbmap', 'current' and 'jgi' folders. Or do I need the full path in front of each filename as well?

                  Comment

                  • westerman
                    Rick Westerman
                    • Jun 2008
                    • 1104

                    #10
                    The full path couldn't hurt. Quoting for spaces, etc. if you have any.

                    Comment

                    • mcrawford
                      Member
                      • Jun 2015
                      • 10

                      #11
                      OK, I added the full path to each filename and it works now! Thanks for all the help in this thread

                      Comment

                      Latest Articles

                      Collapse

                      • SEQadmin2
                        Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                        by SEQadmin2



                        CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                        Despite this, “CRISPR helped turn genome editing from a specialized technique into
                        ...
                        07-31-2026, 11:01 AM
                      • SEQadmin2
                        Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                        by SEQadmin2


                        Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                        The systematic characterization of the human proteome has
                        ...
                        07-20-2026, 11:48 AM

                      ad_right_rmr

                      Collapse

                      News

                      Collapse

                      Topics Statistics Last Post
                      Started by SEQadmin2, Yesterday, 12:22 PM
                      0 responses
                      12 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 08-11-2026, 10:35 AM
                      0 responses
                      13 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 08-06-2026, 07:41 AM
                      0 responses
                      30 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 08-03-2026, 10:13 AM
                      0 responses
                      48 views
                      0 reactions
                      Last Post SEQadmin2  
                      Working...