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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "libGenome/gnFASSource.h"
#include <iostream>
#include "libGenome/gnFilter.h"
int32 main( int32 argc, char* argv[])
{
argc; argv;
gnFASSource source;
string sourceFile = "w:/developm/_data/cft073/v6/cft073v6.fas";
cout << "Enter Source: ";
cin >> sourceFile;
cout << "Opening " << sourceFile << endl;
if( !source.Open( sourceFile ) )
{
cout << "Failed to open " << sourceFile << endl;
return 1;
}
cout << "Number of Contigs " << source.GetContigListLength() << endl;
for( uint32 i=0; i < source.GetContigListLength(); ++i )
{
gnFileContig* fg = source.GetContig(i);
cout << "\t" << fg->GetName() << endl;
cout << "\t\t" << fg->GetSeqLength() << " : {"
<< fg->GetFileStartEnd().first << ", "
<< fg->GetFileStartEnd().second << ": ";
for( uint32 j=0; j<CONTIG_SECTION_SIZE; ++j )
cout << "(" << fg->GetSectStartEnd( (gnContigSection)j ).first << ","
<< fg->GetSectStartEnd( (gnContigSection)j ).second << ") ";
cout << "}" << endl;
cout << "\t\t" << (fg->HasRepeatSeqGap()?"TRUE":"FALSE")
<< " (" << fg->GetRepeatSeqGapSize().first << ","
<< fg->GetRepeatSeqGapSize().second << ")" << endl;
}
uint32 seqLen = 75;
gnSeqC* seq = new gnSeqC[seqLen+1];
for( uint32 i=0; i < seqLen; ++i )
seq[i] = '@';
seq[seqLen] = 0;
cout << "SeqRead(0, seq, " << seqLen << ", 0)" << endl;
if( source.SeqRead( 158, seq, seqLen, 0 ) )
{
seq[seqLen] = 0;
cout << seqLen << "> " << seq << endl;
}
else
cout << "Read failed " << endl;
return 0;
}
|