Best way to view wig/bigwig/bedgraph files - because IGV failing...

11 views
Skip to first unread message

KUMAR Sujai

unread,
Apr 24, 2019, 11:53:42 AM4/24/19
to Ashworth Codemonkeys, ashworth-bioin...@googlegroups.com, bla...@googlegroups.com
Apologies for cross posting (not sure if the ABC mailing list is just for the journal club or for random questions too - list managers please advise! :-))

I have a bam file with TOO many reads (25M) mapped to a 236 kb viral genome - as you can imagine IGV falls over while trying to load as BAM - presumably because the depth is too much (?) at each position...

So I tried converting bam to bigwig/bedgraph, and the files look right. but when I try to load those in IGV - nothing actually shows up in the coverage area.

Has this happened to anyone else?

If so, what do you use to show depth of coverage of reads mapped across a small genome (or small bit of a genome) - another tool? Or a custom python/R/perl script? If so, would you mind sharing it? (I could make the plot in anything, but it takes longer to get it to look pretty than to make the plot so am hoping to cheat and use someone else's  :-))

Thanks!

- Sujai
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.

Kashyap Chhatbar

unread,
Apr 24, 2019, 12:00:17 PM4/24/19
to KUMAR Sujai, Ashworth Codemonkeys, ashworth-bioin...@googlegroups.com, bla...@googlegroups.com
Hi Sujai,

What tool are you using for converting to bigwig? I would recommend this https://deeptools.readthedocs.io/en/develop/content/tools/bamCoverage.html

Also, make sure you put effective genome size https://deeptools.readthedocs.io/en/latest/content/feature/effectiveGenomeSize.html according to the viral genome.

This tool creates flawless bigwigs (at least for mammalian genomes).

Unless, Of course you would have tried this already, ignore this.

Best,

Kashyap



--
You received this message because you are subscribed to the Google Groups "Ashworth Bioinformatics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ashworth-bioinformat...@googlegroups.com.
To post to this group, send email to ashworth-bioin...@googlegroups.com.
Visit this group at https://groups.google.com/group/ashworth-bioinformatics-club.
For more options, visit https://groups.google.com/d/optout.


--

Kashyap Chhatbar

CEZARD Timothe

unread,
Apr 24, 2019, 12:01:29 PM4/24/19
to ashworth-c...@googlegroups.com, ashworth-bioin...@googlegroups.com, bla...@googlegroups.com

Have not used it but this might be useful

https://github.com/brentp/goleft/tree/master/indexcov

 

Cheers,

Tim

--

Timothee Cezard

Lead Informatician

Edinburgh Genomics ­ Clinical Genomics

Timothe...@ed.ac.uk

0131 651 9412

 

========================================================

Edinburgh Genomics' Privacy Notice can be viewed at:

http://genomics.ed.ac.uk/about-us/privacy-notice

 

This email and any attachments are confidential and intended solely

for the use of the recipient(s) to whom they are addressed. If you have

received it in error, please destroy all copies and inform the sender.

========================================================

 

 

From: <ashworth-c...@googlegroups.com> on behalf of KUMAR Sujai <sujai...@ed.ac.uk>
Reply-To: "ashworth-c...@googlegroups.com" <ashworth-c...@googlegroups.com>
Date: Wednesday, 24 April 2019 at 16:54
To: Ashworth Codemonkeys <ashworth-c...@googlegroups.com>, "ashworth-bioin...@googlegroups.com" <ashworth-bioin...@googlegroups.com>, "bla...@googlegroups.com" <bla...@googlegroups.com>
Subject: [ashworth-code-monkeys] Best way to view wig/bigwig/bedgraph files - because IGV failing...

 

Apologies for cross posting (not sure if the ABC mailing list is just for the journal club or for random questions too - list managers please advise! :-))

 

I have a bam file with TOO many reads (25M) mapped to a 236 kb viral genome - as you can imagine IGV falls over while trying to load as BAM - presumably because the depth is too much (?) at each position...

 

So I tried converting bam to bigwig/bedgraph, and the files look right. but when I try to load those in IGV - nothing actually shows up in the coverage area.

 

Has this happened to anyone else?

 

If so, what do you use to show depth of coverage of reads mapped across a small genome (or small bit of a genome) - another tool? Or a custom python/R/perl script? If so, would you mind sharing it? (I could make the plot in anything, but it takes longer to get it to look pretty than to make the plot so am hoping to cheat and use someone else's  :-))

 

Thanks!

 

- Sujai

The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.

--
The wiki is at:
https://www.wiki.ed.ac.uk/display/AshCodes/Ashworth+Codemonkeys
The mailing list archive is at:
https://groups.google.com/forum/?fromgroups#!forum/ashworth-code-monkeys
If you have trouble editing the wiki or emailing the group, let me know: sujai...@ed.ac.uk
---
You received this message because you are subscribed to the Google Groups "Ashworth Codemonkeys" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ashworth-code-mo...@googlegroups.com.

Dominik R. Laetsch

unread,
Apr 24, 2019, 12:05:53 PM4/24/19
to ashworth-c...@googlegroups.com, Dominik R. Laetsch, ashworth-bioin...@googlegroups.com, bla...@googlegroups.com
On 24 Apr 2019, at 16:53, KUMAR Sujai <sujai...@ed.ac.uk> wrote:

Apologies for cross posting (not sure if the ABC mailing list is just for the journal club or for random questions too - list managers please advise! :-))

I'll allow it ... 😉


I have a bam file with TOO many reads (25M) mapped to a 236 kb viral genome - as you can imagine IGV falls over while trying to load as BAM - presumably because the depth is too much (?) at each position...

So I tried converting bam to bigwig/bedgraph, and the files look right. but when I try to load those in IGV - nothing actually shows up in the coverage area.

Well, I like old-school samtools tview for looking at things...

Has this happened to anyone else?

If so, what do you use to show depth of coverage of reads mapped across a small genome (or small bit of a genome) - another tool? Or a custom python/R/perl script? If so, would you mind sharing it? (I could make the plot in anything, but it takes longer to get it to look pretty than to make the plot so am hoping to cheat and use someone else's  :-))

Do you want a genome browser or do you want to compute coverages? For the latter I think indexcov or https://github.com/brentp/mosdepth are the best options, mosdepth does cumulative coverage decay plots ...

Cheers, 

Dom

Thanks!

- Sujai
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.

Dominik R. Laetsch

unread,
Apr 24, 2019, 12:22:15 PM4/24/19
to Verity Hill, Dominik R. Laetsch, Kashyap Chhatbar, Sujai Kumar, Ashworth Codemonkeys, ashworth-bioin...@googlegroups.com, bla...@googlegroups.com
Re mosdepth: if you go for this, you can use the output and modify the attached python script to make a cumulative-cov-decay-plot (see PNG) from the output ...

IP.plot_wgs_cumcovdecay.py
wgs_cumcovdecay.png

KUMAR Sujai

unread,
Apr 24, 2019, 12:41:46 PM4/24/19
to ashworth-bioin...@googlegroups.com, Ashworth Codemonkeys
Many thanks to all. Will try all suggestions and report back (yes, I needed to visualise it, not just calculate depth, which bedtools did fine too)

Thanks Dom/Verity for confirming appropriate use - so if anyone reading this is on codemonkeys but not on ABC, it might be worth signing up to ABC (ashworth-bioinforma...@googlegroups.com or visit this group at https://groups.google.com/group/ashworth-bioinformatics-club)

On Wed, 24 Apr 2019 at 11:22, Dominik R. Laetsch <dominik...@gmail.com> wrote:
Re mosdepth: if you go for this, you can use the output and modify the attached python script to make a cumulative-cov-decay-plot (see PNG) from the output ...

--
You received this message because you are subscribed to the Google Groups "Ashworth Bioinformatics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ashworth-bioinformat...@googlegroups.com.
To post to this group, send email to ashworth-bioin...@googlegroups.com.
Visit this group at https://groups.google.com/group/ashworth-bioinformatics-club.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ashworth Bioinformatics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ashworth-bioinformat...@googlegroups.com.
To post to this group, send email to ashworth-bioin...@googlegroups.com.
Visit this group at https://groups.google.com/group/ashworth-bioinformatics-club.
For more options, visit https://groups.google.com/d/optout.
 

On 24 Apr 2019, at 17:07, 'Verity Hill' via Ashworth Bioinformatics Club <ashworth-bioin...@googlegroups.com> wrote:

Hi Sujai,

We envisioned the ABC mailing list to be for the journal club but also as a forum to answer questions just like this! We thought it could draw together code monkeys and bioinformatics journal club

happy questioning

(I do not know the answer to your question)



--
Sujai Kumar
The University of Edinburgh
Ashworth Laboratories
Charlotte Auerbach Road
Edinburgh EH9 3FL, UK

Edward Wallace

unread,
Apr 24, 2019, 1:20:16 PM4/24/19
to ashworth-c...@googlegroups.com, ashworth-bioin...@googlegroups.com
I've started using R/tidyverse for this.

library(tidyverse)
library(valr)

plot_bgmribo <- function(bg,chromr,startr,endr) {
        ggplot(data=bg %>%
                   filter(chrom==chromr, start >= startr, end <= endr),
               aes(ymin=0,ymax=value,xmin=start,xmax=end)) +
        geom_rect(fill="blue",colour=NA) +
        labs(y="read count", x="position on chromosome")
}

bg <- read_bedgraph("mybed.bedgraph")

Can also get .gff files in R from rmonad vignette https://cran.r-project.org/web/packages/rmonad/vignettes/gff-processing.html
And plot them analogously, let me know if you want a script.

I haven't tried with bigwig.

Best
Edward

--
The wiki is at:
https://www.wiki.ed.ac.uk/display/AshCodes/Ashworth+Codemonkeys
The mailing list archive is at:
https://groups.google.com/forum/?fromgroups#!forum/ashworth-code-monkeys
If you have trouble editing the wiki or emailing the group, let me know: sujai...@ed.ac.uk
---
You received this message because you are subscribed to the Google Groups "Ashworth Codemonkeys" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ashworth-code-mo...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Edward Wallace
Tel: +44-777-914-7542
Reply all
Reply to author
Forward
0 new messages