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?
Many thanks, guys!
I am really sorry that I did not make my question more clear: I wanted to program it using the gatb-core package.
My aim is gatb in my program, which needs this histogram (and could make used of the
Histogram
class).You can retrieve the histogram information as a typed collection in the HDF5 file. This can be done with the gatb-core library this way:
Actually, the Histogram class is not able to load the HDF5 file and provide an API for getting the information ; note that such a feature could be added in a future version.
Cool! Exactly what I needed. Sorry, I did not get that DSK was internally used for creating the HDF5 file.