Skip to content

Commit

Permalink
more replacements, fix data type #522
Browse files Browse the repository at this point in the history
  • Loading branch information
julie-sullivan committed Feb 3, 2020
1 parent 44de29b commit 23a707b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public Response getAggregationStats(@DefaultValue("") @QueryParam("fields")
@ApiImplicitParam(name = "annotation.expression.gene", value = ParamConstants.ANNOTATION_EXPRESSION_GENE,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.expression.tissue", value = ParamConstants.ANNOTATION_EXPRESSION_TISSUE,
required = false, dataType = "string", paramType = "query"),
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.expression.value", value = ParamConstants.ANNOTATION_EXPRESSION_VALUE,
required = false, dataType = "string", paramType = "query"),
@ApiImplicitParam(name = "annotation.drugs.name", value = ParamConstants.ANNOTATION_DRUGS_NAME,
Expand Down Expand Up @@ -366,7 +366,7 @@ public Response getAllIDs() {
@ApiImplicitParam(name = "annotation.expression.gene", value = ParamConstants.ANNOTATION_EXPRESSION_GENE,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.expression.tissue", value = ParamConstants.ANNOTATION_EXPRESSION_TISSUE,
required = false, dataType = "string", paramType = "query"),
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.drugs.name", value = ParamConstants.ANNOTATION_DRUGS_NAME,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.drugs.gene", value = ParamConstants.ANNOTATION_DRUGS_GENE,
Expand Down Expand Up @@ -603,7 +603,7 @@ public Response getAllRegulatoryElements(@PathParam("geneId")
@ApiImplicitParam(name = "annotation.expression.gene", value = ParamConstants.ANNOTATION_EXPRESSION_GENE,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.expression.tissue", value = ParamConstants.ANNOTATION_EXPRESSION_TISSUE,
required = false, dataType = "string", paramType = "query"),
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.drugs.name", value = ParamConstants.ANNOTATION_DRUGS_NAME,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.drugs.gene", value = ParamConstants.ANNOTATION_DRUGS_GENE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,12 @@ public Response first() throws Exception {
public Response count(@DefaultValue("")
@QueryParam("region")
@ApiParam(name = "region",
value = "Comma separated list of genomic regions to be queried, e.g.: 1:6635137-6635325",
value = ParamConstants.REGION_DESCRIPTION,
required = false) String region,
@DefaultValue("")
@QueryParam("biotype")
@ApiParam(name = "biotype",
value = "Comma separated list of gene gencode biotypes, e.g.: protein_coding,miRNA,lincRNA."
+ " Exact text matches will be returned",
value = ParamConstants.GENE_BIOTYPES,
required = false) String biotype,
@DefaultValue("")
@QueryParam("xrefs")
Expand Down Expand Up @@ -137,44 +136,26 @@ public Response getByEnsemblId(@PathParam("transcriptId") String id) {
@ApiOperation(httpMethod = "GET", value = "Retrieves all gene objects for given ENSEMBL transcript ids.",
response = Gene.class, responseContainer = "QueryResponse")
@ApiImplicitParams({
@ApiImplicitParam(name = "biotype",
value = "Comma separated list of gene gencode biotypes, e.g.: protein_coding,miRNA,lincRNA."
+ " Exact text matches will be returned",
@ApiImplicitParam(name = "count", value = ParamConstants.COUNT_DESCRIPTION,
required = false, dataType = "java.lang.Boolean", paramType = "query", defaultValue = "false",
allowableValues = "false,true"),
@ApiImplicitParam(name = "biotype", value = ParamConstants.GENE_BIOTYPES,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "transcripts.biotype",
value = "Comma separated list of transcript gencode biotypes, e.g.: protein_coding,miRNA,lincRNA."
+ " Exact text matches will be returned",
@ApiImplicitParam(name = "transcripts.biotype", value = ParamConstants.TRANSCRIPT_BIOTYPES,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "transcripts.tfbs.name",
value = "Comma separated list of TFBS names, e.g.: CTCF,Gabp."
+ " Exact text matches will be returned",
@ApiImplicitParam(name = "transcripts.tfbs.name", value = ParamConstants.TRANSCRIPT_TFBS_NAMES,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.diseases.id",
value = "Comma separated list of phenotype ids (OMIM, UMLS), e.g.: umls:C0030297,OMIM:613390,"
+ "OMIM:613390. Exact text matches will be returned",
@ApiImplicitParam(name = "annotation.diseases.id", value = ParamConstants.ANNOTATION_DISEASES_IDS,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.diseases.name",
value = "Comma separated list of phenotypes, e.g.: Cryptorchidism,Absent thumb,Stage 5 chronic "
+ "kidney disease. Exact text matches will be returned",
@ApiImplicitParam(name = "annotation.diseases.name", value = ParamConstants.ANNOTATION_DISEASES_NAMES,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.expression.gene",
value = "Comma separated list of ENSEMBL gene ids for which expression values are available, "
+ "e.g.: ENSG00000139618,ENSG00000155657. Exact text matches will be returned",
@ApiImplicitParam(name = "annotation.expression.gene", value = ParamConstants.ANNOTATION_EXPRESSION_GENE,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.expression.tissue",
value = "Comma separated list of tissues for which expression values are available, "
+ "e.g.: adipose tissue,heart atrium,tongue."
+ " Exact text matches will be returned",
@ApiImplicitParam(name = "annotation.expression.tissue", value = ParamConstants.ANNOTATION_EXPRESSION_TISSUE,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.drugs.name",
value = "Comma separated list of drug names, "
+ "e.g.: BMN673,OLAPARIB,VELIPARIB."
+ " Exact text matches will be returned",
@ApiImplicitParam(name = "annotation.drugs.name", value = ParamConstants.ANNOTATION_DRUGS_NAME,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.drugs.gene",
value = "Comma separated list of gene names for which drug data is available, "
+ "e.g.: BRCA2,TTN."
+ " Exact text matches will be returned",
@ApiImplicitParam(name = "annotation.drugs.gene", value = ParamConstants.ANNOTATION_DRUGS_GENE,
required = false, dataType = "java.util.List", paramType = "query")
})
public Response getGeneById(@PathParam("transcriptId")
Expand Down Expand Up @@ -202,44 +183,36 @@ public Response getGeneById(@PathParam("transcriptId")
value = "Retrieves all transcript objects", response = Transcript.class,
responseContainer = "QueryResponse")
@ApiImplicitParams({
@ApiImplicitParam(name = "count",
value = "Get a count of the number of results obtained.",
required = false, dataType = "boolean", paramType = "query", defaultValue = "false",
@ApiImplicitParam(name = "count", value = ParamConstants.COUNT_DESCRIPTION,
required = false, dataType = "java.lang.Boolean", paramType = "query", defaultValue = "false",
allowableValues = "false,true"),
@ApiImplicitParam(name = "region",
value = "Comma separated list of genomic regions to be queried, e.g.: 1:6635137-6635325",
dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "region", value = ParamConstants.REGION_DESCRIPTION,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "id",
value = "Comma separated list of ENSEMBL transcript ids, e.g.: ENST00000342992"
+ " Exact text matches will be returned", dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "name",
value = "Comma separated list of transcript names, e.g.: BRCA2-201,TTN-003."
+ " Exact text matches will be returned", dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "biotype",
value = "Comma separated list of transcript gencode biotypes, e.g.: protein_coding,miRNA,lincRNA."
+ " Exact text matches will be returned", dataType = "java.util.List", paramType = "query"),

@ApiImplicitParam(name = "name", value = ParamConstants.TRANSCRIPT_NAMES,
dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "biotype", value = ParamConstants.TRANSCRIPT_BIOTYPES,
dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "xrefs",
value = "Comma separated list transcript xrefs ids, e.g.: ENSG00000145113,35912_at,GO:0002020."
+ " Exact text matches will be returned", dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "tfbs.name",
value = "Comma separated list of TFBS names, e.g.: CTCF,Gabp."
+ " Exact text matches will be returned", dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotationFlags",
value = "Comma separated list of annotation flags that must be present in the transcripts returned "
+ "within the gene model, e.g.: basic,CCDS. Exact text matches will be returned",
@ApiImplicitParam(name = "tfbs.name", value = ParamConstants.TRANSCRIPT_TFBS_NAMES,
dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotationFlags", value = ParamConstants.TRANSCRIPT_ANNOTATION_FLAGS,
dataType = "string", paramType = "query"),
})
public Response getAll(@QueryParam("exclude")
@ApiParam(value = "Set which fields are excluded in the response, e.g.: transcripts.exons.") String exclude,
@ApiParam(value = ParamConstants.EXCLUDE_DESCRIPTION) String exclude,
@QueryParam("include")
@ApiParam(value = "Set which fields are include in the response, e.g.: transcripts.exons.") String include,
@ApiParam(value = ParamConstants.INCLUDE_DESCRIPTION) String include,
@QueryParam("sort")
@ApiParam(value = "Sort returned results by a certain data model attribute.") String sort,
@ApiParam(value = ParamConstants.SORT_DESCRIPTION) String sort,
@QueryParam("limit") @DefaultValue("10")
@ApiParam(value = "Max number of results to be returned. Cannot exceed 5,000.") Integer limit,
@ApiParam(value = ParamConstants.LIMIT_DESCRIPTION) Integer limit,
@QueryParam("skip") @DefaultValue("0")
@ApiParam(value = "Number of results to be skipped.") Integer skip) {
@ApiParam(value = ParamConstants.SKIP_DESCRIPTION) Integer skip) {
try {
parseIncludesAndExcludes(exclude, include, sort);
parseLimitAndSkip(limit, skip);
Expand Down Expand Up @@ -303,10 +276,8 @@ public Response getSequencesByIdList(@PathParam("transcriptId")
@ApiOperation(httpMethod = "GET", value = "Get the protein info for the given transcript(s)", response = Entry.class,
responseContainer = "QueryResponse")
@ApiImplicitParams({
@ApiImplicitParam(name = "keyword",
value = "Comma separated list of keywords that may be associated with the protein(s), e.g.: "
+ "Transcription,Zinc. Exact text matches will be returned",
required = false, dataType = "java.util.List", paramType = "query")
@ApiImplicitParam(name = "keyword", value = ParamConstants.PROTEIN_KEYWORD, required = false,
dataType = "java.util.List", paramType = "query")
})
public Response getProtein(@PathParam("transcriptId")
@ApiParam(name = "transcriptId",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,44 +103,24 @@ private boolean hasHistogramQueryParam() {
@ApiImplicitParam(name = "interval",
value = "Use only if histogram=true. Boolean indicating the size of the histogram interval",
defaultValue = "200000", required = false, dataType = "Integer", paramType = "query"),
@ApiImplicitParam(name = "biotype",
value = "Comma separated list of gene gencode biotypes, e.g.: protein_coding,miRNA,lincRNA."
+ " Exact text matches will be returned",
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "transcripts.biotype",
value = "Comma separated list of transcript gencode biotypes, e.g.: protein_coding,miRNA,lincRNA."
+ " Exact text matches will be returned",
@ApiImplicitParam(name = "biotype", value = ParamConstants.GENE_BIOTYPES,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "transcripts.xrefs",
value = "Comma separated list transcript xrefs ids, e.g.: ENSG00000145113,35912_at,GO:0002020."
+ " Exact text matches will be returned",
@ApiImplicitParam(name = "transcripts.biotype", value = ParamConstants.TRANSCRIPT_BIOTYPES,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "transcripts.tfbs.name",
value = "Comma separated list of TFBS names, e.g.: CTCF,Gabp."
+ " Exact text matches will be returned",
@ApiImplicitParam(name = "transcripts.xrefs", value = ParamConstants.TRANSCRIPT_XREFS,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.diseases.id",
value = "Comma separated list of phenotype ids (OMIM, UMLS), e.g.: umls:C0030297,OMIM:613390,"
+ "OMIM:613390. Exact text matches will be returned",
@ApiImplicitParam(name = "transcripts.tfbs.name", value = ParamConstants.TRANSCRIPT_TFBS_NAMES,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.diseases.name",
value = "Comma separated list of phenotypes, e.g.: Cryptorchidism,Absent thumb,Stage 5 chronic "
+ "kidney disease. Exact text matches will be returned",
@ApiImplicitParam(name = "annotation.diseases.id", value = ParamConstants.ANNOTATION_DISEASES_IDS,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.expression.gene",
value = "Comma separated list of ENSEMBL gene ids for which expression values are available, "
+ "e.g.: ENSG00000139618,ENSG00000155657. Exact text matches will be returned",
@ApiImplicitParam(name = "annotation.diseases.name", value = ParamConstants.ANNOTATION_DISEASES_NAMES,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.expression.tissue",
value = "Comma separated list of tissues for which expression values are available, "
+ "e.g.: adipose tissue,heart atrium,tongue."
+ " Exact text matches will be returned",
@ApiImplicitParam(name = "annotation.expression.gene", value = ParamConstants.ANNOTATION_EXPRESSION_GENE,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.drugs.name",
value = "Comma separated list of drug names, "
+ "e.g.: BMN673,OLAPARIB,VELIPARIB."
+ " Exact text matches will be returned",
@ApiImplicitParam(name = "annotation.expression.tissue", value = ParamConstants.ANNOTATION_EXPRESSION_TISSUE,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.drugs.name", value = ParamConstants.ANNOTATION_DRUGS_NAME,
required = false, dataType = "java.util.List", paramType = "query")
})
public Response getGenesByRegionPost(@FormParam("region")
@ApiParam(name = "region",
Expand Down Expand Up @@ -179,7 +159,7 @@ public Response getGenesByRegionPost(@FormParam("region")
@ApiImplicitParam(name = "annotation.expression.gene", value = ParamConstants.ANNOTATION_EXPRESSION_GENE,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.expression.tissue", value = ParamConstants.ANNOTATION_EXPRESSION_TISSUE,
required = false, dataType = "string", paramType = "query"),
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "annotation.drugs.name", value = ParamConstants.ANNOTATION_DRUGS_NAME,
required = false, dataType = "java.util.List", paramType = "query")
})
Expand Down
Loading

0 comments on commit 23a707b

Please sign in to comment.