Notes on how to test tabix.
[tabix.git] / debian / README.test
1 Notes on how to test tabix
2 ──────────────────────────
3
4 The tabix package contains example data to test the tabix program.  It is
5 already compressed and indexed.  The following instruction decompress,
6 recompress, re-index and test the example data.
7
8 # Create a temporary file
9 TABIXDATA=$(mktemp)
10
11 # Uncompress example data
12 zcat /usr/share/doc/tabix/examples/example.gtf.gz > $TABIXDATA
13
14 # Compress example data with bgzip
15 bgzip $TABIXDATA
16
17 # Index with tabix
18 tabix $TABIXDATA.gz
19
20 # Extract with tabix the he features on chromosome 1 whose coordinates overlap
21 # the interval 150,309–150,309.
22 tabix $TABIXDATA.gz chr1:150309-150309 > $TABIXDATA.out
23
24 # Reference result at the bottom of this file
25 grep H\AVANA /usr/share/doc/tabix/README.test > $TABIXDATA.ref
26
27 # No difference ?
28 diff $TABIXDATA.ref $TABIXDATA.out
29
30 # Clean
31 rm $TABIXDATA.gz $TABIXDATA.gz.tbi $TABIXDATA.out $TABIXDATA.ref
32
33  -- Charles Plessy <plessy@debian.org>  Tue, 10 May 2011 19:12:19 +0900
34
35
36
37 chr1    HAVANA  exon    150309  150553  .       +       .       gene_id "ENSG00000241599"; transcript_id "ENST00000496488"; gene_type "processed_transcript"; gene_status "KNOWN"; gene_name "AL627309.12"; transcript_type "processed_transcript"; transcript_status "KNOWN"; transcript_name "AL627309.12-201"; level 2; havana_gene "OTTHUMG00000002525"; havana_transcript "OTTHUMT00000007169";
38 chr1    HAVANA  gene    150309  151388  .       +       .       gene_id "ENSG00000241599"; transcript_id "ENSG00000241599"; gene_type "processed_transcript"; gene_status "KNOWN"; gene_name "AL627309.12"; transcript_type "processed_transcript"; transcript_status "KNOWN"; transcript_name "AL627309.12"; level 2; havana_gene "OTTHUMG00000002525";
39 chr1    HAVANA  transcript      150309  151388  .       +       .       gene_id "ENSG00000241599"; transcript_id "ENST00000496488"; gene_type "processed_transcript"; gene_status "KNOWN"; gene_name "AL627309.12"; transcript_type "processed_transcript"; transcript_status "KNOWN"; transcript_name "AL627309.12-201"; level 2; havana_gene "OTTHUMG00000002525"; havana_transcript "OTTHUMT00000007169";