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 "factory-reads.h" /* CGReads15_Make */
28 #include "factory-mappings.h" /* CGMappings15_Make */
29 #include "factory-evidence-intervals.h" /* CGEvidenceIntervals15_Make */
30 #include "factory-evidence-dnbs.h" /* CGEvidenceDnbs15_Make */
31 #include "factory-tag-lfr.h" /* CGTagLfr15_Make */
32
33
34 #include "file.h" /* CGFileType */
35
36
37 /* File format v1.7
38 Software v1.12
39 #FORMAT_VERSION 1.7 */
40
41
42 static const CGFileTypeFactory cg_ETypeXX_names[] = {
43 { "READS", cg_eFileType_READS, CGReads15_Make },
44 { "MAPPINGS", cg_eFileType_MAPPINGS, CGMappings15_Make },
45 { "LIB-DNB", cg_eFileType_LIB_DNB, NULL },
46 { "LIB-MATE-GAPS", cg_eFileType_LIB_MATE_GAPS, NULL },
47 { "LIB-SEQDEP-GAPS", cg_eFileType_LIB_SEQDEP_GAPS, NULL },
48 { "REFMETRICS", cg_eFileType_REFMETRICS, NULL },
49 { "DBSNP-TO-CGI", cg_eFileType_DBSNP_TO_CGI, NULL },
50 { "GENE-ANNOTATION", cg_eFileType_GENE_ANNOTATION, NULL },
51 { "SUMMARY-REPORT", cg_eFileType_SUMMARY_REPORT, NULL },
52 { "VAR-ANNOTATION", cg_eFileType_VAR_ANNOTATION, NULL },
53 { "GENE-VAR-SUMMARY-REPORT", cg_eFileType_GENE_VAR_SUMMARY_REPORT, NULL },
54 { "EVIDENCE-CORRELATION", cg_eFileType_EVIDENCE_CORRELATION, NULL },
55 { "EVIDENCE-DNBS", cg_eFileType_EVIDENCE_DNBS, CGEvidenceDnbs15_Make },
56 { "EVIDENCE-INTERVALS",
57 cg_eFileType_EVIDENCE_INTERVALS, CGEvidenceIntervals15_Make },
58 { "DEPTH-OF-COVERAGE", cg_eFileType_DEPTH_OF_COVERAGE, NULL },
59 { "INDEL-LENGTH-CODING", cg_eFileType_INDEL_LENGTH_CODING, NULL },
60 { "INDEL-LENGTH", cg_eFileType_INDEL_LENGTH, NULL },
61 { "SUBSTITUTION-LENGTH-CODING",
62 cg_eFileType_SUBSTITUTION_LENGTH_CODING, NULL },
63 { "SUBSTITUTION-LENGTH", cg_eFileType_SUBSTITUTION_LENGTH, NULL },
64 { "CNV_SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
65 { "CNV-SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
66 { "TUMOR_CNV_SEGMENTS", cg_eFileType_TUMOR_CNV_SEGMENTS, NULL },
67 { "CNV_DETAILS_SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
68 { "CNV-DETAIL-SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
69 { "TUMOR_DETAILS_SCORES", cg_eFileType_TUMOR_DETAILS_SCORES, NULL },
70 { "JUNCTIONS", cg_eFileType_JUNCTIONS, NULL },
71 { "JUNCTION-DNBS", cg_eFileType_JUNCTION_DNBS, NULL },
72 { "VAR-OLPL" , cg_eFileType_VAR_OLPL, NULL },
73 { "MEI" , cg_eFileType_MEI , NULL },
74
75 { "COVERAGE-BY-GC" , cg_eFileType_COVERAGE_BY_GC , NULL },
76 { "COVERAGE-DISTRIBUTION", cg_eFileType_COVERAGE_DISTRIBUTION, NULL },
77
78 /* semi-documented:
79 mentioned in "Data File Formats.File format v1.7.Software v1.12 */
80 { "COVERAGE-BY-GC-CODING", cg_eFileType_COVERAGE_BY_GC , NULL },
81 { "COVERAGE-DISTRIBUTION-CODING",
82 cg_eFileType_COVERAGE_DISTRIBUTION, NULL },
83
84 /* undocumented */
85 { "VAR-OLPL", cg_eFileType_VAR_OLPL, NULL },
86
87 { "TAG_LFR", cg_eFileType_TAG_LFR, CGTagLfr15_Make },
88 };
89
90
CGFile17_Make(const CGFileType ** self,const char * type,const CGLoaderFile * file)91 rc_t CGFile17_Make(const CGFileType** self,
92 const char* type, const CGLoaderFile* file)
93 {
94 return CGLoaderFileMakeCGFileType(file, type,
95 cg_ETypeXX_names, sizeof cg_ETypeXX_names / sizeof cg_ETypeXX_names[0],
96 self);
97 }
98