phiweger / zoo

A portable datastructure for rapid prototyping in (viral) bioinformatics (under development).
5 stars 2 forks source link

zoo load accept text queries #93

Open phiweger opened 7 years ago

phiweger commented 7 years ago

like

term="txid10239[Organism:exp] NOT txid2[Organism:exp] NOT txid2759[Organism:exp] NOT txid2157[Organism:exp] AND (complete genome[Title] or complete cds[Title] or complete sequence[Title] or genome[Title])
phiweger commented 7 years ago

problem to code elegantly:

Query term for accession IDs is simply "1 2 3 4 5 etc." which errs out if too long. This is why we do batches. But the usual query term needs no batching up.

phiweger commented 7 years ago

see #85

phiweger commented 7 years ago

this line in load.py:

query_handle = Entrez.esearch(db=db, term=query, retmax=retmax)

so we just need to deal with the batch case and then feed the query into query arg.