Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • metribo/snoboard-server
1 result
Show changes
Commits on Source (8)
......@@ -19,7 +19,6 @@ x-api: &api
npm_config_cache: /app/.npm
NEO4J_PORT: 7687
env_file: *authfile
command: "npm start"
services:
......@@ -37,6 +36,7 @@ services:
- "4000:4000"
profiles:
- prod
command: "npm start"
api-dev:
<<: *api
......@@ -50,9 +50,11 @@ services:
- "4000"
ports:
- "4000:4000"
- "9229:9229"
profiles:
- api-standalone
- dev
command: "npm run debug"
server-install:
<<: *api
......
This diff is collapsed.
......@@ -5,7 +5,8 @@
"main": "server/index.js",
"type": "module",
"scripts": {
"start": "nodemon --watch './server'"
"start": "nodemon --watch './server'",
"debug": "nodemon --inspect=0.0.0.0 --watch './server'"
},
"license": "AGPL-version-3.0",
"private": false,
......@@ -27,19 +28,20 @@
},
"contributors": [],
"dependencies": {
"@apollo/server": "^4.10.0",
"@graphql-tools/graphql-file-loader": "^8.0.1",
"@graphql-tools/load": "^8.0.1",
"@neo4j/graphql": "^5.4.4",
"express": "^4.18.2",
"graphql": "^16.8.1",
"@apollo/server": "^4.11.3",
"@graphql-tools/graphql-file-loader": "^8.0.14",
"@graphql-tools/load": "^8.0.14",
"@neo4j/graphql": "^5.11.5",
"@neo4j/graphql-ogm": "^5.11.5",
"express": "^4.21.2",
"graphql": "^16.10.0",
"graphql-tag": "^2.12.6",
"neo4j-driver": "^5.18.0",
"nodemon": "^3.0.3"
"neo4j-driver": "^5.28.1",
"nodemon": "^3.1.9"
},
"devDependencies": {
"@graphql-eslint/eslint-plugin": "^3.20.1",
"@graphql-tools/mock": "^9.0.1",
"@graphql-tools/schema": "^10.0.2"
"@graphql-eslint/eslint-plugin": "^4.3.0",
"@graphql-tools/mock": "^9.0.17",
"@graphql-tools/schema": "^10.0.18"
}
}
......@@ -3,7 +3,7 @@ import { resolvers as documentsResolver } from './resolvers/documents.js'
const resolvers = [
guideClassLabelResolver,
documentsResolver
documentsResolver,
]
export default resolvers
\ No newline at end of file
......@@ -13,6 +13,10 @@ import { typeDefs as genericSequenceDefs } from './schema/generic_sequence.js'
import { typeDefs as groupDefs } from './schema/guide_group.js'
import { typeDefs as clusterDefs } from './schema/cluster.js'
import { typeDefs as isoformDefs } from './schema/isoform.js'
import { typeDefs as modificationMappingDefs } from './schema/modification_mapping.js'
import { typeDefs as trackDefs } from './schema/track.js'
import { typeDefs as alignmentDefs } from './schema/alignment.js'
import { typeDefs as alignedModificationsDefs } from './schema/aligned_modifications.js'
import { typeDefs as entryDefs } from './schema/table_entry.js'
import { typeDefs as documentsDefs } from './schema/documents.js'
......@@ -36,6 +40,10 @@ const typeDefs = [
groupDefs,
clusterDefs,
isoformDefs,
modificationMappingDefs,
alignedModificationsDefs,
trackDefs,
alignmentDefs,
documentsDefs,
schemaDef
]
......
import { gql } from 'graphql-tag'
export const typeDefs = gql`
"""
A group of aligned modifications
"""
type AlignedModifications {
"The group id"
id: ID!
"The guides that are part of group"
modifications: [Modification!]! @relationship(type: "IS_PART_OF", direction: IN)
}
`
\ No newline at end of file
import { gql } from 'graphql-tag'
export const typeDefs = gql`
type Alignment {
"The alignment id"
id: ID!
"The name of the alignment (Optional)"
name: String
"The description of the alignment (Optional)"
description: String
"The sequences that are part of alignment"
sequences: [Sequence!]!
"A track is a sequence of something (including sequences)"
tracks: [Track!]! @relationship(type: "ALIGN_WITH", direction: IN)
"The type of alignment, either GUIDE or TARGET"
type: AlignType
}
enum AlignType {
"Alignment is about guides"
GUIDE
"Alignment is about targets"
TARGET
"Alignment is about something else"
OTHER
}
`
\ No newline at end of file
......@@ -14,6 +14,9 @@ type Chromosome implements Sequence @node(labels: ["Sequence", "Chromosome"]) {
"ALternative chromosome names"
altnames: [String!]
"Fasta id if any"
fasta_id: String
"""The chromosome description (i.e. the comment part in fasta file)"""
description: String
......@@ -49,5 +52,8 @@ type Chromosome implements Sequence @node(labels: ["Sequence", "Chromosome"]) {
"The type of GraphQL object"
graphql_type: GraphQLType!
"Tracks the sequence is part of"
tracks: [Track!]! @relationship(type: "HAS_REFERENCE", direction: IN)
}
`
\ No newline at end of file
......@@ -16,6 +16,9 @@ type GenericSequence implements Sequence @node(labels: ["Sequence", "GenericSequ
"""The sequence description (i.e. the comment part in fasta file)"""
description: String
"Fasta id if any"
fasta_id: String
"""The type of the sequence (DNA or RNA)"""
type: SequenceType!
......@@ -52,5 +55,8 @@ type GenericSequence implements Sequence @node(labels: ["Sequence", "GenericSequ
"The parent sequence if any"
parent: Sequence @relationship(type: "HAS_FEATURE", direction: IN, properties: "HasFeature")
"Tracks the sequence is part of"
tracks: [Track!]! @relationship(type: "HAS_REFERENCE", direction: IN)
}
`
......@@ -13,6 +13,9 @@ type Guide implements Sequence @node(labels: ["Sequence", "Guide"]) {
"Alternative guide names"
altnames: [String!]
"Fasta id if any"
fasta_id: String
"Guide description"
description: String
......@@ -58,7 +61,7 @@ type Guide implements Sequence @node(labels: ["Sequence", "Guide"]) {
"The type of GraphQL object"
graphql_type: GraphQLType!
"""The modifications guided by the guide"""
modifications: [Modification!]! @relationship(type: "GUIDE", direction: OUT)
......@@ -76,6 +79,9 @@ type Guide implements Sequence @node(labels: ["Sequence", "Guide"]) {
"Table entries associated to the guide"
entries: [TableEntry!]! @relationship(type: "IS_PART_OF", direction: OUT, aggregate: false) @selectable(onRead: true, onAggregate: false)
"Tracks the sequence is part of"
tracks: [Track!]! @relationship(type: "HAS_REFERENCE", direction: IN)
}
"""
......@@ -91,6 +97,9 @@ enum GuideClass {
"ScaRNA"
ScaRNA
"Protein"
PROT
"Other"
Other
}
......
......@@ -39,11 +39,15 @@ type Modification {
"Short label of modification type formatted with markdown syntax"
type_short_label: String
"Interactions that cause the modification"
"Interactions that position the modification"
interactions: [Interaction!]! @relationship(type: "CAUSE", direction: IN)
"Table entries associated to the modification"
entries: [TableEntry!]! @relationship(type: "IS_PART_OF", direction: OUT, aggregate: false) @selectable(onRead: true, onAggregate: false)
"Aligned Modification Group"
align_groups: [AlignedModifications!]! @relationship(type: "IS_PART_OF", direction: OUT)
}
"""
......
import { gql } from 'graphql-tag'
export const typeDefs = gql`
type ModificationMapping @relationshipProperties {
"The position corrected for the alignement"
position: Int!
}
`
......@@ -14,6 +14,9 @@ interface Sequence {
"ALternative sequence names"
altnames: [String!]
"Fasta id if any"
fasta_id: String
"""The sequence description (i.e. the comment part in fasta file)"""
description: String
......@@ -44,12 +47,12 @@ interface Sequence {
"The reference genome the sequence comes from"
genome: Genome @declareRelationship
#"The other genome in which the sequence exists"
#genomes: [Genome!] @declareRelationship
"The features associated with the sequence"
features: [Sequence!]! @declareRelationship
"Tracks the sequence is part of"
tracks: [Track!]! @declareRelationship
"The type of GraphQL object"
graphql_type: GraphQLType!
}
......
......@@ -13,6 +13,9 @@ type Target implements Sequence @node(labels: ["Sequence", "Target"]) {
"ALternative guide names"
altnames: [String!]
"Fasta id if any"
fasta_id: String
"Family (e.g. 16S, 18S, U2, ...)"
family: String
......@@ -62,6 +65,9 @@ type Target implements Sequence @node(labels: ["Sequence", "Target"]) {
"The type of GraphQL object"
graphql_type: GraphQLType!
"True if current sequence is a reference sequence"
is_ref: Boolean!
"The target is a feature from parent"
parent: Sequence @relationship(type: "HAS_FEATURE", direction: IN, properties: "HasFeature")
......@@ -74,5 +80,7 @@ type Target implements Sequence @node(labels: ["Sequence", "Target"]) {
"Table entries associated to the guide"
entries: [TableEntry!]! @relationship(type: "IS_PART_OF", direction: OUT, aggregate: false) @selectable(onRead: true, onAggregate: false)
"Tracks the sequence is part of"
tracks: [Track!]! @relationship(type: "HAS_REFERENCE", direction: IN)
}
`
\ No newline at end of file
import { gql } from 'graphql-tag'
export const typeDefs = gql`
interface Track {
"The track ID"
id: ID!
"The track name"
name: String
"The track short name"
shortname: String
"The sequence"
content: String !
"The sequence the track is associated to"
ref: Sequence! @declareRelationship
"The alignment the track is part of"
alignment: Alignment @declareRelationship
"Other tracks associated/coupled/grouped with the current track"
links: [Track!]!
}
"""
Tracks encoding the RNA sequence adjusted to alignment by including some aditional '-' and correcting the modification position
"""
type SequenceTrack implements Track {
"The track ID"
id: ID!
"The track name"
name: String
"The track short name"
shortname: String
"The sequence"
content: String !
"The sequence the track is associated to"
ref: Sequence! @relationship(type: "HAS_REFERENCE", direction: OUT)
"The alignment the track is part of"
alignment: Alignment @relationship(type: "ALIGN_WITH", direction: OUT)
"Other tracks associated/coupled/grouped with the current track"
links: [Track!]!
"The modifications which position are adjusted to current Alignement"
aligned_modifications: [Modification!]! @relationship(type: "HAS_ALIGNED_MODIFICATION", direction: OUT, properties: "ModificationMapping")
}
"""
Tracks encoding the structure of the RNA sequence with parenthesis and dots chars
"""
type StructureTrack implements Track {
"The track ID"
id: ID!
"The track name"
name: String
"The track short name"
shortname: String
"The sequence"
content: String !
"The sequence the track is associated to"
ref: Sequence! @relationship(type: "HAS_REFERENCE", direction: OUT)
"The alignment the track is part of"
alignment: Alignment @relationship(type: "ALIGN_WITH", direction: OUT)
"Other tracks associated with the current track"
links: [Track!]!
}
`