@rcsb/rcsb-saguaro-app 4.0.0-interfaces.8 → 4.0.0-interfaces.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -12,6 +12,7 @@
12
12
  - New callback attribute `InstanceSequenceConfig` > `beforeChangeCallback`. This function is called when instance
13
13
  dropdown menu changes and before rendering the new 1D RcsbFv.
14
14
  The callback may return a `RcsbContextType` object that will be included in the `additionalConfig`
15
+ - Added two new classes (`AssemblyInterfacesCollector` and `AssemblyInterfacesTranslate`) to collect and handle assembly and interface id relationships
15
16
 
16
17
  ## [4.0.0-master] - 2021-12-07
17
18
  ### Breaking change
package/README.md CHANGED
@@ -49,7 +49,7 @@ click events.
49
49
  - **RcsbFvWebApp.setBoardConfig**(boardConfigData: [RcsbFvBoardConfigInterface](https://rcsb.github.io/rcsb-saguaro/interfaces/rcsbfvboardconfiginterface.html))
50
50
  - **RcsbFvWebApp.getRcsbFv**(elementId: string)
51
51
 
52
- ###GraphQL configuration
52
+ ### GraphQL configuration
53
53
  ##### Building TypeScript interfaces
54
54
  - Files ["src/RcsbServerConfig/codegen.borrego.json", "src/RcsbServerConfig/codegen.yosemite.json"]
55
55
  - Borrego Interfaces: graphql-codegen --config src/RcsbServerConfig/codegen.borrego.json
@@ -59,6 +59,20 @@ click events.
59
59
  - Config Files: ["src/RcsbGraphQL/Queries/Borrego/.graphqlconfig", "src/RcsbGraphQL/Queries/Yosemite/.graphqlconfig"]
60
60
  - Generated Schemas: ["src/RcsbGraphQL/Queries/Borrego/schema.graphql", "src/RcsbGraphQL/Queries/Yosemite/schema.graphql"]
61
61
 
62
+ ### New RCSB data-api request method
63
+ - A new graphql query defined in `src/RcsbGraphQL/Queries/Yosemite` (e.g. `QueryAssemblyInterfaces.graphql`)
64
+ - A new request class using `rcsb-api-tools` defined in `src/RcsbGraphQL` (e.g. `RcsbQueryAssemblyInterfaces.ts`)
65
+ - A new method in the `RcsbClient` class defined in `src/RcsbGraphQL/RcsbClient.ts` (e.g. `requestAssemblyInterfaces`)
66
+ - This method must used the request class defined above
67
+ - A new collector class based on the request class in `src/RcsbCollectTools/Translators` (e.g. `AssemblyInterfacesCollector`)
68
+ - This class must call the method defined above
69
+ - This class may transform the RCSB data-api schema into a more convenient interface
70
+ - A new translator class defined in `src/RcsbUtils` (e.g. `AssemblyInterfacesTranslate`)
71
+ - The constructor gets the data collected by the above class
72
+ - The class exposes the methods needs to provide the relationships between RCSB objects of different granularity
73
+ - A new method in the `RcsbFvContextManager` defined in `src/RcsbFvWeb/RcsbFvBuilder`
74
+ - This method must avoid duplicate requests
75
+
62
76
  Contributing
63
77
  ---
64
78
  All contributions are welcome. Please, make a pull request or open an issue.
@@ -21,7 +21,7 @@ export declare class RcsbAnnotationConfig {
21
21
  uniprotOrder(): Array<string>;
22
22
  instanceOrder(): Array<string>;
23
23
  entityOrder(): Array<string>;
24
- buildAndAddType(d: Feature, mainTitle?: string, titleSuffix?: string, typeSuffix?: string): string;
24
+ buildAndAddType(d: Feature, trackTitle?: string, titleSuffix?: string, typeSuffix?: string): string;
25
25
  private addNewType;
26
26
  sortAndIncludeNewTypes(): void;
27
27
  private checkAndIncludeNewType;
@@ -12,8 +12,8 @@ export declare class AnnotationTrackManager {
12
12
  getAnnotationTracks(): Map<string, AnnotationTrack>;
13
13
  private getPolymerEntityInstanceTranslator;
14
14
  setPolymerEntityInstanceTranslator(p: PolymerEntityInstanceTranslate): void;
15
- private mergeTracks;
16
- private buildType;
17
15
  private addAnnotationToTracks;
18
16
  private addFeature;
17
+ private buildType;
18
+ private mergeTracks;
19
19
  }
@@ -0,0 +1,9 @@
1
+ import { QueryAssembliesArgs } from "@rcsb/rcsb-api-tools/build/RcsbGraphQL/Types/Yosemite/GqlTypes";
2
+ export interface AssemblyInterfacesInterface {
3
+ rcsbId: string;
4
+ interfaceIds: Array<string>;
5
+ }
6
+ export declare class AssemblyInterfacesCollector {
7
+ private readonly rcsbFvQuery;
8
+ collect(requestConfig: QueryAssembliesArgs): Promise<Array<AssemblyInterfacesInterface>>;
9
+ }
@@ -9,6 +9,7 @@ declare class RcsbFvContextManager {
9
9
  private polymerEntityToInstanceMap;
10
10
  private entryToAssemblyMap;
11
11
  private interfaceToInstanceMap;
12
+ private assemblyInterfacesMap;
12
13
  getFv(elementFvId: string, boardConfig?: Partial<RcsbFvBoardConfigInterface>): RcsbFv;
13
14
  hasFv(elementFvId: string): boolean;
14
15
  private setFv;
@@ -21,6 +22,7 @@ declare class RcsbFvContextManager {
21
22
  getEntryToAssembly(entryId: string): Promise<EntryAssemblyTranslate>;
22
23
  getEntityToChromosome(entityIds: Array<string>): Promise<PolymerEntityChromosomeTranslate>;
23
24
  getInterfaceToInstance(interfaceId: string): Promise<InterfaceInstanceTranslate>;
25
+ private getAssemblyInterfaces;
24
26
  }
25
27
  export declare const rcsbFvCtxManager: RcsbFvContextManager;
26
28
  export {};
@@ -1,5 +1,5 @@
1
1
  import { AlignmentResponse, AnnotationFeatures, QueryAlignmentArgs, QueryAnnotationsArgs } from "@rcsb/rcsb-api-tools/build/RcsbGraphQL/Types/Borrego/GqlTypes";
2
- import { CoreEntry, CoreInterface, CorePolymerEntity, QueryEntriesArgs, QueryEntryArgs, QueryInterfacesArgs, QueryPolymer_EntitiesArgs } from "@rcsb/rcsb-api-tools/build/RcsbGraphQL/Types/Yosemite/GqlTypes";
2
+ import { CoreAssembly, CoreEntry, CoreInterface, CorePolymerEntity, QueryAssembliesArgs, QueryEntriesArgs, QueryEntryArgs, QueryInterfacesArgs, QueryPolymer_EntitiesArgs } from "@rcsb/rcsb-api-tools/build/RcsbGraphQL/Types/Yosemite/GqlTypes";
3
3
  export declare class RcsbClient {
4
4
  private rcsbQueryAnnotations;
5
5
  private rcsbQueryAlignment;
@@ -7,10 +7,12 @@ export declare class RcsbClient {
7
7
  private rcsbQueryMutipleEntityInstances;
8
8
  private rcsbQueryEntryProperties;
9
9
  private rcsbQueryInterfaceInstances;
10
+ private rcsbQueryAssemblyInterfaces;
10
11
  requestRcsbPdbAnnotations(requestConfig: QueryAnnotationsArgs): Promise<Array<AnnotationFeatures>>;
11
12
  requestAlignment(requestConfig: QueryAlignmentArgs): Promise<AlignmentResponse>;
12
13
  requestEntityInstances(requestConfig: QueryEntryArgs): Promise<CoreEntry>;
13
14
  requestMultipleEntityInstances(requestConfig: QueryPolymer_EntitiesArgs): Promise<Array<CorePolymerEntity>>;
14
15
  requestMultipleEntriesProperties(requestConfig: QueryEntriesArgs): Promise<Array<CoreEntry>>;
15
16
  requestInterfaceInstances(requestConfig: QueryInterfacesArgs): Promise<Array<CoreInterface>>;
17
+ requestAssemblyInterfaces(requestConfig: QueryAssembliesArgs): Promise<Array<CoreAssembly>>;
16
18
  }
@@ -0,0 +1,7 @@
1
+ import { RcsbCoreQueryInterface } from "./RcsbCoreQueryInterface";
2
+ import { CoreAssembly, QueryAssembliesArgs } from "@rcsb/rcsb-api-tools/build/RcsbGraphQL/Types/Yosemite/GqlTypes";
3
+ import { GraphQLRequest } from "@rcsb/rcsb-api-tools/build/RcsbGraphQL/GraphQLRequest";
4
+ export declare class RcsbQueryAssemblyInterfaces implements RcsbCoreQueryInterface<QueryAssembliesArgs, Array<CoreAssembly>> {
5
+ readonly client: GraphQLRequest;
6
+ request(requestConfig: QueryAssembliesArgs): Promise<Array<CoreAssembly>>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { AssemblyInterfacesInterface } from "../RcsbCollectTools/Translators/AssemblyInterfacesCollector";
2
+ export declare class AssemblyInterfacesTranslate {
3
+ private readonly rawData;
4
+ private interfaceMap;
5
+ constructor(data: Array<AssemblyInterfacesInterface>);
6
+ getInterfaces(assemblyId: string): Array<string>;
7
+ }
@@ -4,4 +4,5 @@ export declare class TagDelimiter {
4
4
  static readonly sequenceTitle: string;
5
5
  static readonly alignmentTitle: string;
6
6
  static readonly operatorComposition: string;
7
+ static readonly assembly: string;
7
8
  }