MatthewRalston / kmerdb

Python bioinformatics CLI for k-mer counts and de Bruijn graphs
https://matthewralston.github.io/kmerdb
Apache License 2.0
12 stars 1 forks source link

Slurp profile #8

Closed MatthewRalston closed 3 years ago

MatthewRalston commented 3 years ago

The other goal that can be started is the experimentation of a get_profile function or similar in fileutils that would slurp the entire profile into memory. I'm sick of not being able to have direct access to the data in memory if I'm sure it will fit, and having a function like this would be helpful for experimentation with the similarity metrics.

MatthewRalston commented 3 years ago

The rarefaction branch completely addresses the use case of reading entire profiles into memory. The .slurp() method now returns the profile as well as sets it (on first run, additional runs are untested but possible if the pointer is set correctly.