Package ubic.gemma.rest
Class TaxaWebService
java.lang.Object
ubic.gemma.rest.TaxaWebService
RESTful interface for taxa.
- Author:
- tesarst
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTaxaWebService
(TaxonService taxonService, ExpressionExperimentService expressionExperimentService, TaxonArgService taxonArgService, DatasetArgService datasetArgService, GeneArgService geneArgService) Constructor for service autowiring -
Method Summary
Modifier and TypeMethodDescriptiongetTaxa()
Lists all available taxa.getTaxaByIds
(TaxonArrayArg taxaArg) Retrieves single taxon based on the given identifier.getTaxonDatasets
(TaxonArg<?> taxonArg, FilterArg<ExpressionExperiment> filter, OffsetArg offset, LimitArg limit, SortArg<ExpressionExperiment> sort) Retrieves datasets for the given taxon.getTaxonGeneGoTerms
(TaxonArg<?> taxonArg, GeneArg<?> geneArg) getTaxonGeneLocations
(TaxonArg<?> taxonArg, GeneArg<?> geneArg) Retrieves gene location for the gene on the given taxon.getTaxonGeneProbes
(TaxonArg<?> taxonArg, GeneArg<?> geneArg, OffsetArg offsetArg, LimitArg limitArg) getTaxonGenes
(TaxonArg<?> taxonArg, OffsetArg offsetArg, LimitArg limitArg) getTaxonGenesByIds
(TaxonArg<?> taxonArg, GeneArrayArg geneArg) Retrieves genes matching the identifier on the given taxon.getTaxonGenesOverlappingChromosome
(TaxonArg<?> taxonArg, String chromosomeName, String strand, Long start, Integer size) Finds genes overlapping a given region.
-
Field Details
-
log
protected static final org.apache.commons.logging.Log log
-
-
Constructor Details
-
TaxaWebService
@Autowired public TaxaWebService(TaxonService taxonService, ExpressionExperimentService expressionExperimentService, TaxonArgService taxonArgService, DatasetArgService datasetArgService, GeneArgService geneArgService) Constructor for service autowiring
-
-
Method Details
-
getTaxa
Lists all available taxa. Does not offer any advanced filtering or sorting functionality. The reason for this is that Taxa are a relatively small set of objects that rarely change. -
getTaxaByIds
@GET @Path("/{taxa}") @Produces("application/json") public ResponseDataObject<List<TaxonValueObject>> getTaxaByIds(@PathParam("taxa") TaxonArrayArg taxaArg) Retrieves single taxon based on the given identifier.- Parameters:
taxaArg
- a list of identifiers, separated by commas (','). Identifiers can be the any of taxon ID, scientific name, common name. It is recommended to use ID for efficiency.Only datasets that user has access to will be available.
Do not combine different identifiers in one query.
-
getTaxonGenesOverlappingChromosome
@GET @Path("/{taxon}/chromosomes/{chromosome}/genes") @Produces("application/json") public ResponseDataObject<List<GeneValueObject>> getTaxonGenesOverlappingChromosome(@PathParam("taxon") TaxonArg<?> taxonArg, @PathParam("chromosome") String chromosomeName, @QueryParam("strand") String strand, @QueryParam("start") Long start, @QueryParam("size") Integer size) Finds genes overlapping a given region.- Parameters:
taxonArg
- can either be Taxon ID or one of its string identifiers: scientific name, common name. It is recommended to use the ID for efficiency.chromosomeName
- - eg: 3, 21, Xstrand
- - '+' or '-'. Defaults to '+'. (WIP, currently does not do anything).start
- - start of the region (nucleotide position).size
- - size of the region (in nucleotides).- Returns:
- GeneValue objects of the genes in the region.
-
getTaxonGenes
@GET @Path("/{taxon}/genes") @Produces("application/json") public PaginatedResponseDataObject<GeneValueObject> getTaxonGenes(@PathParam("taxon") TaxonArg<?> taxonArg, @QueryParam("offset") @DefaultValue("0") OffsetArg offsetArg, @QueryParam("limit") @DefaultValue("20") LimitArg limitArg) -
getTaxonGenesByIds
@GET @Path("/{taxon}/genes/{gene}") @Produces("application/json") public ResponseDataObject<List<GeneValueObject>> getTaxonGenesByIds(@PathParam("taxon") TaxonArg<?> taxonArg, @PathParam("gene") GeneArrayArg geneArg) Retrieves genes matching the identifier on the given taxon.- Parameters:
taxonArg
- can either be Taxon ID or one of its string identifiers: scientific name, common name. It is recommended to use the ID for efficiency.geneArg
- can either be the NCBI ID, Ensembl ID or official symbol. NCBI ID is most efficient (and guaranteed to be unique). Official symbol returns a gene homologue on a random taxon.- See Also:
-
getTaxonGeneProbes
@GET @Path("/{taxon}/genes/{gene}/probes") @Produces("application/json") public PaginatedResponseDataObject<CompositeSequenceValueObject> getTaxonGeneProbes(@PathParam("taxon") TaxonArg<?> taxonArg, @PathParam("gene") GeneArg<?> geneArg, @QueryParam("offset") @DefaultValue("0") OffsetArg offsetArg, @QueryParam("limit") @DefaultValue("20") LimitArg limitArg) - See Also:
-
getTaxonGeneGoTerms
@GET @Path("/{taxon}/genes/{gene}/goTerms") @Produces("application/json") public ResponseDataObject<List<GeneOntologyTermValueObject>> getTaxonGeneGoTerms(@PathParam("taxon") TaxonArg<?> taxonArg, @PathParam("gene") GeneArg<?> geneArg) - See Also:
-
getTaxonGeneLocations
@GET @Path("/{taxon}/genes/{gene}/locations") @Produces("application/json") public ResponseDataObject<List<PhysicalLocationValueObject>> getTaxonGeneLocations(@PathParam("taxon") TaxonArg<?> taxonArg, @PathParam("gene") GeneArg<?> geneArg) Retrieves gene location for the gene on the given taxon.- Parameters:
taxonArg
- can either be Taxon ID or one of its string identifiers: scientific name, common name. It is recommended to use the ID for efficiency.geneArg
- can either be the NCBI ID, Ensembl ID or official symbol. NCBI ID is most efficient (and guaranteed to be unique). Official symbol returns a gene homologue on a random taxon.
-
getTaxonDatasets
@GET @Path("/{taxon}/datasets") @Produces("application/json") public FilteredAndPaginatedResponseDataObject<ExpressionExperimentValueObject> getTaxonDatasets(@PathParam("taxon") TaxonArg<?> taxonArg, @QueryParam("filter") @DefaultValue("") FilterArg<ExpressionExperiment> filter, @QueryParam("offset") @DefaultValue("0") OffsetArg offset, @QueryParam("limit") @DefaultValue("20") LimitArg limit, @QueryParam("sort") @DefaultValue("+id") SortArg<ExpressionExperiment> sort) Retrieves datasets for the given taxon.Filtering allowed exactly like in
DatasetsWebService.getDatasets(QueryArg, FilterArg, OffsetArg, LimitArg, SortArg)
.- Parameters:
taxonArg
- can either be Taxon ID, Taxon NCBI ID, or one of its string identifiers: scientific name, common name. It is recommended to use the ID for efficiency.
-