46 std::string filename = std::string( prefix ) +
".ann";
47 FILE* file = fopen( filename.c_str(),
"w" );
51 fprintf( file,
"%lld %d %u\n", (
long long)bns.
l_pac, bns.
n_seqs, bns.
seed );
58 fprintf(file,
"%d %s", ann_data.
gi, ann_info.
name.c_str());
59 if (ann_info.
anno.length())
60 fprintf(file,
" %s\n", ann_info.
anno.c_str());
64 fprintf( file,
"%lld %d %d\n", (
long long)ann_data.
offset, ann_data.
len, ann_data.
n_ambs );
69 std::string filename = std::string( prefix ) +
".amb";
70 FILE* file = fopen( filename.c_str(),
"w" );
78 fprintf( file,
"%lld %d %c\n", (
long long)amb.
offset, amb.
len, amb.
amb );
92 std::string filename = std::string( prefix ) +
".ann";
93 FILE* file = fopen( filename.c_str(),
"r" );
110 fscanf( file,
"%d%s", &ann_data.
gi, buffer );
112 ann_info.
name = buffer;
118 while ((c = fgetc( file )) !=
'\n' && c != EOF)
124 for (p = buffer; *p ==
' '; ++p) {}
129 fscanf(file,
"%lld%d%d\n", &ann_data.
offset, &ann_data.
len, &ann_data.
n_ambs);
134 std::string filename = std::string( prefix ) +
".amb";
135 FILE* file = fopen( filename.c_str(),
"r" );
143 fscanf( file,
"%lld%d%u\n", &l_pac, &n_seqs, &bns.
n_holes );
153 fscanf( file,
"%lld%d%c\n", &amb.
offset, &amb.
len, &amb.
amb );
168 std::string filename = std::string( prefix ) +
".ann";
169 FILE* file = fopen( filename.c_str(),
"r" );
176 std::string filename = std::string( prefix ) +
".amb";
177 FILE* file = fopen( filename.c_str(),
"r" );
185 fscanf( file,
"%lld%d%u\n", &l_pac, &n_seqs, &bns.
n_holes );
212 std::string filename = std::string( prefix ) +
".ann";
213 FILE* file = fopen( filename.c_str(),
"r" );
220 fscanf( file,
"%lld%d%u\n", &l_pac, &n_seqs, &seed );
225 for (
int32 i = 0; i != n_seqs; ++i)
230 fscanf( file,
"%d%s", &ann_data.
gi, buffer );
232 ann_info.
name = buffer;
238 while ((c = fgetc( file )) !=
'\n' && c != EOF)
244 for (p = buffer; *p ==
' '; ++p) {}
249 fscanf(file,
"%lld%d%d\n", &ann_data.
offset, &ann_data.
len, &ann_data.
n_ambs);
250 bns->
read_ann( ann_info, ann_data );
255 std::string filename = std::string( prefix ) +
".amb";
256 FILE* file = fopen( filename.c_str(),
"r" );
265 fscanf( file,
"%lld%d%u\n", &l_pac, &n_seqs, &n_holes );
268 for (
int32 i = 0; i != n_holes; ++i)
270 fscanf( file,
"%lld%d%c\n", &amb.
offset, &amb.
len, &amb.
amb );