CompositeQuery#
- class biotite.database.entrez.CompositeQuery(operator, query1, query2)[source]#
Bases:
QueryA representation of a composite query for the NCBI Entrez search service.
A composite query is a combination of two other queries, combined with an ‘AND’, ‘OR’ or ‘NOT’ operator.
Usually the user does not create instances of this class directly, but
Queryinstances are combined with|(OR),&(AND) or^(NOT).- Parameters:
- operatorstr, {“AND”, “OR”, “NOT”}
The combination operator.
- query1, query2SimpleQuery
The queries to be combined.
Examples
>>> query = SimpleQuery("Escherichia coli", "Organism") & \ ... SimpleQuery("90:100", "Sequence Length") >>> print(type(query).__name__) CompositeQuery >>> print(query) ("Escherichia coli"[Organism]) AND (90:100[Sequence Length])