Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bpb9
    Member
    • Aug 2012
    • 24

    #31
    How to use?

    Originally posted by offspring View Post
    Short update: the script posted earlier in this thread has seen some updates (Python 3 compatibility, better argument handling etc) and is now called tophat_recondition.

    It can be found here: https://github.com/cbrueffer/tophat-recondition
    Does this program need to be installed in the same directory as the unmapped bams that need to be reconditioned? I can't seem to get the program to work. I have python and pysam installed, but the program doesn't run.

    wget https://github.com/cbrueffer/tophat-...ive/master.zip
    unzip master
    set PATH to /home/user/tophat_recondition/tophat-recondition-master
    set PATH to /cluster/software/python2.7.6/bin
    #Try tophat-recondition
    tophat-recondition.py -hv /home/scratch/user/Flowcell1/Raw_PE/sampleID/sampleBAM /home/scratch/user/Flowcell1/Raw_PE/sampleID/

    Comment

    • offspring
      Member
      • Mar 2013
      • 32

      #32
      Originally posted by bpb9 View Post
      Does this program need to be installed in the same directory as the unmapped bams that need to be reconditioned? I can't seem to get the program to work. I have python and pysam installed, but the program doesn't run.

      wget https://github.com/cbrueffer/tophat-...ive/master.zip
      unzip master
      set PATH to /home/user/tophat_recondition/tophat-recondition-master
      set PATH to /cluster/software/python2.7.6/bin
      #Try tophat-recondition
      tophat-recondition.py -hv /home/scratch/user/Flowcell1/Raw_PE/sampleID/sampleBAM /home/scratch/user/Flowcell1/Raw_PE/sampleID/
      Try without -hv, those are optional parameters that will terminate the program (i.e., -h print help and exit, -v print version and exit).
      The script can be run from whereever you like, as long as python and pysam can be found.

      Comment

      • bpb9
        Member
        • Aug 2012
        • 24

        #33
        So it got it to run if I stayed in the same directory as tophat-recondition.py and removed -hv command, and pointed it to the tophat output directories. I think the reason why is because on the cluster, HTseq is installed under one version of python, and pysam under another. If I use the version of python in my local directory, it runs. It produced an output file unmapped_fixup.bam. However when I run samtools flagstat on the unmapped.bam and the unmapped_fixup.bam, the flagstat summaries are the same…

        samtools flagstat unmapped_fixup.bam
        8903498 + 2048970 in total (QC-passed reads + QC-failed reads)
        0 + 0 duplicates
        0 + 0 mapped (0.00%:0.00%)
        8903498 + 2048970 paired in sequencing
        4380074 + 1096160 read1
        4523424 + 952810 read2
        0 + 0 properly paired (0.00%:0.00%)
        0 + 0 with itself and mate mapped
        0 + 0 singletons (0.00%:0.00%)
        0 + 0 with mate mapped to a different chr
        0 + 0 with mate mapped to a different chr (mapQ>=5)



        samtools flagstat unmapped.bam
        8903498 + 2048970 in total (QC-passed reads + QC-failed reads)
        0 + 0 duplicates
        0 + 0 mapped (0.00%:0.00%)
        8903498 + 2048970 paired in sequencing
        4380074 + 1096160 read1
        4523424 + 952810 read2
        0 + 0 properly paired (0.00%:0.00%)
        0 + 0 with itself and mate mapped
        0 + 0 singletons (0.00%:0.00%)
        0 + 0 with mate mapped to a different chr
        0 + 0 with mate mapped to a different chr (mapQ>=5)


        somehow I just can't believe that none of the unmapped reads are duplicates…could this be a consequence of me running tophat with the --no-mix option turned on?
        Last edited by bpb9; 11-25-2014, 11:07 PM. Reason: correction

        Comment

        • offspring
          Member
          • Mar 2013
          • 32

          #34
          Sounds like it might have an effect, I don't have experience with that option myself. To see the effect of the script itself, try running the following command on unmapped.bam and unmapped_fixup.bam:

          Code:
          samtools view -f 0x8 unmapped.bam
          On the original file it should not print anything, but on the fixed file you should get output.

          Comment

          • bpb9
            Member
            • Aug 2012
            • 24

            #35
            You are correct, there is indeed output for unmapped_fixup.bam but not unmapped.bam.

            I still think it's really weird that there are no duplicates in the unmapped file, but that must be a separate issue.

            Comment

            • offspring
              Member
              • Mar 2013
              • 32

              #36
              Yes, this is seperate indeed. The point of tophat-recondition is to fix issues that prevent unmapped.bam from being used by downstream tools (i.e., to make it possible to merge accepted_hits.bam and unmapped.bam, and feed the merged file to a QC software).

              Comment

              • offspring
                Member
                • Mar 2013
                • 32

                #37
                I've just release version 0.3 of tophat-recondition (https://github.com/cbrueffer/tophat-recondition), and it may fix the "Mapped mate should have mate reference name" problem id0 was seeing.

                The details are in TopHat bug #16, https://github.com/infphilo/tophat/issues/16 and tophat-recondition bug #1 https://github.com/cbrueffer/tophat-...ition/issues/1.

                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
                15 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-22-2026, 11:13 AM
                0 responses
                68 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-22-2026, 10:48 AM
                0 responses
                48 views
                0 reactions
                Last Post SEQadmin2  
                Working...