Skip to content

Commit

Permalink
Added Stats node placeholder - Changes versioning
Browse files Browse the repository at this point in the history
Added a new node as a placeholder to record the knowledge graph's general statistics at the time of creation.
  • Loading branch information
holegar committed Sep 16, 2024
1 parent 9debdf4 commit 939dc3d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion rres-endpoints/config/datasets/plants-lite-58-cfg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ oxl_home="$KNET_HOME/etl-test/plants-lite/$KETL_DATASET_VERSION"

export KETL_SRC_OXL="$oxl_home/generic/knowledge-network.oxl"

export KETL_OUT="$KETL_OUT_HOME/$KETL_DATASET_ID/$KETL_DATASET_VERSION"
# Sam 20240909 - New versioning convention
export KETL_OUT="$KETL_OUT_HOME/$KETL_DATASET_ID/v$KETL_DATASET_VERSION-RC1"


## Neo 
#
Expand Down
2 changes: 1 addition & 1 deletion rres-endpoints/config/default-cfg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export KETL_NEOEXPORT_HOME=''
# ===> Override this in config/datasets/name-ver.sh, so that we can keep track
# of the version that was used for a given dataset
#
export KETL_NEO_VERSION='5.16.0'
export KETL_NEO_VERSION='5.20.0'

# The KnetMiner codebase
export KNET_WEBAPP=''
Expand Down
12 changes: 11 additions & 1 deletion rres-endpoints/endpoint-steps/neo-index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ printf "\n\n Creating Neo indexing (full-text and semantic motifs)\n\n"
"$KNET_INITIALIZER_HOME/knet-init.sh" \
-c "$knet_cfg/config/config-etl.yml" --neo-index=config:// --neo-motifs --in "$oxl_src"

# Sam 2024/09/13: Run the Cypher query to generate stats node in Neo4j
printf "\nRunning Cypher query to generate stats node in Neo4j\n"

echo -e "\nAll Neo4j indexing done\n"
export PATH=$PATH:$KNET_SOFTWARE/neo4j-community-5.20.0-etl/bin

query="MATCH (g:Gene)
WITH count(g) AS geneCount
CREATE (s:Stats { Stats: '{\"geneCount\": ' + geneCount + '}' })"

cypher-shell -u "$KETL_NEO_USR" -p "$KETL_NEO_PWD" --format plain "$query"

echo -e "\nAll Neo4j indexing and stats generation done\n"
echo `date` >"$out_flag"

0 comments on commit 939dc3d

Please sign in to comment.