A Useful bioinformatic tool to quickly vizualize your BAM files in Genome Browser UCSC
1.0K
A Useful bioinformatic tool to quickly vizualize your data in Genome Browser UCSC. We don't want to reinvent the wheel. We just want to simplify it.
Type the following commands to install BamInsight:
python setup.py build
python setup.py install
Please ensure you have installed the python packages refered below:
Use of our docker image can be a more user-friendly way to have a bamInsight experience:
(sudo) docker pull rluis/baminsight
There are already inside all the necessary packages to run the software.
Visualization of NGSs reads of some genes is a good form to understand the dataset you have on hands (A survey of best practices for RNA-seq data analysis).
One of the most popular genome viewer is UCSC Genome Browser. It is very flexible it terms of data input and allow link share of sessions, which facititates the brainstorm and let a interesting interface between dry and wet lab researchers.
However, from the moment you have the bam file ready, to the point where you visualize typical bam coverage, It takes some time, which sometimes discourage some bioinformaticians, pushing on some mistakes that could be visualize directly in a genome viewer.
Some files can directly be loaded to UCSC Genome Browser (file size < 500 Mb). However, in the majority of the times, It is necessary to prepare side files to be interpreted by Genome Browser.
In that way, We decided to create BamInsight Software. A software that makes by you the annoying part from a bam file to visualize your dataset in UCSC genome Browser, dealing with all intermediate files and bridging the gap existing right now.
If your dataset is Stranded (RNA-seq fr-firstranded, fr-secondsetranded, or other), you should use this baminsight mode to visualize on genome browser one track with forward and reverse reads coverage, representing plus and minus (also known as Watson and Crick) strands, respectively.
Example Command:
baminsight stranded hg38 [email protected] Rnaseq_rep1_HelaS3.bam -FF 83,163 -FR 99,147 -add_bam -FTPHOST yourftp.hostname.com
-FTPUser ftpusername -FTPPassword ultrasecretpassword -FTPPort 21 -FTPPath /path/to/be/allocated/baminsight/output
-long_label HelaS3_Rep1 -short_label HeLa1
Picture below sum-up this mode.

Fistly, there is three positional arguments for baminsight:
Every command in stranded mode has to begin as:
baminsight stranded (genome) (email) ...
baminsight stranded hg38 [email protected] ...
or
baminsight stranded mm10 [email protected] ...
You have to give to bamInsight one (or more) bam file(s), and the flags according to your dataset's strandness. A endless book of doubts can be arise of this topic, but the following table can resume it:
| Strandeness Type | Flags to use |
|---|---|
| fr-firststrand | -FF 83,163 -FR 99,147 |
| fr-secondstranded | -FF 99,147 -FR 83,163 |
| fr-unstranded | USE Baminisht Original MODE (described below) |
If you don't know your dataset strandness, run infer_experiment.py from RSeQC.
[FR-FIRSTRAND]
baminsight stranded (genome) (email) --names bamfile1.bam bamfile2.bam -FF 83,163 -FR 99,147
baminsight stranded hg38 [email protected] Rnaseq_rep1_HelaS3.bam Rnaseq_rep2_HelaS3.bam -FF 83,163 -FR 99,147
[FR-SECONDSTRAND]
baminsight stranded (genome) (email) --names bamfile1.bam bamfile2.bam -FF 99,147 -FR 83,163
baminsight stranded hg38 [email protected] Rnaseq_rep1_HelaS3.bam Rnaseq_rep2_HelaS3.bam -FF 99,147 -FR 83,163
It is possible to directly visualize the bam reads in UCSC Genome Browser. For that just add to bamInsight the argument -addbam .
baminsight stranded hg38 [email protected] Rnaseq_rep1_HelaS3.bam Rnaseq_rep2_HelaS3.bam -FF 83,163 -FR 99,147 -add_bam
Finally, It is possible to directly send the final directory containing bigWig and auxiliary files, to your own FTP server. It is the last step before you visualize your dataset in the genome viewer. For that you just need to define FTP host name, username, password, port and path just as indicated below:
baminsight stranded hg38 [email protected] Rnaseq_rep1_HelaS3.bam -FF 83,163 -FR 99,147 -add_bam -FTPHOST yourftp.hostname.com
-FTPUser ftpusername -FTPPassword ultraSecretPassword -FTPPort 21 -FTPPath /path/to/be/allocated/baminsight/output
If you want to re-define the names of the final tracks please use the -long_label or/and -short_label arguments. Otherwise, tracks names will be equal as bam file names.
Baminsight work reach the end. Now is just follow the next few steps to upload the all files generated in bamInsight, to UCSC Genome Browser.
1 - On a web browser open UCSC Genome Browser website - https://genome-euro.ucsc.edu/.
2 - Click on My Data > MySessions .

3 - Create a UCSC account. If you have have just Login.

4 - Click on Track Hubs

5 - Select My Hubs.
6 - Paste the link on URL formed as:
ftp://<user>:<password>@<ftphostname>:<ftpPort><ftpPath>/hub.txt
ftp://ftpusername:[email protected]:21/path/to/be/allocated/baminsight/output/hub.txt
End the process clicking on Add Hub.
7 - Visualize your track in clicking on Genome Browser

bamInsight Original Mode only differ from Stranded Mode in the first part of the process. while Stranded mode divide the given bam file in forward and reverse reads, this mode keep the file as the Original, as can be seen in the next picture.

Then, It is presented a example command:
baminsight original hg38 [email protected] Chipseq_rep1_HelaS3.bam -add_bam -FTPHOST yourftp.hostname.com
-FTPUser ftpusername -FTPPassword ultrasecretpassword -FTPPort 21 -FTPPath /path/to/be/allocated/baminsight/output
-long_label HelaS3_Rep1 -short_label HeLa1
I hope bamInsight could be so useful for you, than It is for me, in your bioinformatic daily tasks. For more information, or in case of any doubt please open a new issue in github or send me a private message.
Content type
Image
Digest
Size
501.9 MB
Last updated
about 5 years ago
docker pull rluis/baminsight