Skip to content

Commit 9eab540

Browse files
authored
Create mergeDEcompartments.sh
1 parent 72097d5 commit 9eab540

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

utility/mergeDEcompartments.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
while getopts f:d: flag
3+
do
4+
case "${flag}" in
5+
f) file=${OPTARG};;
6+
d) dist=${OPTARG};;
7+
esac
8+
done
9+
10+
awk -v OFS='\t' '$(NF-1) < 0.1 {print $1,$2,$3}' $file |bedtools sort -i - |bedtools merge -d $dist -c 1 -o count |awk -v OFS='\t' '$NF > 1 {print $1,$2,$3}'

0 commit comments

Comments
 (0)