Skip to content

Commit

Permalink
* remove / after TO_NDA
Browse files Browse the repository at this point in the history
* use one variable to define both output files
* add _definitions.csv so only definitions file is searched
  • Loading branch information
tashrifbillah committed May 21, 2024
1 parent 72c9e57 commit 6a20a20
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions nda-transform/generate_nda_dict.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

TO_NDA=/data/predict1/to_nda/
TO_NDA=/data/predict1/to_nda
cd ${TO_NDA}/nda-submissions/network_combined

echo """
Expand Down Expand Up @@ -32,12 +32,15 @@ with open(sys.argv[1],'w') as f:
""" > /tmp/generate_nda_dict.py


python /tmp/generate_nda_dict.py ${TO_NDA}/nda_vars.txt
OUT=${TO_NDA}/nda_vars.txt
python /tmp/generate_nda_dict.py $OUT


cd ${TO_NDA}/nda-templates/
for v in $(cat ${TO_NDA}/nda_vars.txt)
cd ${TO_NDA}/nda-templates/
DICT=${OUT//txt/csv}
rm $DICT
for v in $(cat $OUT)
do
grep $v *csv >> ${TO_NDA}/nda_dict.csv
grep -h $v *_definitions.csv >> $DICT
done

0 comments on commit 6a20a20

Please sign in to comment.