Skip to content

Commit

Permalink
SingleFacets cyclic dependency bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
bioinsilico committed Nov 29, 2023
1 parent 8f65b70 commit 733a6f7
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 24 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

[Semantic Versioning](https://semver.org/)

## [6.0.3] - 2023-11-28
### Bug fix
- `SingleFacets` cyclic dependency bug fixed

## [6.0.2] - 2023-11-28
### Improvement
- `FacetMemberInterface.facetConfig` interface attribute to encode histogram data transformations and other configuration
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rcsb/rcsb-saguaro-app",
"version": "6.0.2",
"version": "6.0.3",
"description": "RCSB 1D Saguaro Web App",
"main": "build/app.js",
"files": [
Expand Down
39 changes: 19 additions & 20 deletions src/RcsbSeacrh/FacetStore/SingleFacets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import {ChartType} from "@rcsb/rcsb-charts/lib/RcsbChartComponent/ChartConfigInt
import {ChartDataValueInterface} from "@rcsb/rcsb-charts/lib/RcsbChartDataProvider/ChartDataProviderInterface";
import {GroupChartMap} from "../../RcsbGroupWeb/RcsbGroupView/RcsbGroupChart/GroupChartTools";
import {BucketDataType} from "@rcsb/rcsb-search-tools/lib/SearchParseTools/SearchFacetInterface";
import {SearchQueryTools as SQT} from "../SearchQueryTools";

import {buildAttributeQuery} from "@rcsb/rcsb-search-tools/lib/SearchQueryTools/SearchQueryTools";

export const EXPERIMENTAL_METHOD_FACET: FacetMemberInterface = {
id: "method",
Expand Down Expand Up @@ -122,26 +121,26 @@ export const CHIMERIC_FACET: FacetMemberInterface = {
},
bucketClickSearchQuery: (datum, data, e) => {
if(datum.x == "Wild Type")
return SQT.searchAttributeQuery(
CHIMERIC_FACET.attribute,
1,
Operator.Equals,
Service.Text
);
return buildAttributeQuery({
attribute: CHIMERIC_FACET.attribute,
value: 1,
operator: Operator.Equals,
service: Service.Text
});
else if(datum.x == "Synthetic")
return SQT.searchAttributeQuery(
CHIMERIC_FACET.attribute,
0,
Operator.Equals,
Service.Text
);
return buildAttributeQuery({
attribute: CHIMERIC_FACET.attribute,
value: 0,
operator: Operator.Equals,
service: Service.Text
});
else
return SQT.searchAttributeQuery(
CHIMERIC_FACET.attribute,
1,
Operator.Greater,
Service.Text
);
return buildAttributeQuery({
attribute: CHIMERIC_FACET.attribute,
value: 1,
operator: Operator.Greater,
service: Service.Text
});
}
},
facet: {
Expand Down
7 changes: 4 additions & 3 deletions src/RcsbSeacrh/SearchQueryTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ import {
import {FacetStoreInterface} from "./FacetStore/FacetStoreInterface";
import {cloneDeep} from 'lodash';
import {GroupProvenanceId} from "@rcsb/rcsb-api-tools/build/RcsbDw/Types/DwEnums";
import {depositionGroupFacetStore} from "./FacetStore/DepositionGroupFacetStore";
import {sequenceGroupFacetStore} from "./FacetStore/SequenceGroupFacetStore";
import {uniprotGroupFacetStore} from "./FacetStore/UniprotGroupFacetStore";
import {SearchQueryType} from "@rcsb/rcsb-search-tools/lib/SearchQueryTools/SearchQueryInterfaces";
import {
buildAttributeQuery,
buildRequestFromCombinedSearchQuery, buildRequestFromSearchQuery
} from "@rcsb/rcsb-search-tools/lib/SearchQueryTools/SearchQueryTools";

import {depositionGroupFacetStore} from "./FacetStore/DepositionGroupFacetStore";
import {sequenceGroupFacetStore} from "./FacetStore/SequenceGroupFacetStore";
import {uniprotGroupFacetStore} from "./FacetStore/UniprotGroupFacetStore";

export namespace SearchQueryTools {

export function searchGroupQuery(groupProvenance: GroupProvenanceId, groupId: string, service?: Service.Text | Service.TextChem): SearchQueryType {
Expand Down

0 comments on commit 733a6f7

Please sign in to comment.