1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/bin/sh -e
# Create a temporary file
TABIXDATA=$(mktemp)
# Uncompress example data
zcat /usr/share/doc/tabix/examples/example.gtf.gz > $TABIXDATA
# Compress example data with bgzip
bgzip $TABIXDATA
# Index with tabix
tabix -p gff $TABIXDATA.gz
# Extract with tabix the he features on chromosome 1 whose coordinates overlap
# the interval 150,309–150,309.
tabix $TABIXDATA.gz chr1:150309-150309 > $TABIXDATA.out
# Reference result at the bottom of this file
grep H\AVANA /usr/share/doc/tabix/README.test > $TABIXDATA.ref
# No difference ?
diff $TABIXDATA.ref $TABIXDATA.out
# Clean
rm $TABIXDATA.gz $TABIXDATA.gz.tbi $TABIXDATA.out $TABIXDATA.ref
|