Class GoTermsWebService
GO term URI → genes annotated
with it. Companion to GET /genes/{id}/goTerms (gene → its GO terms).
Drives the dataset Visualize tab's "pick genes by GO term" mode — visitor types a
GO term, the UI calls /goTerms/{termUri}/genes and renders the candidate
gene list for selection.
GO-term TYPEAHEAD is not a new endpoint; the existing
GET /annotations/search?query=...&prefixes=GO_ already covers it (filters
the Lucene index to GO URIs, ranks by Lucene score).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classWire payload forGET /goTerms/{termUri}/genes/count. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncountGenesByGoTerm(String termUri, TaxonArg<?> taxonArg, boolean propagate, int maxTerms) Distinct-gene count for the given GO term, optionally including descendants.getGenesByGoTerm(String termUri, TaxonArg<?> taxonArg, OffsetArg offsetArg, LimitArg limitArg, boolean propagate, int maxTerms) Reverse lookup: genes annotated with the given GO term.
-
Constructor Details
-
GoTermsWebService
public GoTermsWebService()
-
-
Method Details
-
getGenesByGoTerm
@GET @Path("/{termUri}/genes") @Produces("application/json") public PaginatedResponseDataObject<GeneValueObject> getGenesByGoTerm(@PathParam("termUri") String termUri, @QueryParam("taxon") TaxonArg<?> taxonArg, @QueryParam("offset") @DefaultValue("0") OffsetArg offsetArg, @QueryParam("limit") @DefaultValue("100") LimitArg limitArg, @QueryParam("propagate") @DefaultValue("false") boolean propagate, @QueryParam("maxTerms") @DefaultValue("0") int maxTerms) Reverse lookup: genes annotated with the given GO term.termUriis the full OBO-style URI (http://purl.obolibrary.org/obo/GO_0006915); URL-encoded into the path segment.When
propagate=true(defaultfalse) the lookup also includes the union of genes annotated to anysubClassOfdescendant oftermUri— the natural semantic for a parent term like "regulation of apoptotic process" where the caller wants every gene under that umbrella.propagate=truerequires the GO ontology to be loaded in theOntologyService; if it isn't, the call falls back to exact-term-only and logs a warning rather than 503-ing. -
countGenesByGoTerm
@GET @Path("/{termUri}/genes/count") @Produces("application/json") public ResponseDataObject<GoTermsWebService.GoTermGeneCountValueObject> countGenesByGoTerm(@PathParam("termUri") String termUri, @QueryParam("taxon") TaxonArg<?> taxonArg, @QueryParam("propagate") @DefaultValue("false") boolean propagate, @QueryParam("maxTerms") @DefaultValue("0") int maxTerms) Distinct-gene count for the given GO term, optionally including descendants. Cheap — goes throughcountByGOTermUris, which runsCOUNT(DISTINCT gene.id)without materializing Gene rows. Use this in place of fetching the full gene list just to display "N genes annotated to {term}" badges.
-