Skip to content
Snippets Groups Projects
Commit 7c33f4d0 authored by Alexander Rose's avatar Alexander Rose
Browse files

updated rcsb assembly symmetry graphql schema

parent 9e8951da
Branches
Tags
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -44,18 +44,17 @@ function createDatabaseFromJson(assemblies: ReadonlyArray<AssemblySymmetryGraphQ ...@@ -44,18 +44,17 @@ function createDatabaseFromJson(assemblies: ReadonlyArray<AssemblySymmetryGraphQ
let id = 1 // start feature ids at 1 let id = 1 // start feature ids at 1
let clusterCount = 0 let clusterCount = 0
for (let i = 0, il = assemblies.length; i < il; ++i) { for (let i = 0, il = assemblies.length; i < il; ++i) {
const { pdbx_struct_assembly, rcsb_struct_symmetry, rcsb_struct_symmetry_provenance } = assemblies[i] const { pdbx_struct_assembly, rcsb_struct_symmetry } = assemblies[i]
if (!pdbx_struct_assembly || !rcsb_struct_symmetry ||!rcsb_struct_symmetry_provenance) continue if (!pdbx_struct_assembly || !rcsb_struct_symmetry) continue
const assembly_id = pdbx_struct_assembly.id const assembly_id = pdbx_struct_assembly.id
for (let j = 0, jl = rcsb_struct_symmetry.length; j < jl; ++j) { for (let j = 0, jl = rcsb_struct_symmetry.length; j < jl; ++j) {
const rss = rcsb_struct_symmetry[j]! // TODO upstream, array members should not be nullable const rss = rcsb_struct_symmetry[j]! // TODO upstream, array members should not be nullable
featureRows.push({ featureRows.push({
id, id,
assembly_id, assembly_id,
provenance: rcsb_struct_symmetry_provenance, type: rss.type as SymmetryType,
type: rss.type,
stoichiometry: rss.stoichiometry as string[], // TODO upstream, array members should not be nullable stoichiometry: rss.stoichiometry as string[], // TODO upstream, array members should not be nullable
kind: rss.kind, kind: rss.kind as SymmetryKind,
symbol: rss.symbol, symbol: rss.symbol,
oligomeric_state: rss.oligomeric_state oligomeric_state: rss.oligomeric_state
}) })
...@@ -181,6 +180,9 @@ export function AssemblySymmetry(db: AssemblySymmetry.Database): AssemblySymmetr ...@@ -181,6 +180,9 @@ export function AssemblySymmetry(db: AssemblySymmetry.Database): AssemblySymmetr
} }
} }
type SymmetryKind = 'GLOBAL' | 'LOCAL' | 'PSEUDO'
type SymmetryType = 'ASYMMETRIC' | 'CYCLIC' | 'DIHEDRAL' | 'HELICAL' | 'ICOSAHEDRAL' | 'OCTAHEDRAL' | 'TETRAHEDRAL'
const Client = new GraphQLClient(AssemblySymmetry.GraphQLEndpointURL, (url: string, type: 'string' | 'binary', body?: string) => ajaxGet({ url, type, body }) ) const Client = new GraphQLClient(AssemblySymmetry.GraphQLEndpointURL, (url: string, type: 'string' | 'binary', body?: string) => ajaxGet({ url, type, body }) )
export namespace AssemblySymmetry { export namespace AssemblySymmetry {
...@@ -200,10 +202,8 @@ export namespace AssemblySymmetry { ...@@ -200,10 +202,8 @@ export namespace AssemblySymmetry {
* The value 'deposited' refers to the coordinates as given in the file. * The value 'deposited' refers to the coordinates as given in the file.
* */ * */
assembly_id: str, assembly_id: str,
/** Name and version of software used to calculate assembly symmetry */
provenance: str,
/** Type of protein symmetry */ /** Type of protein symmetry */
kind: Aliased<'GLOBAL' | 'LOCAL' | 'PSEUDO'>(str), kind: Aliased<SymmetryKind>(str),
/** Quantitative description of every individual subunit in a given protein */ /** Quantitative description of every individual subunit in a given protein */
stoichiometry: List(',', x => x), stoichiometry: List(',', x => x),
/** /**
...@@ -212,7 +212,7 @@ export namespace AssemblySymmetry { ...@@ -212,7 +212,7 @@ export namespace AssemblySymmetry {
*/ */
symbol: str, symbol: str,
/** Point group or helical symmetry */ /** Point group or helical symmetry */
type: Aliased<'ASYMMETRIC' | 'CYCLIC' | 'DIHEDRAL' | 'HELICAL' | 'ICOSAHEDRAL' | 'OCTAHEDRAL' | 'TETRAHEDRAL'>(str), type: Aliased<SymmetryType>(str),
/** /**
* Oligomeric state refers to a composition of subunits in quaternary structure. * Oligomeric state refers to a composition of subunits in quaternary structure.
* Quaternary structure may be composed either exclusively of several copies of identical * Quaternary structure may be composed either exclusively of several copies of identical
......
...@@ -26,6 +26,5 @@ gql`query AssemblySymmetry($pdbId: String!) { ...@@ -26,6 +26,5 @@ gql`query AssemblySymmetry($pdbId: String!) {
symbol symbol
type type
} }
rcsb_struct_symmetry_provenance
} }
}` }`
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment