This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Combined Signal Track Of Forward And Reverse Reads?

Dear community,

I have a very little quick question: I have directional paired-end RNAseq data which I want to put in the UCSC genome browser in a form which the same track displays as positive values forward reads and negative values reverse reads. Do you know a way to do it?

Below I paste an image found on google to show an example of what I want to do:

enter image description here

Thanks for your help!!!!!

rnaseq ucsc

2 answers

  1. Converting Bam To Bedgraph For Viewing On Ucsc? your forward-strand reads into bins (make the window and step sizes the same to make the bins disjoint.)
  2. Bin your reverse-strand reads separately with the same process.
  3. Unstarch the results into bedgraph format, applying a negative score to the reverse-strand result set:

    $ unstarch forwardStrandBins.starch \
        | awk '{ \
            print $1"\t"$2"\t"$3"\t"$5; \
            } \
        }' - \
        > forwardStrandBins.bedgraph
    
    $ unstarch reverseStrandBins.starch \
        | awk '{ \
            print $1"\t"$2"\t"$3"\t"(0-$5); \
            } \
        }' - \
        > reverseStrandBins.bedgraph
    
  4. Merge the bedgraph files:

    $ sort-bed *.bedgraph > final.bedgraph
    
  5. Add any desired metadata and display parameters to final.bedgraph.

  6. Load final.bedgraph as a custom track in your UCSC Browser instance.

Once you have the process down, some of the above steps can be condensed to handle forward- and reverse-stranded data with one step.

you assumed that forward and reverse reads do not overlap, which may not be true.

Good point — will try to come back to this answer with an update at some point.

You can just generate + strand and - strand bigWig files separately,negate the minus track, and then build a Collection of the ones you want to do overlay following this tutorial . The only difference from the tutorial you have to make is to choose "transparent" as the merge method instead of "add"

Log in to answer this question.