The following query from the GDS documentation shows how to create a GDS projection via Cypher:
MATCH (source) OPTIONAL MATCH (source)-[r:READ]->(target)
WHERE r.numberOfPages IS NOT NULL
WITH gds.graph.project('existingNumberOfPages', source, target, { relationshipProperties: r { .numberOfPages } }) AS g
RETURN
g.graphName AS graph, g.nodeCount AS nodes, g.relationshipCount AS rels
This is my code and i want to create a customized projection:
MATCH (n)-[r]-(m)
WHERE type(r) IN [
'Environment_related_eQTL',
'GO term\'s relationshipbiological_process',
'GO term\'s relationshipcellular_component',
'GO term\'s relationshipmolecular_function',
'Gene and GO\'s biological_process term relationship',
'Gene and GO\'s cellular_component term relationship',
'Gene and GO\'s molecular_function term relationship',
'Genes_regulated_by_methylation',
'Phenotypes_affected_by_snp',
'SNP_belongTo_Gene',
'TF_regulates',
'TranseQTL_belongTo_Gene',
'TranseQTL_to_gene',
'ciseQTL_belongTo_Gene',
'ciseQTL_influence_Gene',
'environmenteqtl_id_on',
'gene_to_TFfamily',
'subaloaction',
'Gene_Phenotypes_affected_by_Gene_from_twas_araPhenotype'
]
WITH COLLECT(DISTINCT id(n)) + COLLECT(DISTINCT id(m)) AS allNodeIDs
MATCH (source)-[r]->(target) WHERE id(source) IN allNodeIDs AND id(target) IN allNodeIDs AND type(r) IN [
'Environment_related_eQTL',
'GO term\'s relationshipbiological_process',
'GO term\'s relationshipcellular_component',
'GO term\'s relationshipmolecular_function',
'Gene and GO\'s biological_process term relationship',
'Gene and GO\'s cellular_component term relationship',
'Gene and GO\'s molecular_function term relationship',
'Genes_regulated_by_methylation',
'Phenotypes_affected_by_snp',
'SNP_belongTo_Gene',
'TF_regulates',
'TranseQTL_belongTo_Gene',
'TranseQTL_to_gene',
'ciseQTL_belongTo_Gene',
'ciseQTL_influence_Gene',
'environmenteqtl_id_on',
'gene_to_TFfamily',
'subaloaction',
'Gene_Phenotypes_affected_by_Gene_from_twas_araPhenotype',
'PPI',
'TF_regulates'
]
WITH gds.graph.project(
'graphdealj',
source,
target,
{
sourceNodeLabels: labels(source),
targetNodeLabels: labels(target),
relationshipType: type(r)
}
) AS g
RETURN g.graphName AS graph, g.nodeCount AS nodes, g.relationshipCount AS rels
But I get this error:
Unknown function 'gds.graph.project' (line 47, column 6 (offset: 1700))
" 'TF_regulates'"
^
I am absolutely certain that I have installed GDS, as I'm able to successfully execute other methods of projection and various algorithms. Also, the part of the query before the final GDS section executes without any issues:
I tried adding a call
after with
, but it didn't work, but I can guarantee that the code is executed normally before the last with
. You can see that the picture has output