Friday, July 18, 2014

How to intersect bed file with multiple other bed files simultaneously

Use bed files that end with bb.bed.cut_tabseparated and intersect them with L2_TCCTGAGC_L002_peaks:

for f in $(find . -name \*bb.bed.cut_tabseparated\*)
do
bedtools intersect -a L2_TCCTGAGC_L002_peaks.bed -b "$f" -wa > "$f"_intersect;
done

No comments:

Post a Comment