00001 #include "gn/gnFASSource.h"
00002 #include <iostream>
00003
00004
00005 #include "gn/gnFilter.h"
00006
00007 int32 main( int32 argc, char* argv[])
00008 {
00009 argc; argv;
00010
00011 gnFASSource source;
00012 string sourceFile = "w:/developm/_data/cft073/v6/cft073v6.fas";
00013 cout << "Enter Source: ";
00014 cin >> sourceFile;
00015 cout << "Opening " << sourceFile << endl;
00016 if( !source.Open( sourceFile ) )
00017 {
00018 cout << "Failed to open " << sourceFile << endl;
00019 return 1;
00020 }
00021
00022 cout << "Number of Contigs " << source.GetContigListLength() << endl;
00023 for( uint32 i=0; i < source.GetContigListLength(); ++i )
00024 {
00025 gnFileContig* fg = source.GetContig(i);
00026 cout << "\t" << fg->GetName() << endl;
00027 cout << "\t\t" << fg->GetSeqLength() << " : {"
00028 << fg->GetFileStartEnd().first << ", "
00029 << fg->GetFileStartEnd().second << ": ";
00030 for( uint32 j=0; j<CONTIG_SECTION_SIZE; ++j )
00031 cout << "(" << fg->GetSectStartEnd( (gnContigSection)j ).first << ","
00032 << fg->GetSectStartEnd( (gnContigSection)j ).second << ") ";
00033 cout << "}" << endl;
00034 cout << "\t\t" << (fg->HasRepeatSeqGap()?"TRUE":"FALSE")
00035 << " (" << fg->GetRepeatSeqGapSize().first << ","
00036 << fg->GetRepeatSeqGapSize().second << ")" << endl;
00037 }
00038
00039 uint32 seqLen = 75;
00040 gnSeqC* seq = new gnSeqC[seqLen+1];
00041 for( uint32 i=0; i < seqLen; ++i )
00042 seq[i] = '@';
00043 seq[seqLen] = 0;
00044
00045 cout << "SeqRead(0, seq, " << seqLen << ", 0)" << endl;
00046 if( source.SeqRead( 158, seq, seqLen, 0 ) )
00047 {
00048 seq[seqLen] = 0;
00049 cout << seqLen << "> " << seq << endl;
00050 }
00051 else
00052 cout << "Read failed " << endl;
00053 return 0;
00054 }