Loop bedtools command over multiple files
I need to loop through bedtools over multiple files. There are 40 files that i should perform bedtools intersect with another file on shell. This is what i gave:
for i in temp*
do
bedtools intersect -a A.bed -b $i -v
done
However, this did not work. Is there anyother way that this can be done?
• 2,591 views
•
link
1 answer
Without using a loop:
$ bedops --not-element-of 1 A.bed temp*.bed > answer.bed
• 0 views
•
link
Log in to answer this question.
Try putting the
-vbefore the-a.