Skip to content
This repository was archived by the owner on Jun 18, 2022. It is now read-only.

Commit dea555f

Browse files
committed
Merge branch 'master' of github.com:NETESOLUTIONS/ERNIE
2 parents c62d122 + 7b5cf65 commit dea555f

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

Analysis/affymetrix/garfield_import_dmet_twog.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
-- Script to generate csv files for import into neo4j
22
-- This is the affymetrix case study tracing the affy seedset of <= 1991 to the DMET Plus
3-
-- Panel of 2017
3+
-- Panel of <= 2017 based on keyword searches in PubMed
44
-- Author: George Chacko 3/17/2018
55

66
-- End point is the garfield_hgraph series, which contains 23 wos_ids from Garfield's microarray historiograph
77
-- Starting point is all papers identified in a keyword search in PubMed for DMET PLus
8-
-- Publications are connected/related by citation. The target is cited by the source.
8+
-- Publications are connected/related by citation. The target is cited by the source. Two generations each of cited and citing references from
9+
-- start and endpoints respectively are included in this network
910

1011
-- Citation endpoint is 23 pubs in the garfield_historiograph
1112
DROP TABLE IF EXISTS garfield_hgraph_end;

Neo4j/neo4j_load.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fi
5757
db_name="${name%%_*}-v${db_ver}.db"
5858
# endregion
5959

60-
# Hide password from the output
60+
# region Hide password from the output and decrease verbosity
6161
set +x
6262
# The current directory must be writeable for the neo4j user. Otherwise, it'd fail with the
6363
# `java.io.FileNotFoundException: import.report (Permission denied)` error
@@ -68,10 +68,9 @@ echo "$3" | sudo --stdin -u neo4j bash -c "set -xe
6868

6969
echo "Restarting Neo4j with a new active database ..."
7070
echo "$3" | sudo --stdin systemctl restart neo4j
71-
set -x
7271

73-
echo "Waiting for the service to become active ..."
7472
declare -i time_limit_s=30
73+
echo "Waiting for the service to become active up to ${time_limit_s} seconds ..."
7574
# Ping Neo4j. Even if a service is active it might not be responding yet.
7675
while ! cypher-shell "CALL dbms.components()" 2>/dev/null; do
7776
if ((time_limit_s-- == 0)); then
@@ -80,9 +79,12 @@ while ! cypher-shell "CALL dbms.components()" 2>/dev/null; do
8079
fi
8180
sleep 1
8281
done
82+
set -x
83+
# endregion
8384

8485
echo "Calculating metrics and indexing ..."
8586
cypher-shell <<'HEREDOC'
87+
// Indexes will be created even if there are no nodes with indexed properties
8688
CREATE INDEX ON :Publication(endpoint);
8789
CREATE INDEX ON :Publication(nida_support);
8890
CREATE INDEX ON :Publication(other_hhs_support);

0 commit comments

Comments
 (0)