Skip to content
Snippets Groups Projects
Commit 596193ce authored by Aaron's avatar Aaron
Browse files

jaccard tests

parent 425bdeaa
No related branches found
No related tags found
No related merge requests found
chr1 10 20 a1 1 +
chr1 100 200 a2 2 -
chr1 20 30 b1 1 +
chr1 90 101 b2 2 -
chr1 100 110 b3 3 +
chr1 200 210 b4 4 +
chr1 0 100 c1 1 +
chr2 0 100
BT=../../bin/bedtools
check()
{
if diff $1 $2; then
echo ok
else
echo fail
fi
}
###########################################################
# Test a basic self intersection
############################################################
echo " jaccard.t01...\c"
echo \
"intersection union jaccard
110 110 1" > exp
$BT jaccard -a a.bed -b a.bed > obs
check obs exp
rm obs exp
echo " jaccard.t02...\c"
echo \
"intersection union jaccard
10 140 0.0714286" > exp
$BT jaccard -a a.bed -b b.bed > obs
check obs exp
rm obs exp
echo " jaccard.t03...\c"
echo \
"intersection union jaccard
10 200 0.05" > exp
$BT jaccard -a a.bed -b c.bed > obs
check obs exp
rm obs exp
echo " jaccard.t04...\c"
echo \
"intersection union jaccard
0 210 0" > exp
$BT jaccard -a a.bed -b b.bed > obs
check obs exp
rm obs exp
\ No newline at end of file
......@@ -31,6 +31,9 @@ cd getfasta; sh test-getfasta.sh; cd ..
echo " Testing bedtools intersect:"
cd intersect; sh test-intersect.sh; cd ..
echo " Testing bedtools jaccard:"
cd jaccard; sh test-jaccard.sh; cd ..
echo " Testing bedtools map:"
cd map; sh test-map.sh; cd ..
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment