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 Oct 28, 2015
1 parent 4f8d196 commit 6d3da40
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 @@ -466,7 +466,8 @@ print id,name,gid,type,$1,$2,$3,$6,$7,$8,$9,$10,higherin,qval,$14,$11,$12,$13;}'
fi
sort -t',' -k14,14n $EXCEL/$g-$r.csv | cut -d',' -f5,6,7 | sed -e 's/,/\t/g' | tail -n +2 | head -n $I > $VISUALIZATION/$g/$r-target.bed
split -l 1 $VISUALIZATION/$g/$r-target.bed $VISUALIZATION/$g/$r-target-
for f in $VISUALIZATION/$g/$r-target-*; do
targets = $(ls $VISUALIZATION/$g/$r-target-*)
for f in $targets; do
bedtools intersect -wa -a $DIR/../data/ilmn12.hg19.bed -b $f | awk 'BEGIN{FS="\t";OFS="\t";}{split($4,a,";");split(a[1],b,"=");print b[2],$2}' | sort > $f.probes
cut -f1 $f.probes | grep -f - $WORKDIR/normalized/betaValues_fn.sorted.txt > $f.grep
cut -f2 $f.probes | paste - $f.grep > $f.txt
Expand Down

0 comments on commit 6d3da40

Please sign in to comment.