1 /*==============================================================================
2 *
3 * PUBLIC DOMAIN NOTICE
4 * National Center for Biotechnology Information
5 *
6 * This software/database is a "United States Government Work" under the
7 * terms of the United States Copyright Act. It was written as part of
8 * the author's official duties as a United States Government employee and
9 * thus cannot be copyrighted. This software/database is freely available
10 * to the public for use. The National Library of Medicine and the U.S.
11 * Government have not placed any restriction on its use or reproduction.
12 *
13 * Although all reasonable efforts have been taken to ensure the accuracy
14 * and reliability of the software and data, the NLM and the U.S.
15 * Government do not and cannot warrant the performance or results that
16 * may be obtained by using this software or data. The NLM and the U.S.
17 * Government disclaim all warranties, express or implied, including
18 * warranties of performance, merchantability or fitness for any particular
19 * purpose.
20 *
21 * Please cite the author in any work or product based on this material.
22 *
23 * ===========================================================================
24 */
25
26
27 #include "debug.h"
28 #include "factory-cmn.h"
29 #include "factory-mappings.h"
30
31 typedef struct CGMappings15 CGMappings15;
32 #define CGFILETYPE_IMPL CGMappings15
33 #include "file.h"
34
35 #include <klib/printf.h>
36 #include <klib/rc.h>
37
38 #include <sysalloc.h>
39
40 #include <stdlib.h>
41 #include <string.h>
42
43
44 struct CGMappings15 {
45 CGFileType dad;
46 const CGLoaderFile* file;
47 uint64_t records;
48 /* headers */
49 CGFIELD15_ASSEMBLY_ID assembly_id;
50 CGFIELD15_BATCH_FILE_NUMBER batch_file_number;
51 CGFIELD15_GENERATED_AT generated_at;
52 CGFIELD15_GENERATED_BY generated_by;
53 CGFIELD15_LANE lane;
54 CGFIELD15_LIBRARY library;
55 CGFIELD15_SAMPLE sample;
56 CGFIELD15_SLIDE slide;
57 CGFIELD15_SOFTWARE_VERSION software_version;
58 };
59
CGMappings15_Release(const CGMappings15 * cself,uint64_t * records)60 void CGMappings15_Release(const CGMappings15* cself, uint64_t* records)
61 {
62 if( cself != NULL ) {
63 CGMappings15* self = (CGMappings15*)cself;
64 if( records != NULL ) {
65 *records = cself->records;
66 }
67 free(self);
68 }
69 }
70
71 static
CGMappings15_Header(const CGMappings15 * cself,const char * buf,const size_t len)72 rc_t CC CGMappings15_Header(const CGMappings15* cself, const char* buf, const size_t len)
73 {
74 rc_t rc = 0;
75 size_t slen;
76 CGMappings15* self = (CGMappings15*)cself;
77
78 if( strncmp("ASSEMBLY_ID\t", buf, slen = 12) == 0 ) {
79 rc = str2buf(&buf[slen], len - slen, self->assembly_id, sizeof(self->assembly_id));
80 } else if( strncmp("BATCH_FILE_NUMBER\t", buf, slen = 18) == 0 ) {
81 rc = str2u32(&buf[slen], len - slen, &self->batch_file_number);
82 if( self->batch_file_number < 1 ) {
83 rc = RC(rcRuntime, rcFile, rcConstructing, rcItem, rcOutofrange);
84 }
85 } else if( strncmp("GENERATED_AT\t", buf, slen = 13) == 0 ) {
86 rc = str2buf(&buf[slen], len - slen, self->generated_at, sizeof(self->generated_at));
87 } else if( strncmp("GENERATED_BY\t", buf, slen = 13) == 0 ) {
88 rc = str2buf(&buf[slen], len - slen, self->generated_by, sizeof(self->generated_by));
89 } else if( strncmp("LANE\t", buf, slen = 5) == 0 ) {
90 rc = str2buf(&buf[slen], len - slen, self->lane, sizeof(self->lane));
91 } else if( strncmp("LIBRARY\t", buf, slen = 8) == 0 ) {
92 rc = str2buf(&buf[slen], len - slen, self->library, sizeof(self->library));
93 } else if( strncmp("SAMPLE\t", buf, slen = 7) == 0 ) {
94 rc = str2buf(&buf[slen], len - slen, self->sample, sizeof(self->sample));
95 } else if( strncmp("SLIDE\t", buf, slen = 6) == 0 ) {
96 rc = str2buf(&buf[slen], len - slen, self->slide, sizeof(self->slide));
97 } else if( strncmp("SOFTWARE_VERSION\t", buf, slen = 17) == 0 ) {
98 rc = str2buf(&buf[slen], len - slen, self->software_version, sizeof(self->software_version));
99 } else {
100 rc = RC(rcRuntime, rcFile, rcConstructing, rcName, rcUnrecognized);
101 }
102 return rc;
103 }
104
CGMappings25_Header(const CGMappings15 * cself,const char * buf,const size_t len)105 static rc_t CC CGMappings25_Header(const CGMappings15* cself,
106 const char* buf, const size_t len)
107 {
108 rc_t rc = 0;
109 size_t slen = 0;
110 CGMappings15* self = (CGMappings15*)cself;
111
112 /* from SRA-2617 files */
113 if (strncmp("APPROVAL\t", buf, slen = 9) == 0) {
114 }
115 else if (strncmp("TITLE\t", buf, slen = 6) == 0) {
116 }
117 else if (strncmp("ADDRESS\t", buf, slen = 8) == 0) {
118 }
119
120 /* From Table 1: Header Metadata Present in all Data Files */
121 else if (strncmp("CUSTOMER_SAMPLE_ID\t", buf, slen = 19) == 0) {
122 }
123 else if (strncmp("SAMPLE_SOURCE\t", buf, slen = 14) == 0) {
124 }
125 else if (strncmp("REPORTED_GENDER\t", buf, slen = 16) == 0) {
126 }
127 else if (strncmp("CALLED_GENDER\t", buf, slen = 14) == 0) {
128 }
129 else if (strncmp("TUMOR_STATUS\t", buf, slen = 13) == 0) {
130 }
131 else if (strncmp("LIBRARY_TYPE\t", buf, slen = 13) == 0) {
132 }
133 else if (strncmp("LIBRARY_SOURCE\t", buf, slen = 13) == 0) {
134 }
135
136 else if (strncmp("ASSEMBLY_ID\t", buf, slen = 12) == 0) {
137 rc = str2buf(&buf[slen], len - slen,
138 self->assembly_id, sizeof(self->assembly_id));
139 }
140 else if (strncmp("BATCH_FILE_NUMBER\t", buf, slen = 18) == 0) {
141 rc = str2u32(&buf[slen], len - slen, &self->batch_file_number);
142 if (self->batch_file_number < 1 ) {
143 rc = RC(rcRuntime, rcFile, rcConstructing, rcItem, rcOutofrange);
144 }
145 }
146 else if (strncmp("GENERATED_AT\t", buf, slen = 13) == 0) {
147 rc = str2buf(&buf[slen], len - slen,
148 self->generated_at, sizeof(self->generated_at));
149 }
150 else if (strncmp("GENERATED_BY\t", buf, slen = 13) == 0) {
151 rc = str2buf(&buf[slen], len - slen,
152 self->generated_by, sizeof(self->generated_by));
153 }
154 else if (strncmp("LANE\t", buf, slen = 5) == 0) {
155 rc = str2buf(&buf[slen], len - slen, self->lane, sizeof(self->lane));
156 }
157 else if (strncmp("LIBRARY\t", buf, slen = 8) == 0) {
158 rc = str2buf(&buf[slen], len - slen,
159 self->library, sizeof(self->library));
160 }
161 else if (strncmp("SAMPLE\t", buf, slen = 7) == 0) {
162 rc = str2buf(&buf[slen], len - slen,
163 self->sample, sizeof(self->sample));
164 }
165 else if (strncmp("SLIDE\t", buf, slen = 6) == 0) {
166 rc = str2buf(&buf[slen], len - slen,
167 self->slide, sizeof(self->slide));
168 }
169 else if (strncmp("SOFTWARE_VERSION\t", buf, slen = 17) == 0) {
170 rc = str2buf(&buf[slen], len - slen,
171 self->software_version, sizeof(self->software_version));
172 }
173 else {
174 rc = RC(rcRuntime, rcFile, rcConstructing, rcName, rcUnrecognized);
175 }
176
177 return rc;
178 }
179
180 static
CGMappings15_GetAssemblyId(const CGMappings15 * cself,const CGFIELD_ASSEMBLY_ID_TYPE ** assembly_id)181 rc_t CGMappings15_GetAssemblyId(const CGMappings15* cself, const CGFIELD_ASSEMBLY_ID_TYPE** assembly_id)
182 {
183 if( cself->assembly_id[0] == '\0' ) {
184 return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
185 }
186 *assembly_id = cself->assembly_id;
187 return 0;
188 }
189
190 static
CGMappings15_GetSlide(const CGMappings15 * cself,const CGFIELD_SLIDE_TYPE ** slide)191 rc_t CGMappings15_GetSlide(const CGMappings15* cself, const CGFIELD_SLIDE_TYPE** slide)
192 {
193 if( cself->slide[0] == '\0' ) {
194 return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
195 }
196 *slide = cself->slide;
197 return 0;
198 }
199
200 static
CGMappings15_GetLane(const CGMappings15 * cself,const CGFIELD_LANE_TYPE ** lane)201 rc_t CGMappings15_GetLane(const CGMappings15* cself, const CGFIELD_LANE_TYPE** lane)
202 {
203 if( cself->lane[0] == '\0' ) {
204 return RC(rcRuntime, rcFile, rcReading, rcFormat, rcInvalid);
205 }
206 *lane = cself->lane;
207 return 0;
208 }
209
210 static
CGMappings15_GetBatchFileNumber(const CGMappings15 * cself,const CGFIELD_BATCH_FILE_NUMBER_TYPE ** batch_file_number)211 rc_t CGMappings15_GetBatchFileNumber(const CGMappings15* cself, const CGFIELD_BATCH_FILE_NUMBER_TYPE** batch_file_number)
212 {
213 *batch_file_number = &cself->batch_file_number;
214 return 0;
215 }
216
217 static
CGMappings15_Read(const CGMappings15 * cself,TMappingsData * data)218 rc_t CC CGMappings15_Read(const CGMappings15* cself, TMappingsData* data)
219 {
220 rc_t rc = 0;
221 TMappingsData_map* m = NULL;
222
223 data->map_qty = 0;
224 do {
225 char tmp[2];
226 CG_LINE_START(cself->file, b, len, p);
227 if( b == NULL || len == 0 ) {
228 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInsufficient);
229 break;
230 }
231 m = &data->map[data->map_qty];
232 m->saved = false;
233 /*DEBUG_MSG(10, ("mappings %4u: '%.*s'\n", data->map_qty, len, b));*/
234 CG_LINE_NEXT_FIELD(b, len, p);
235 rc = str2u16(b, p - b, &m->flags);
236 CG_LINE_NEXT_FIELD(b, len, p);
237 rc = str2buf(b, p - b, m->chr, sizeof(m->chr));
238 CG_LINE_NEXT_FIELD(b, len, p);
239 rc = str2i32(b, p - b, &m->offset);
240 CG_LINE_NEXT_FIELD(b, len, p);
241 rc = str2i16(b, p - b, &m->gap[0]);
242 CG_LINE_NEXT_FIELD(b, len, p);
243 rc = str2i16(b, p - b, &m->gap[1]);
244 CG_LINE_NEXT_FIELD(b, len, p);
245 rc = str2i16(b, p - b, &m->gap[2]);
246 CG_LINE_NEXT_FIELD(b, len, p);
247 rc = str2buf(b, p - b, tmp, sizeof(tmp));
248 if( tmp[0] < 33 || tmp[0] > 126 ) {
249 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
250 }
251 m->weight = tmp[0];
252 CG_LINE_LAST_FIELD(b, len, p);
253 if( (rc = str2u32(b, p - b, &m->mate)) != 0 ) {
254 } else if( m->flags > 7 ) {
255 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
256 } else if( ++data->map_qty >= CG_MAPPINGS_MAX ) {
257 rc = RC(rcRuntime, rcFile, rcReading, rcBuffer, rcInsufficient);
258 }
259 ((CGMappings15*)cself)->records++;
260 DEBUG_MSG(10, ("mappings %4u: %u\t'%s'\t%u\t%i\t%i\t%i\t%c\t%u\n",
261 data->map_qty - 1, m->flags, m->chr, m->offset,
262 m->gap[0], m->gap[1], m->gap[2], m->weight, m->mate));
263 CG_LINE_END();
264 } while( rc == 0 && !(m->flags & cg_eLastDNBRecord) );
265 if (rc == 0) {
266 unsigned i;
267 unsigned const n = data->map_qty;
268
269 for (i = 0; i != n && rc == 0; ++i) {
270 unsigned const mate = data->map[i].mate;
271
272 if (mate > n)
273 data->map[i].mate = i;
274 }
275 }
276 return rc;
277 }
278
279 static
CGMappings22_Read(const CGMappings15 * cself,TMappingsData * data)280 rc_t CC CGMappings22_Read(const CGMappings15* cself, TMappingsData* data)
281 {
282 rc_t rc = 0;
283 TMappingsData_map* m = NULL;
284
285 data->map_qty = 0;
286 do {
287 char tmp[2];
288 char armWeight = '\0';
289 CG_LINE_START(cself->file, b, len, p);
290 if( b == NULL || len == 0 ) {
291 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInsufficient);
292 break;
293 }
294 m = &data->map[data->map_qty];
295 m->saved = false;
296 /*DEBUG_MSG(10, ("mappings %4u: '%.*s'\n", data->map_qty, len, b));*/
297 CG_LINE_NEXT_FIELD(b, len, p);
298 rc = str2u16(b, p - b, &m->flags);
299 CG_LINE_NEXT_FIELD(b, len, p);
300 rc = str2buf(b, p - b, m->chr, sizeof(m->chr));
301 CG_LINE_NEXT_FIELD(b, len, p);
302 rc = str2i32(b, p - b, &m->offset);
303 CG_LINE_NEXT_FIELD(b, len, p);
304 rc = str2i16(b, p - b, &m->gap[0]);
305 CG_LINE_NEXT_FIELD(b, len, p);
306 rc = str2i16(b, p - b, &m->gap[1]);
307 CG_LINE_NEXT_FIELD(b, len, p);
308 rc = str2i16(b, p - b, &m->gap[2]);
309 CG_LINE_NEXT_FIELD(b, len, p);
310 rc = str2buf(b, p - b, tmp, sizeof(tmp));
311 if( tmp[0] < 33 || tmp[0] > 126 ) {
312 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
313 }
314 m->weight = tmp[0];
315 CG_LINE_NEXT_FIELD(b, len, p);
316 if( (rc = str2u32(b, p - b, &m->mate)) != 0 ) {
317 } else if( m->flags > 7 ) {
318 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
319 } else if( ++data->map_qty >= CG_MAPPINGS_MAX ) {
320 rc = RC(rcRuntime, rcFile, rcReading, rcBuffer, rcInsufficient);
321 }
322 CG_LINE_LAST_FIELD(b, len, p);
323 rc = str2buf(b, p - b, tmp, sizeof(tmp));
324 if (tmp[0] < 33 || tmp[0] > 126)
325 { rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange); }
326 armWeight = tmp[0]; /* ignore armWeight */
327 ((CGMappings15*)cself)->records++;
328 DEBUG_MSG(10, ("mappings %4u: %u\t'%s'\t%u\t%i\t%i\t%i\t%c\t%u\t%c\n",
329 data->map_qty - 1, m->flags, m->chr, m->offset,
330 m->gap[0], m->gap[1], m->gap[2], m->weight, m->mate, armWeight));
331 armWeight += 0; /* shut up used variable warning in release build */
332 CG_LINE_END();
333 } while( rc == 0 && !(m->flags & cg_eLastDNBRecord) );
334 if (rc == 0) {
335 unsigned i;
336 unsigned const n = data->map_qty;
337
338 for (i = 0; i != n && rc == 0; ++i) {
339 unsigned const mate = data->map[i].mate;
340
341 if (mate > n)
342 data->map[i].mate = n;
343 }
344 }
345 return rc;
346 }
347
CGMappings25_Read(const CGMappings15 * cself,TMappingsData * data)348 static rc_t CC CGMappings25_Read(
349 const CGMappings15 *cself, TMappingsData *data)
350 {
351 rc_t rc = 0;
352 TMappingsData_map* m = NULL;
353
354 assert(cself);
355
356 data->map_qty = 0;
357 do {
358 char tmp[2];
359 char armWeight = '\0';
360 CG_LINE_START(cself->file, b, len, p);
361 if( b == NULL || len == 0 ) {
362 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcInsufficient);
363 break;
364 }
365 m = &data->map[data->map_qty];
366 m->saved = false;
367 /*DEBUG_MSG(10, ("mappings %4u: '%.*s'\n", data->map_qty, len, b));*/
368 CG_LINE_NEXT_FIELD(b, len, p);
369 rc = str2u16(b, p - b, &m->flags);
370 CG_LINE_NEXT_FIELD(b, len, p);
371 rc = str2buf(b, p - b, m->chr, sizeof(m->chr));
372 CG_LINE_NEXT_FIELD(b, len, p);
373 rc = str2i32(b, p - b, &m->offset);
374 CG_LINE_NEXT_FIELD(b, len, p);
375 rc = str2i16(b, p - b, &m->gap[0]);
376 CG_LINE_NEXT_FIELD(b, len, p);
377 rc = str2i16(b, p - b, &m->gap[1]);
378 CG_LINE_NEXT_FIELD(b, len, p);
379 rc = str2i16(b, p - b, &m->gap[2]);
380 CG_LINE_NEXT_FIELD(b, len, p);
381 rc = str2buf(b, p - b, tmp, sizeof(tmp));
382 if( tmp[0] < 33 || tmp[0] > 126 ) {
383 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
384 }
385 m->weight = tmp[0];
386 CG_LINE_NEXT_FIELD(b, len, p);
387 if( (rc = str2u32(b, p - b, &m->mate)) != 0 ) {
388 } else if( m->flags > 7 ) {
389 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
390 } else if( ++data->map_qty >= CG_MAPPINGS_MAX ) {
391 rc = RC(rcRuntime, rcFile, rcReading, rcBuffer, rcInsufficient);
392 }
393 CG_LINE_LAST_FIELD(b, len, p);
394 rc = str2buf(b, p - b, tmp, sizeof(tmp));
395 if (rc == 0 && (tmp[0] < 33 || tmp[0] > 126)) {
396 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
397 }
398 armWeight = tmp[0]; /* ignore armWeight */
399 ((CGMappings15*)cself)->records++;
400 DEBUG_MSG(10, ("mappings %4u: %u\t'%s'\t%u\t%i\t%i\t%i\t%c\t%u\t%c\n",
401 data->map_qty - 1, m->flags, m->chr, m->offset,
402 m->gap[0], m->gap[1], m->gap[2], m->weight, m->mate, armWeight));
403 armWeight += 0; /* shut up used variable warning in release build */
404
405 if (rc == 0) {
406 assert(m->gap[2] == 0);
407 if (m->gap[2] != 0) {
408 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
409 }
410 if (m->flags & cg_eRevDnbStrand) {
411 assert(m->gap[0] == -1);
412 if (m->gap[0] != -1) {
413 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
414 }
415 }
416 else {
417 assert(m->gap[1] == -1);
418 if (m->gap[1] != -1) {
419 rc = RC(rcRuntime, rcFile, rcReading, rcData, rcOutofrange);
420 }
421 }
422 if (rc != 0) {
423 LOGERR(klogErr, rc,
424 "Bad gap value in mapping file (File format >= v2.5)");
425 }
426 }
427
428 CG_LINE_END();
429 } while( rc == 0 && !(m->flags & cg_eLastDNBRecord) );
430 if (rc == 0) {
431 unsigned i;
432 unsigned const n = data->map_qty;
433
434 for (i = 0; i != n && rc == 0; ++i) {
435 unsigned const mate = data->map[i].mate;
436
437 if (mate > n)
438 data->map[i].mate = n;
439 }
440 }
441 return rc;
442 }
443
444 static const CGFileType_vt CGMappings15_vt =
445 {
446 CGMappings15_Header,
447 NULL,
448 NULL,
449 CGMappings15_Read,
450 NULL,
451 NULL,
452 NULL, /* tag_lfr */
453 CGMappings15_GetAssemblyId,
454 CGMappings15_GetSlide,
455 CGMappings15_GetLane,
456 CGMappings15_GetBatchFileNumber,
457 NULL,
458 NULL,
459 CGMappings15_Release
460 };
461
462 static const CGFileType_vt CGMappings22_vt =
463 {
464 CGMappings15_Header,
465 NULL,
466 NULL,
467 CGMappings22_Read,
468 NULL,
469 NULL,
470 NULL, /* tag_lfr */
471 CGMappings15_GetAssemblyId,
472 CGMappings15_GetSlide,
473 CGMappings15_GetLane,
474 CGMappings15_GetBatchFileNumber,
475 NULL,
476 NULL,
477 CGMappings15_Release
478 };
479
480 static const CGFileType_vt CGMappings25_vt = {
481 CGMappings25_Header,
482 NULL,
483 NULL,
484 CGMappings25_Read,
485 NULL,
486 NULL,
487 NULL, /* tag_lfr */
488 CGMappings15_GetAssemblyId,
489 CGMappings15_GetSlide,
490 CGMappings15_GetLane,
491 CGMappings15_GetBatchFileNumber,
492 NULL,
493 NULL,
494 CGMappings15_Release
495 };
496
497 static
CGMappings_Make(const CGFileType ** cself,const CGLoaderFile * file,const CGFileType_vt * vt)498 rc_t CC CGMappings_Make(const CGFileType** cself,
499 const CGLoaderFile* file, const CGFileType_vt* vt)
500 {
501 rc_t rc = 0;
502 CGMappings15* obj = NULL;
503
504 if( cself == NULL || file == NULL ) {
505 rc = RC(rcRuntime, rcFile, rcConstructing, rcParam, rcNull);
506 } else {
507 *cself = NULL;
508 if( (obj = calloc(1, sizeof(*obj))) == NULL ) {
509 rc = RC(rcRuntime, rcFile, rcConstructing, rcMemory, rcExhausted);
510 } else {
511 obj->file = file;
512 obj->dad.type = cg_eFileType_MAPPINGS;
513 obj->dad.vt = vt;
514 }
515 }
516 if( rc == 0 ) {
517 *cself = &obj->dad;
518 } else {
519 CGMappings15_Release(obj, NULL);
520 }
521 return rc;
522 }
523
CGMappings15_Make(const CGFileType ** self,const CGLoaderFile * file)524 rc_t CC CGMappings15_Make(const CGFileType** self, const CGLoaderFile* file)
525 { return CGMappings_Make(self, file, &CGMappings15_vt); }
526
CGMappings13_Make(const CGFileType ** self,const CGLoaderFile * file)527 rc_t CC CGMappings13_Make(const CGFileType** self, const CGLoaderFile* file)
528 { return CGMappings15_Make(self, file); }
529
CGMappings20_Make(const CGFileType ** self,const CGLoaderFile * file)530 rc_t CC CGMappings20_Make(const CGFileType** self, const CGLoaderFile* file)
531 { return CGMappings15_Make(self, file); }
532
CGMappings22_Make(const CGFileType ** self,const CGLoaderFile * file)533 rc_t CC CGMappings22_Make(const CGFileType** self, const CGLoaderFile* file)
534 { return CGMappings_Make(self, file, &CGMappings22_vt); }
535
CGMappings25_Make(const CGFileType ** self,const CGLoaderFile * file)536 rc_t CC CGMappings25_Make(const CGFileType **self, const CGLoaderFile *file)
537 {
538 return CGMappings_Make(self, file, &CGMappings25_vt);
539 }
540