Giter Site home page Giter Site logo

geo is not searchable about bionode-ncbi HOT 5 CLOSED

bionode avatar bionode commented on September 25, 2024
geo is not searchable

from bionode-ncbi.

Comments (5)

Istar-Eldritch avatar Istar-Eldritch commented on September 25, 2024 2

I'll put some time today into this.

from bionode-ncbi.

Istar-Eldritch avatar Istar-Eldritch commented on September 25, 2024

As I see it we have some options:

  • Have an internal list of the valid db options and check it upfront request
    • This can be created the first time the users uses the tool and use a cached version of it from that moment if hardcoding is not an option.
    • This will also allow the usage of a string metric algorithm for suggestions in case the db is not found.
  • Identify conflictive cases and create the specific mapping for them.
    • This is a simple and fast solution. But won't protect the user from misspells.
  • Do the request but if the following object is returned bail out and notify the user:
{
  "header": {
    "type": "esearch",
    "version": "0.3"
  },
  "esearchresult": {
    "ERROR": "Invalid db name specified: dst"
  }
}
  • The check can be done here bionode-ncbi.js#L523 skipping the retry loop.
  • An internal list of valid dbs can be present for suggestions as in the first case

In my opinion the last option is the most suitable. @bmpvieira If you agree I'll create a pull request to solve it. Do you have any other idea?

from bionode-ncbi.

bmpvieira avatar bmpvieira commented on September 25, 2024

I think we should go with the first option, check if db is valid and if not present list of valid ones (hardcoded in an internal config file in JSON or YAML format).

Here's one retrieved from the select box on NCBI website (not sure if all work with eutils/biondo-ncbi):

"gquery","All Databases"
"assembly","Assembly"
"bioproject","BioProject"
"biosample","BioSample"
"biosystems","BioSystems"
"books","Books"
"clinvar","ClinVar"
"clone","Clone"
"cdd","Conserved Domains"
"gap","dbGaP"
"dbvar","dbVar"
"nucest","EST"
"gene","Gene"
"genome","Genome"
"gds","GEO DataSets"
"geoprofiles","GEO Profiles"
"nucgss","GSS"
"gtr","GTR"
"homologene","HomoloGene"
"medgen","MedGen"
"mesh,"MeSH"
"ncbisearch","NCBI Web Site"
"nlmcatalog","NLM Catalog"
"nuccore","Nucleotide"
"omim","OMIM"
"pmc","PMC"
"popset","PopSet"
"probe","Probe"
"protein","Protein"
"proteinclusters","Protein Clusters"
"pcassay","PubChem BioAssay"
"pccompound","PubChem Compound"
"pcsubstance","PubChem Substance
"pubmed,"PubMed"
"pubmedhealth","PubMed Health"
"snp","SNP"
"sparcle","Sparcle"
"sra","SRA"
"structure","Structure"
"taxonomy","Taxonomy"
"toolkit","ToolKit"
"toolkitall","ToolKitAll"
"toolkitbook","ToolKitBook"
"toolkitbookgh","ToolKitBookgh"
"unigene","UniGene"

from bionode-ncbi.

bmpvieira avatar bmpvieira commented on September 25, 2024

I've kind of solved this at the CLI level by switching to yargs (#32) but I think it would be nice to also have these kind of checks internally in the library. Maybe we could somehow reuse yargs choice definition.

from bionode-ncbi.

bmpvieira avatar bmpvieira commented on September 25, 2024

Fixed by #33. Thanks!

from bionode-ncbi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.