Skip to content

Commit

Permalink
test: exclude pharmacogenomics from queries after merging pharmagenom…
Browse files Browse the repository at this point in the history
…ics task (it is not yet supported in cellbase dataset test), #TASK-4225
  • Loading branch information
jtarraga committed Jul 13, 2023
1 parent a609fb8 commit 16c88d6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ public void testCount() throws QueryException {
}

@Test
public void testValidate() throws QueryException, NoSuchFieldException, IllegalAccessException {
public void testValidate() throws QueryException {
paramMap.put("id", "1");
paramMap.put("name", "42");
paramMap.put("biotype", "a,b,c");
paramMap.put("annotation.drugs.gene", "x,y");
paramMap.put("annotation.drugs.drugName", "x,y");

paramMap.put("limit", "11");
paramMap.put("skip", "-1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1943,9 +1943,12 @@ private void sortProteinFeatureList(Collection<ConsequenceType> consequenceTypeS

@Test
public void testLicensedDataUnisersalTokenAnnotation() throws Exception {
QueryOptions queryOptions = new QueryOptions("useCache", false);
queryOptions.put("exclude", "pharmacogenomics");
queryOptions.put("normalize", true);

variantAnnotationCalculator.setToken(UNIVERSAL_ACDES_TOKEN);

QueryOptions queryOptions = new QueryOptions("useCache", false);
Variant variant = new Variant("10", 113588287, "G", "A");
CellBaseDataResult<VariantAnnotation> cellBaseDataResult = variantAnnotationCalculator
.getAnnotationByVariant(variant, queryOptions);
Expand All @@ -1967,9 +1970,12 @@ public void testLicensedDataUnisersalTokenAnnotation() throws Exception {

@Test
public void testLicensedDataHgmdTokenAnnotation() throws Exception {
QueryOptions queryOptions = new QueryOptions("useCache", false);
queryOptions.put("exclude", "pharmacogenomics");
queryOptions.put("normalize", true);

variantAnnotationCalculator.setToken(HGMD_ACCESS_TOKEN);

QueryOptions queryOptions = new QueryOptions("useCache", false);
Variant variant = new Variant("10", 113588287, "G", "A");
CellBaseDataResult<VariantAnnotation> cellBaseDataResult = variantAnnotationCalculator
.getAnnotationByVariant(variant, queryOptions);
Expand All @@ -1991,9 +1997,12 @@ public void testLicensedDataHgmdTokenAnnotation() throws Exception {

@Test
public void testLicensedDataCosmicTokenAnnotation() throws Exception {
QueryOptions queryOptions = new QueryOptions("useCache", false);
queryOptions.put("exclude", "pharmacogenomics");
queryOptions.put("normalize", true);

variantAnnotationCalculator.setToken(COSMIC_ACCESS_TOKEN);

QueryOptions queryOptions = new QueryOptions("useCache", false);
Variant variant = new Variant("10", 113588287, "G", "A");
CellBaseDataResult<VariantAnnotation> cellBaseDataResult = variantAnnotationCalculator
.getAnnotationByVariant(variant, queryOptions);
Expand All @@ -2015,9 +2024,12 @@ public void testLicensedDataCosmicTokenAnnotation() throws Exception {

@Test
public void testLicensedDataSpliceTokenAnnotation() throws Exception {
QueryOptions queryOptions = new QueryOptions("useCache", false);
queryOptions.put("exclude", "pharmacogenomics");
queryOptions.put("normalize", true);

variantAnnotationCalculator.setToken(SPLICEAI_ACCESS_TOKEN);

QueryOptions queryOptions = new QueryOptions("useCache", false);
Variant variant = new Variant("10", 113588287, "G", "A");
CellBaseDataResult<VariantAnnotation> cellBaseDataResult = variantAnnotationCalculator
.getAnnotationByVariant(variant, queryOptions);
Expand All @@ -2039,9 +2051,12 @@ public void testLicensedDataSpliceTokenAnnotation() throws Exception {

@Test
public void testLicensedDataHgmdCosmicTokenAnnotation() throws Exception {
QueryOptions queryOptions = new QueryOptions("useCache", false);
queryOptions.put("exclude", "pharmacogenomics");
queryOptions.put("normalize", true);

variantAnnotationCalculator.setToken(HGMD_COSMIC_ACCESS_TOKEN);

QueryOptions queryOptions = new QueryOptions("useCache", false);
Variant variant = new Variant("10", 113588287, "G", "A");
CellBaseDataResult<VariantAnnotation> cellBaseDataResult = variantAnnotationCalculator
.getAnnotationByVariant(variant, queryOptions);
Expand All @@ -2063,9 +2078,12 @@ public void testLicensedDataHgmdCosmicTokenAnnotation() throws Exception {

@Test
public void testLicensedDataHgmdSpliceAiTokenAnnotation() throws Exception {
QueryOptions queryOptions = new QueryOptions("useCache", false);
queryOptions.put("exclude", "pharmacogenomics");
queryOptions.put("normalize", true);

variantAnnotationCalculator.setToken(HGMD_SPLICEAI_ACCESS_TOKEN);

QueryOptions queryOptions = new QueryOptions("useCache", false);
Variant variant = new Variant("10", 113588287, "G", "A");
CellBaseDataResult<VariantAnnotation> cellBaseDataResult = variantAnnotationCalculator
.getAnnotationByVariant(variant, queryOptions);
Expand All @@ -2087,9 +2105,12 @@ public void testLicensedDataHgmdSpliceAiTokenAnnotation() throws Exception {

@Test
public void testLicensedDataCosmicSpliceTokenAnnotation() throws Exception {
QueryOptions queryOptions = new QueryOptions("useCache", false);
queryOptions.put("exclude", "pharmacogenomics");
queryOptions.put("normalize", true);

variantAnnotationCalculator.setToken(COSMIC_SPLICEAI_ACCESS_TOKEN);

QueryOptions queryOptions = new QueryOptions("useCache", false);
Variant variant = new Variant("10", 113588287, "G", "A");
CellBaseDataResult<VariantAnnotation> cellBaseDataResult = variantAnnotationCalculator
.getAnnotationByVariant(variant, queryOptions);
Expand Down

0 comments on commit 16c88d6

Please sign in to comment.