File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,20 +32,22 @@ sleep 2
3232# mimic_cxr_001.csv
3333# mimic_cxr_002.csv
3434# .. etc
35- for fn in ` ls $BASE_FOLDER ` ;
35+ for fn_path in " $BASE_FOLDER " /mimic_cxr_ * .csv ;
3636do
37+ [ -f " $fn_path " ] || continue
38+ fn=$( basename " $fn_path " )
3739 echo " Looping through files with mimic_cxr_###.csv pattern."
3840 # validate it's a mimic_cxr sections file
3941 if [[ $fn =~ ^mimic_cxr_[0-9]+.csv$ ]];
4042 then
41- export INPUT_FILE=${BASE_FOLDER} / $fn
43+ export INPUT_FILE=$fn_path
4244 # remove extension from filename
4345 # sets the folder location to stem of original filename
4446 # all intermediate files will be saved in this folder
4547 export OUTPUT_DIR=${INPUT_FILE::- 4}
4648
4749 echo $OUTPUT_DIR - running NegBio..
48- python $NEGBIO_PATH /negbio/negbio_csv2bioc.py --output $OUTPUT_DIR /report $INPUT_FILE
50+ python " $NEGBIO_PATH /negbio/negbio_csv2bioc.py" --output " $OUTPUT_DIR /report" " $INPUT_FILE "
4951 python $NEGBIO_PATH /negbio/negbio_pipeline.py section_split --pattern $NEGBIO_PATH /patterns/section_titles_cxr8.txt --output $OUTPUT_DIR /sections $OUTPUT_DIR /report/* --workers=6
5052 python $NEGBIO_PATH /negbio/negbio_pipeline.py ssplit --output $OUTPUT_DIR /ssplit $OUTPUT_DIR /sections/* --workers=6
5153 python $NEGBIO_PATH /negbio/negbio_pipeline.py parse --output $OUTPUT_DIR /parse $OUTPUT_DIR /ssplit/* --workers=6
You can’t perform that action at this time.
0 commit comments