forked from DeepGraphLearning/KnowledgeGraphEmbedding
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_data.bash
More file actions
36 lines (32 loc) · 1.08 KB
/
generate_data.bash
File metadata and controls
36 lines (32 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
## bash script to run, data geneaioon and preprocessing files
# Generate data for training and testing
module purge
module load python/intel/3.8.6
DATA_PATH='./data'
CODE_PATH="./codes/triplet_generation"
echo "Generating triplets ..."
python $CODE_PATH'/triplet_generation_script.py'
python $CODE_PATH'/generate_paitint_id_triplets.py'
echo "done"
echo "Pre-processing data ..."
python $CODE_PATH'/generate_entity_relations.py'
echo "done "
echo "moving data"
rm -rf $DATA_PATH'/MSK'
cp -r $CODE_PATH'/generated_triplets' $DATA_PATH'/MSK'
cd $DATA_PATH'/MSK/all_triplets'
mv ./* ..
cd ..
rm -r ./all_triplets
mv ./cancer_to_drug_triplets.txt ./cancer_to_drug/
mv ./cancer_to_gene_triplets.txt ./cancer_to_gene/
mv ./cancer_to_treatment_triplets.txt ./cancer_to_treatment/
mv ./gene_to_up_regulate_to_cancer_triplets.txt ./gene_to_up_regulate_to_cancer/
cd ..
cd ..
cp -r $DATA_PATH/MSK/cancer_to_drug/ $DATA_PATH
cp -r $DATA_PATH/MSK/cancer_to_gene/ $DATA_PATH
cp -r $DATA_PATH/MSK/cancer_to_treatment/ $DATA_PATH
cp -r $DATA_PATH/MSK/gene_to_up_regulate_to_cancer/ $DATA_PATH
echo "done"