export coverage track

1,265 views
Skip to first unread message

gonz...@colorado.edu

unread,
Jan 29, 2012, 1:43:31 PM1/29/12
to igv-...@googlegroups.com
Hi all, 
Is there a tool in IGV that would allow me to export the .bam coverage track? For example, I am interested in getting the count, number of A C G T N, for each nucleotide. All that information is available in the coverage track, but I can't find a way to extract it. Any suggestion?
Thanks, 
Patrick

Jacob Silterra

unread,
Feb 1, 2012, 3:01:39 PM2/1/12
to igv-...@googlegroups.com
Hi Patrick,

We do have a method to do this available in the early access version of igvtools. This feature is considered alpha right now.
You can get the early access version at http://www.broadinstitute.org/software/igv/download_dev.

I've attached more detailed instructions, but the basic command I think you're looking for would be something like this:

bash igvtools count -a sc=b example.bam output.tdf hg18.genome

The bolded section indicates counting the nucleotides separately.

It's also possible to use a query and only count a specific region, this requires that you index your bam file with samtools.

-Jacob



ex_count.txt

Jim Robinson

unread,
Feb 1, 2012, 3:58:30 PM2/1/12
to igv-...@googlegroups.com
BTW, to get the output in ascii format use ".wig" for the output file extension (rather than ".tdf").  The output is wig-like, not strictly wig as it might have multiple value columns. 

Batsal Devkota

unread,
Feb 17, 2012, 11:57:37 AM2/17/12
to igv-help
Hello Jacob,

I downloaded igvtools from early access page, however when I tried
running the count with option -a I got the following error:

log4j:ERROR Could not find value for key log4j.appender.R
log4j:ERROR Could not instantiate appender named "R".
Unknown option '-a'

Please help. I am trying to export the coverage count data from a bam
file as well.

batsal.

On Feb 1, 3:01 pm, Jacob Silterra <ja...@broadinstitute.org> wrote:
> Hi Patrick,
>
> We do have a method to do this available in the early access version of
> igvtools. This feature is considered alpha right now.
> You can get the early access version athttp://www.broadinstitute.org/software/igv/download_dev.
>
> I've attached more detailed instructions, but the basic command I think
> you're looking for would be something like this:
>
> bash igvtools count -a *sc=b* example.bam output.tdf hg18.genome
>
> The bolded section indicates counting the nucleotides separately.
>
> It's also possible to use a query and only count a specific region, this
> requires that you index your bam file with samtools.
>
> -Jacob
>
>  ex_count.txt
> < 1KViewDownload

Jacob Silterra

unread,
Feb 17, 2012, 3:08:33 PM2/17/12
to igv-...@googlegroups.com
Ah the perils of early access. We've changed the syntax to be more
closely aligned with that of standard command line interfaces.

As of this moment, the following command will count bases in
example.bam, and write the output to output.tdf:

bash igvtools count --bases example.bam output.tdf hg18.genome

Note to you and any future users, early release builds are a bit risky
to use. Any undocumented APIs can and do change.

Starting from todays build, there are docs accessible in the command
line. These are not guaranteed to be current for early-access either,
but they should be more current than forum posts.

"igvtools help <command>" will display options for the provided <command>.

So enter:
igvtools help count

And you'll see a full list of count options.

-Jacob

--
Jacob Silterra
Software Engineer
Broad Institute

ex_count.txt
Reply all
Reply to author
Forward
0 new messages