We can use STAR --runMode inputAlignmentsFromBAM to generate the RNA-Seq "signal" files using the coordinate-sorted BAM file (Aligned.sortedByCoord.out.bam). It produces the number of reads mapped to each genomic position. The output file (in bedGraph format) can be visualized in genome browsers such as the UCSC genomic browser or IGV browser.
--outWigType type of signal output (bedGraph or wiggle)
--outWigStrand strandedness of wiggle/bedGraph output (Stranded or Unstranded)
--outWigNorm type of normalization for the signal (RPM or none)
--outFileNamePrefix output files name prefix
Take a look at the generated signal files
ls -la ~/LSLNGS2015/RNASEQ_data/*_Signal.*.bg
How to visualize on genome browsers
You can load bedGraph into IGV. Alternatively, you can also convert the bedGraph to bigWig using bedGraphToBigWig and load bigWig to IGV or UCSC Genome Browser.
Unfortunately, the bedGraph might not be sorted properly. If you encounter error when executing bedGraphToBigWig, such as:
GM1287_rep1_Signal.Unique.str1.out.bg is not case-sensitive sorted at line 28093639.
Please use "sort -k1,1 -k2,2n" with LC_COLLATE=C, or bedSort and try again.
View in UCSC Genome Browser (Requires access to webserver) a bug regarding chr name
First, you need to upload/place the bigWig files at a location accessible from the World Wide Web, i.e. on a web server, for UCSC Genome Browser to use and display it.
To view the bigWig as custom tracks, we create a text file (e.g. mytracks.txt) with following information.
Then, in your web browser, use the below URL to call your file: