I would like to retrieve the abundance histogram of a graph that I am building from a set of sequences.

I have seen how I can iterate on the graph and get the distribution by myself. However, it seems, from the options, that the distribution is computed while building the graph. The `Histogram` class comes with all the bells and whistles, and I would like to use it. Am I right? Can I access it?

I have also perused your examples, but I cannot find what I am looking for:

 - Example `kmer/kmer13.cpp` shows how to build the histogram for a Bank.
 - Example `debruijn/debruijn26.cpp` shows how the get the abundance of a node.
 - Example `storage/storage6.cpp` shows how to get the distribution from a file generated by DSK.

Any pointers?
Hi Matthias,

Here is a quick and dirty answer.

First extract the histogram from the h5 file:

    gatb-core/bin/h5dump -y -d histogram/histogram mygraph.h5 | grep "^\ *[0-9]" | paste - - | sed s/\ *//g | sed s/\,// > histo_data

Then plot the distribution:

    Rscript plot-kmer-histo.R histo_data

With `plot-kmer-histo.R` (from Claire Lemaitre)

```r
#!/usr/bin/Rscript

#usage :  ./plot-kmer-histo.R  dsk.histo
# or      RScript plot-kmer-histo.R  dsk.histo
args=commandArgs(TRUE)
if (length(args)<1) {
cat("Usage:\n")
cat("./plot-kmer-histo.R dsk.histo [output.png]\n")
cat("1 obligatory argument :\n   - kmer histo file (as output by DSK)\n")
cat("optional arguments :\n   - output file (default = input_file.png)\n")
quit()
}

hist.file=args[1]

tab=read.table(hist.file)[,1:2]

if (length(args)>1) {
    png.file=args[2]
}else{
    png.file=paste(hist.file,".png",sep="")
}
bitmap(png.file,"png256",width=7,height=6,res=300)
suppressWarnings (plot(tab$V1,tab$V2,type="h",log="y",xlab="kmer coverage",ylab="count",main=""))
d=dev.off()
```