1 module test.tabix_gffreader; 2 3 import std.stdio; 4 5 import dhtslib.tabix; 6 7 int main(string[] args) 8 { 9 writeln("tabix_gffreader"); 10 11 writeln(args[0], args[1]); 12 TabixIndexedFile tf = TabixIndexedFile(args[1]); 13 14 string[] seqnames = tf.sequenceNames; 15 writeln("Sequence names: "); 16 writeln(seqnames); 17 18 //auto r = tf.region("chr1:1-14409"); 19 auto r = tf.region("chr1:12000-12000"); 20 21 foreach(line ; r) { 22 writeln(line[0 .. 80]); 23 } 24 25 writeln(r); 26 /* 27 writeln("Writing Range r as array:"); 28 writeln(r); 29 writeln("Repeating again with spent r"); 30 writeln(r); 31 writeln("Repeating again (again) with spent r"); 32 writeln(r); 33 34 r = tf.region("chr1:1-14409"); 35 writeln("Writing Range r as rows:"); 36 foreach(line; r) { 37 if (line.length > 80) { writeln(line[0 .. 80]); } 38 } 39 */ 40 return 0; 41 }