Skip to content

Commit

Permalink
Defused a potential breaking for loop on unfixed number of files
Browse files Browse the repository at this point in the history
  • Loading branch information
jenzopr committed Mar 29, 2016
1 parent 1e13564 commit e17e2c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/admire
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ for reg in "${R[@]}"; do
continue
fi
mkdir -p $RESULTS/$N/$r
for b in $RESULTS/$N/*.pvals.bed; do
pvals = $(ls $RESULTS/$N/*.pvals.bed)
for b in $pvals; do
p=`basename $b .bed`
if [ ! -f $RESULTS/$N/$p.sorted.bed ]; then
cat $b | tr -d '\r' | bedtools sort -i - > $RESULTS/$N/$p.sorted.bed
Expand Down

0 comments on commit e17e2c9

Please sign in to comment.