Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thh32
    Member
    • Feb 2014
    • 60

    #1

    Separating aligned reads

    I have been using bowtie2 to align my reads to an indexed reference genome and used the --un-conc and --al-conc functions to separate out the aligned and non aligned reads into separate files, however I have just received a new data set which has been merged. I have tried using the -U option in bowtie2 to see if this worked but it doesn't seem to. Does anyone know of another program I could use for this and the appropriate command? I am looking into BWA to see if this is an option but am new to the program.

    Thanks,
    Tom
  • Brian Bushnell
    Super Moderator
    • Jan 2014
    • 2709

    #2
    You can do that with BBMap:

    (index)
    bbmap.sh ref=reference.fasta -Xmx29g

    (map)
    bbmap.sh in=reads.fq outm=mapped.fq outu=unmapped.fq -Xmx29g

    That will split it into two fastq files. If you change the output file extensions to ".sam" instead of ".fq", you will get sam output. If you have paired reads in 2 files, you would do this:

    bbmap.sh in1=reads1.fq in2=reads2.fq outm1=mapped.fq outm2=mapped2.fq outu1=unmapped1.fq outu2=unmapped2.fq -Xmx29g

    The "-Xmx29g" indicates how much memory java is allowed to use; set that at ~85% of your physical memory.
    Last edited by Brian Bushnell; 04-06-2014, 08:51 AM.

    Comment

    • swbarnes2
      Senior Member
      • May 2008
      • 910

      #3
      samtools view can filter your .bam for mapped or unmapped reads. Unmapped reads will have the 4 flag set, mapped reads will not.

      Comment

      • thh32
        Member
        • Feb 2014
        • 60

        #4
        @Brian Bushnell I have fasta files, would BBMap still work this this?

        @swbarnes2 I dont have a .bam file so cannot use samtools

        Bowtie now accepts my files but is just outputting into the .sam file instead of the --un-con or --al-conc files I have specified although the files them-selves are created by BOWTIE2

        Comment

        • sphil
          Senior Member
          • Apr 2010
          • 192

          #5
          doesn't --un-con and --al-conc just state wether pairs could be mapped concordantly and not whether they could be mapped at all?

          Comment

          • thh32
            Member
            • Feb 2014
            • 60

            #6
            @sphil yes it does, just realised this and without -conc i works absolutely fine. Thanks for all your help.

            Comment

            • Brian Bushnell
              Super Moderator
              • Jan 2014
              • 2709

              #7
              Originally posted by thh32 View Post
              @Brian Bushnell I have fasta files, would BBMap still work this this?
              Yes, BBMap works with fastq or fasta files.

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                New Genomics Technologies Take Aim at Long-Standing Limits
                by SEQadmin2


                Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                ...
                Today, 10:25 AM
              • SEQadmin2
                How Immunogenomics Decodes Immunity’s Genetic Blueprint
                by SEQadmin2




                The immune system’s power comes from its genetic diversity, allowing myriad threats to be neutralized through first recognizing foreign antigens. That diversity is also what makes the immune system so difficult to study. Recent advances in sequencing technology and computational biology, however, are giving researchers new tools to understand immune responses and immune-related diseases in greater detail.

                This convergence of genetics, immunology, and computation...
                09-01-2026, 05:41 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 09-25-2026, 09:06 AM
              0 responses
              27 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 09-23-2026, 11:05 AM
              0 responses
              24 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 09-18-2026, 11:37 AM
              1 response
              45 views
              0 reactions
              Last Post pekgio
              by pekgio
               
              Started by SEQadmin2, 09-16-2026, 10:23 AM
              1 response
              55 views
              0 reactions
              Last Post pekgio
              by pekgio
               
              Working...