1 #include <seqan/gff_io.h> 2 3 using namespace seqan; 4 main()5int main() 6 { 7 GffFileOut out(std::cout, Gff()); 8 9 GffRecord record; 10 11 // Fill and write out the first record. 12 record.ref = "ctg123"; 13 record.source = ""; 14 record.type = "gene"; 15 record.beginPos = 999; 16 record.endPos = 9000; 17 record.strand = '+'; 18 record.score = GffRecord::INVALID_SCORE(); 19 appendValue(record.tagNames, "ID"); 20 appendValue(record.tagValues, "gene0001"); 21 appendValue(record.tagNames, "Name"); 22 appendValue(record.tagValues, "EDEN"); 23 writeRecord(out, record); 24 25 // Clear the record. 26 clear(record.tagNames); 27 clear(record.tagValues); 28 29 // Fill and write out the second record. 30 record.ref = "ctg123"; 31 record.source = ""; 32 record.type = "TF_binding_site"; 33 record.beginPos = 999; 34 record.endPos = 1012; 35 record.strand = '+'; 36 record.score = GffRecord::INVALID_SCORE(); 37 appendValue(record.tagNames, "Parent"); 38 appendValue(record.tagValues, "gene0001"); 39 writeRecord(out, record); 40 41 return 0; 42 } 43