Comments (3)
Yes, I need to add two options. One for limiting the number of results (right now it returns everything for a particular search) and another for changing the number of items asked per internal bionode-ncbi request to NCBI servers (currently 50). The latter doesn't affect the number of results since bionode-ncbi will paginate internally until it returns everything, but can affect performance and stability.
So if you do a search that will return 1000 items, bionode-ncbi will currently do sequentially 20 requests to NCBI. Increasing retmax for example to 500 so that it only does 2 requests can improve speed. However if you're running it in an pipeline, in some cases, it's better/faster to do many small requests and pipe frequently to other steps downstream than to wait for NCBI to process 500 items and then pipe all those items at once on your downstream processing.
Another reason to ask for less items per request is that for some NCBI databases, each item can contain a lot of data so asking for 500 can actually cause a timeout of the request.
So I'll probably keep the number of items per request low, or adjusted to the average item size for each type of database (e.g., sra, pubmed, biosample) but I will provide an option to override it so that advanced users can tweak it.
from bionode-ncbi.
Great. I'm interested in the first option. I am not using dat currently but will replace my own ncbi search with this and work on transitioning to dat.
from bionode-ncbi.
Option added:
bionode-ncbi search human --limit 10 (or just -l)
or in JavaScript
ncbi.search({ db: 'sra', term: 'human', limit: 10 }).on('data', console.log)
from bionode-ncbi.
Related Issues (20)
- Implement efetch API
- Download the GFF file of the Cycas taitungensis mitochondrion HOT 9
- Uncaught, unspecified "error" event HOT 1
- How to look up metadata for an SRR file HOT 1
- Tests are broken because of NCBI side metadata changes (again) HOT 2
- rna_from_genomic instead of genomic.fna
- geo is not searchable HOT 5
- download in the examples printing too much info HOT 3
- We need a smaller assembly from NCBI for testing HOT 3
- Git rid of git-lfs
- Error handling when NCBI connection is lost HOT 4
- User-friendly CLI
- Modularize lib structure.
- Output some warning to terminal when there is no output
- Add Blast API HOT 2
- Use progress bar on download HOT 5
- Downloading one run download the whole Bioproject
- TypeError: Cannot create property 'Run' on string ' ' HOT 1
- Dependencies error: Prototype Pollution (lodash dependencies)
- Unexpected error when running 'bionode' HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bionode-ncbi.