Skip to content

Commit

Permalink
add exclude,include for consistency. more text replacements. #522
Browse files Browse the repository at this point in the history
  • Loading branch information
julie-sullivan committed Feb 4, 2020
1 parent 109b9b0 commit bae0083
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,48 @@ public class ParamConstants {
public static final String RS_IDS = "Comma separated list of rs ids, e.g.: rs6025, rs666"
+ " Exact text matches will be returned";

// ---------------------------------------------

public static final String SOURCE = "Comma separated list of database sources of the documents to be returned."
+ " Possible values are clinvar,cosmic or iarctp53. E.g.: clinvar,cosmic";

public static final String SEQUENCE_ONTOLOGY = "Comma separated list of sequence ontology term names, "
+ "e.g. missense_variant. Exact text matches will be returned. A list of searchable SO term names can be"
+ " accessed at https://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/v4/hsapiens/feature/variation/consequence_types";

public static final String FEATURE_IDS = "Comma separated list of feature ids, which can be either ENSEMBL gene "
+ "ids, HGNC gene symbols, transcript symbols or ENSEMBL transcript ids, e.g.: BRCA2, ENST00000409047. "
+ "Exact text matches will be returned.";

public static final String TRAITS = "Keywords search. Comma separated (no spaces in between) list of "
+ "keywords describing required phenotype/disease. All variants related somehow with all those keywords "
+ "(case insensitive) will be returned, e.g: carcinoma,lung or acute,myeloid,leukaemia. WARNING: returned "
+ "numTotalResults will always be -1 when searching by trait keywords.";

public static final String VARIANT_ACCESSIONS = "Comma separated list of database accessions, "
+ "e.g. RCV000033215,COSM306824 Exact text matches will be returned.";

public static final String VARIANT_IDS = "Comma separated list of ids, e.g. rs6025,COSM306824. "
+ "Exact text matches will be returned.";

public static final String VARIANT_TYPES = "Comma separated list of variant types, e.g. \"SNV\" A list of "
+ "searchable types can be accessed at "
+ "https://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/v4/hsapiens/clinical/variant/type";

public static final String CONSISTENCY_STATUS = "Comma separated list of consistency labels. A list of searchable "
+ "consistency labels can be accessed at "
+ "https://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/v4/hsapiens/clinical/variant/consistency_labels";

public static final String CLINICAL_SIGNFICANCE = "Comma separated list of clinical significance labels. "
+ "A list of searchable clinical significance labels can be accessed at "
+ "https://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/v4/hsapiens/clinical/variant/clinsig_labels"
+ " WARNING: returned numTotalResults will always be -1 if more than 1 label is provided.";

public static final String MODE_INHERITANCE = "Comma separated list of mode of inheritance labels. A list of "
+ "searchable mode of inheritance labels can be accessed at "
+ "https://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/v4/hsapiens/clinical/variant/mode_inheritance_labels";

public static final String ALLELE_ORIGIN = "Comma separated list of allele origin labels. A list of searchable "
+ "allele origin labels can be accessed at "
+ "https://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/v4/hsapiens/clinical/variant/allele_origin_labels";
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,59 +59,29 @@ public ClinicalWSServer(@PathParam("version")
@ApiImplicitParam(name = "count", value = ParamConstants.COUNT_DESCRIPTION,
required = false, dataType = "boolean", paramType = "query", defaultValue = "false",
allowableValues = "false,true"),
@ApiImplicitParam(name = "source",
value = "Comma separated list of database sources of the documents to be returned. Possible values "
+ " are clinvar,cosmic or iarctp53. E.g.: clinvar,cosmic",
@ApiImplicitParam(name = "source", value = ParamConstants.SOURCE,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "region", value = ParamConstants.REGION_DESCRIPTION,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "so",
value = "Comma separated list of sequence ontology term names, e.g.: missense_variant. Exact text "
+ "matches will be returned. A list of searchable SO term names can be accessed at "
+ "https://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/v4/hsapiens/feature/variation/consequence_types",
@ApiImplicitParam(name = "so", value = ParamConstants.SEQUENCE_ONTOLOGY,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "feature",
value = "Comma separated list of feature ids, which can be either ENSEMBL gene ids, HGNC gene symbols,"
+ " transcript symbols or ENSEMBL transcript ids, e.g.: BRCA2, ENST00000409047. Exact text"
+ " matches will be returned.",
@ApiImplicitParam(name = "feature", value = ParamConstants.FEATURE_IDS,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "trait",
value = "Keywords search. Comma separated (no spaces in between) list of keywords describing required"
+ " phenotype/disease. All variants related somehow with all those keywords (case insensitive) "
+ " will be returned, e.g: carcinoma,lung or acute,myeloid,leukaemia. WARNING: returned "
+ " numTotalResults will always be -1 when searching by trait keywords.",
@ApiImplicitParam(name = "trait", value = ParamConstants.TRAITS,
required = false, dataType = "String", paramType = "query"),
@ApiImplicitParam(name = "accession",
value = "Comma separated list of database accesions, e.g.: RCV000033215,COSM306824 Exact text "
+ "matches will be returned.",
@ApiImplicitParam(name = "accession", value = ParamConstants.VARIANT_ACCESSIONS,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "id",
value = "Comma separated list of ids, e.g.: rs6025 Exact text matches will be returned.",
@ApiImplicitParam(name = "id", value = ParamConstants.VARIANT_IDS,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "type",
value = "Comma separated list of variant types, e.g. \"SNV\" A list of searchable types can be accessed at "
+ "https://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/v4/hsapiens/clinical/variant/type",
@ApiImplicitParam(name = "type", value = ParamConstants.VARIANT_TYPES,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "consistencyStatus",
value = "Comma separated list of consistency labels. A list of searchable consistency labels can be accessed at "
+ "https://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/v4/hsapiens/clinical/variant/consistency_labels",
@ApiImplicitParam(name = "consistencyStatus", value = ParamConstants.CONSISTENCY_STATUS,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "clinicalSignificance",
value = "Comma separated list of clinical significance labels. A list of searchable clinical "
+ " significance labels can be accessed at "
+ "https://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/v4/hsapiens/clinical/variant/clinsig_labels"
+ " WARNING: returned numTotalResults will always be -1 if more than 1 label is provided.",
@ApiImplicitParam(name = "clinicalSignificance", value = ParamConstants.CLINICAL_SIGNFICANCE,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "modeInheritance",
value = "Comma separated list of mode of inheritance labels. A list of searchable mode of inheritance "
+ " labels can be accessed at "
+ "https://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/v4/hsapiens/clinical/variant"
+ "/mode_inheritance_labels",
@ApiImplicitParam(name = "modeInheritance", value = ParamConstants.MODE_INHERITANCE,
required = false, dataType = "java.util.List", paramType = "query"),
@ApiImplicitParam(name = "alleleOrigin",
value = "Comma separated list of allele origin labels. A list of searchable allele origin "
+ " labels can be accessed at "
+ "https://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/v4/hsapiens/clinical/variant/allele_origin_labels",
@ApiImplicitParam(name = "alleleOrigin", value = ParamConstants.ALLELE_ORIGIN,
required = false, dataType = "java.util.List", paramType = "query")
})
public Response getAll(@QueryParam("exclude")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,16 @@ public Response getChromosomes() {
@ApiOperation(httpMethod = "GET", value = "Retrieves chromosome data for specified chromosome names",
response = Chromosome.class, responseContainer = "QueryResponse")
public Response getChromosomes(@PathParam("chromosomeName")
@ApiParam(name = "chromosomeName", value = "Comma separated list of chromosome ids,"
+ " e.g.: 1,2,X,MT. Exact text matches will be returned.",
required = true) String chromosomeId) {
@ApiParam(name = "chromosomeName", value = ParamConstants.CHROMOSOMES,
required = true) String chromosomeId,
@QueryParam("exclude")
@ApiParam(value = ParamConstants.EXCLUDE_DESCRIPTION) String exclude,
@QueryParam("include")
@ApiParam(value = ParamConstants.INCLUDE_DESCRIPTION) String include,
@QueryParam("sort")
@ApiParam(value = ParamConstants.SORT_DESCRIPTION) String sort) {
try {
parseIncludesAndExcludes(exclude, include, sort);
parseQueryParams();
GenomeDBAdaptor dbAdaptor = dbAdaptorFactory.getGenomeDBAdaptor(this.species, this.assembly);
List<String> chromosomeList = Splitter.on(",").splitToList(chromosomeId);
Expand Down

0 comments on commit bae0083

Please sign in to comment.