I cannot seem to find a way to query nucleotide database (https://www.ncbi.nlm.nih.gov/nuccore) by a specific qualifier of the feature. For example, by /host under the feature "source". For example, below is a part of one record, where the qualifier /host contains "Bemisia tabaci B". How could I search for all sequences that contain the word "Bemisia" in the qualifier \host?

FEATURES             Location/Qualifiers
 source          1..351658
                 /organism="Candidatus Portiera aleyrodidarum BT-B-HRs"
                 /mol_type="genomic DNA"
                 /host="Bemisia tabaci B"
 gene            1..1926
 CDS             1..1926
                 /inference="COORDINATES: similar to AA
                 /note="Derived by automated computational analysis using
                 gene prediction method: Protein Homology."
                 /product="molecular chaperone DnaK"

Best, Milan

  • $\begingroup$ Doesn't it work if you just search for [host]"Bemisia tabaci B"? $\endgroup$
    – terdon
    May 5, 2020 at 14:55
  • $\begingroup$ @terdon Unfortunately it does not. If I try exactly as you wrote, it says "The following terms were ignored: [, ]". If I reverse the query to be "Bemisia tabaci B"[host], then the response is "Unknown field was ignored: [host]." $\endgroup$
    – hlex
    May 5, 2020 at 17:26
  • $\begingroup$ Yes, it says The following terms were ignored: [, ], but the results seem to be what you're looking for, are they not? $\endgroup$
    – terdon
    May 6, 2020 at 8:14
  • $\begingroup$ Almost, it does include sequences that have the term in \host, but it also returns many sequences that do not have \host qualifier at all, but contain the term elsewhere, usually in the name of the sequence (DEFINITION). This is especially visible if you do [host]"Bemisia". $\endgroup$
    – hlex
    May 6, 2020 at 9:01

1 Answer 1


For this particular query, try host=Bemisia tabaci B[WORD]. However, you may also be interested in related queries like host=Bemisia tabaci B biotype[WORD].

But, I am not sure a general solution exists, as I do not believe all qualifiers are indexed.

Also, you can see how your query is interpreted on the right side under "Search details". For the original attempt ([host]"Bemisia tabaci B"), it is interpreted as:

host[All Fields] AND "Bemisia tabaci B"[All Fields]

while the goal is to produce

host=Bemisia tabaci B biotype[WORD]
  • $\begingroup$ Thanks for confirming it to me, the issue is indeed that this qualifier is not indexed. In the end, I downloaded the results as GenBank file for a much wider search, and then locally imported into BioSQL database where I was able to write queries for every qualifier and get the result I needed. It takes some effort, but the flexibility of running complex queries was amazing to have. $\endgroup$
    – hlex
    Nov 5, 2020 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.