pepkit / pepdbagent

Database for storing sample metadata
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

`get_namespace` function #16

Closed nleroy917 closed 2 years ago

nleroy917 commented 2 years ago

I see that there is a get_namespaces function (plural). It'd be nice to have a get_namespace function. I imagine it would function like this:

>>> db = PepAgent()
>>> geo = db.get_namespace("geo")
>>> geo

{
   'projects': [
        {
            'GSE123456': ...
        }
    ],
    'n_projects': 100,
    'n_samples': 78042
}

Maybe something like that? The projects key doesn't have to be full objects - maybe just annotation information.