Announcement

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

  • How to combine junctions.bed files produced by TopHat

    Hi,

    Basically I would like to double check before writing my own script to do so. Since I need to pool together samples with different read lengths, I have to run TopHat separately for them (using the -j option wherever appropriate). I already know how to merge the resulting .sam files with samtools and generate a combined coverage.wig file. Before putting effort to combine the junctions.bed files, I would like to know:

    1. If there are tools/scripts to do this already, either within TopHat or outside.

    2. If none, I would like to confirm if the score field of the junctions.bed file is simply the number of uniquely mapping reads that are aligned to the junction, or if muitlreads are also counted/weighted.

    Please feel free to share your knowledge/experience/comments. Thanks a lot!

    -- Leo

  • #2
    You could use Galaxy (http://main.g2.bx.psu.edu/). Upload the files (probably as file format tabular) you want to combine and then use the 'Concatenate queries' tool found under Text Manipulation. There's probably a short script out there to combine them, but this should work for what you want to do too.

    -Brandon

    Comment


    • #3
      TopHat comes with an (undocumented, I realize) script called bed_to_juncs. Running it on a TopHat BED file will produce a .juncs-format file. To merge these, you can simply cat them together, sort, and pipe to uniq.

      Comment


      • #4
        Originally posted by Cole Trapnell View Post
        TopHat comes with an (undocumented, I realize) script called bed_to_juncs. Running it on a TopHat BED file will produce a .juncs-format file. To merge these, you can simply cat them together, sort, and pipe to uniq.
        Hi Cole,

        I am aware of the bed_to_juncs script but when converting BED files to .junc files, it doesn't preserve the score and overhang information that I would like to combine. BTW, could you confirm if my understanding of the score field in BED files is correct? Thanks a lot!

        -- Leo
        Last edited by HTS; 12-14-2009, 02:27 PM.

        Comment


        • #5
          Originally posted by DrD2009 View Post
          You could use Galaxy (http://main.g2.bx.psu.edu/). Upload the files (probably as file format tabular) you want to combine and then use the 'Concatenate queries' tool found under Text Manipulation. There's probably a short script out there to combine them, but this should work for what you want to do too.

          -Brandon
          Thanks for your reply, Brandon! I guess I didn't make myself clear but I need something considerably more sophisticated than concatenating multiple text files, especially considering what each field of the junctions.bed file means.

          Comment


          • #6
            I'm new just thought I'd try helping. Apparently it isn't the bed file format I am familiar with.

            Comment


            • #7
              Did you end up writing your own script that merges the junction.bed files from different sample while preserving the score? If yes, would you be willing to share that script since this is exactly what I need to do.

              Comment


              • #8
                Originally posted by fongchun View Post
                Did you end up writing your own script that merges the junction.bed files from different sample while preserving the score? If yes, would you be willing to share that script since this is exactly what I need to do.
                https://github.com/roryk/seqscripts has a bunch of little gluey type scripts to work with splice junctions, one of them does what you want. Download it and do this from the command line:

                cat junctions_file1.bed junction_file_2.bed junction_file_3.bed| tbed2juncs | combineJuncs > combined.juncs

                combine.juncs will be a BED file and contains all of the junctions from the junction files with the score the sum of the junction scores. The names of the junctions are the locations of the two nucleotides at the edges of the exons that are joined together.

                Comment


                • #9
                  Originally posted by roryk View Post
                  https://github.com/roryk/seqscripts has a bunch of little gluey type scripts to work with splice junctions, one of them does what you want. Download it and do this from the command line:

                  cat junctions_file1.bed junction_file_2.bed junction_file_3.bed| tbed2juncs | combineJuncs > combined.juncs

                  combine.juncs will be a BED file and contains all of the junctions from the junction files with the score the sum of the junction scores. The names of the junctions are the locations of the two nucleotides at the edges of the exons that are joined together.
                  great work! Thank you roryk.

                  Comment

                  Latest Articles

                  Collapse

                  • seqadmin
                    Advanced Tools Transforming the Field of Cytogenomics
                    by seqadmin


                    At the intersection of cytogenetics and genomics lies the exciting field of cytogenomics. It focuses on studying chromosomes at a molecular scale, involving techniques that analyze either the whole genome or particular DNA sequences to examine variations in structure and behavior at the chromosomal or subchromosomal level. By integrating cytogenetic techniques with genomic analysis, researchers can effectively investigate chromosomal abnormalities related to diseases, particularly...
                    Today, 06:26 AM
                  • seqadmin
                    How RNA-Seq is Transforming Cancer Studies
                    by seqadmin



                    Cancer research has been transformed through numerous molecular techniques, with RNA sequencing (RNA-seq) playing a crucial role in understanding the complexity of the disease. Maša Ivin, Ph.D., Scientific Writer at Lexogen, and Yvonne Goepel Ph.D., Product Manager at Lexogen, remarked that “The high-throughput nature of RNA-seq allows for rapid profiling and deep exploration of the transcriptome.” They emphasized its indispensable role in cancer research, aiding in biomarker...
                    09-07-2023, 11:15 PM
                  • seqadmin
                    Methods for Investigating the Transcriptome
                    by seqadmin




                    Ribonucleic acid (RNA) represents a range of diverse molecules that play a crucial role in many cellular processes. From serving as a protein template to regulating genes, the complex processes involving RNA make it a focal point of study for many scientists. This article will spotlight various methods scientists have developed to investigate different RNA subtypes and the broader transcriptome.

                    Whole Transcriptome RNA-seq
                    Whole transcriptome sequencing...
                    08-31-2023, 11:07 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by seqadmin, Today, 07:53 AM
                  0 responses
                  7 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, Yesterday, 07:42 AM
                  0 responses
                  12 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 09-22-2023, 09:05 AM
                  0 responses
                  39 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 09-21-2023, 06:18 AM
                  0 responses
                  36 views
                  0 likes
                  Last Post seqadmin  
                  Working...
                  X