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 #include "factory-evidence-dnbs.h"
27 #include "factory-evidence-intervals.h"
28 #include "factory-mappings.h"
29 #include "factory-reads.h"
30 #include "factory-tag-lfr.h"
31
32 #include "file.h"
33
34 static const CGFileTypeFactory cg_ETypeXX_names[] = {
35 { "READS", cg_eFileType_READS, CGReads20_Make },
36 { "MAPPINGS", cg_eFileType_MAPPINGS, CGMappings20_Make },
37 { "LIB-DNB", cg_eFileType_LIB_DNB, NULL },
38 { "LIB-MATE-GAPS", cg_eFileType_LIB_MATE_GAPS, NULL },
39 { "LIB-SEQDEP-GAPS", cg_eFileType_LIB_SEQDEP_GAPS, NULL },
40 { "REFMETRICS", cg_eFileType_REFMETRICS, NULL },
41 { "DBSNP-TO-CGI", cg_eFileType_DBSNP_TO_CGI, NULL },
42 { "GENE-ANNOTATION", cg_eFileType_GENE_ANNOTATION, NULL },
43 { "SUMMARY-REPORT", cg_eFileType_SUMMARY_REPORT, NULL },
44 { "VAR-ANNOTATION", cg_eFileType_VAR_ANNOTATION, NULL },
45 { "GENE-VAR-SUMMARY-REPORT", cg_eFileType_GENE_VAR_SUMMARY_REPORT, NULL },
46 { "EVIDENCE-CORRELATION", cg_eFileType_EVIDENCE_CORRELATION, NULL },
47 { "EVIDENCE-DNBS", cg_eFileType_EVIDENCE_DNBS, CGEvidenceDnbs20_Make },
48 { "EVIDENCE-INTERVALS",
49 cg_eFileType_EVIDENCE_INTERVALS, CGEvidenceIntervals20_Make },
50 { "COVERAGE-DISTRIBUTION", cg_eFileType_COVERAGE_DISTRIBUTION, NULL },
51 { "COVERAGE-BY-GC", cg_eFileType_COVERAGE_BY_GC, NULL },
52 { "DEPTH-OF-COVERAGE", cg_eFileType_DEPTH_OF_COVERAGE, NULL },
53 { "INDEL-LENGTH-CODING", cg_eFileType_INDEL_LENGTH_CODING, NULL },
54 { "INDEL-LENGTH", cg_eFileType_INDEL_LENGTH, NULL },
55 { "SUBSTITUTION-LENGTH-CODING",
56 cg_eFileType_SUBSTITUTION_LENGTH_CODING, NULL },
57 { "SUBSTITUTION-LENGTH", cg_eFileType_SUBSTITUTION_LENGTH, NULL },
58 { "CNV_SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
59 { "CNV-SEGMENTS", cg_eFileType_CNV_SEGMENTS, NULL },
60 { "TUMOR_CNV_SEGMENTS", cg_eFileType_TUMOR_CNV_SEGMENTS, NULL },
61 { "TUMOR-CNV-SEGMENTS", cg_eFileType_TUMOR_CNV_SEGMENTS, NULL },
62 { "CNV_DETAILS_SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
63 { "CNV-DETAILS-SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
64 { "CNV-DETAIL-SCORES", cg_eFileType_CNV_DETAILS_SCORES, NULL },
65 { "TUMOR_DETAILS_SCORES", cg_eFileType_TUMOR_DETAILS_SCORES, NULL },
66 { "TUMOR-DETAILS-SCORES", cg_eFileType_TUMOR_DETAILS_SCORES, NULL },
67 { "JUNCTIONS", cg_eFileType_JUNCTIONS, NULL },
68 { "JUNCTION-DNBS", cg_eFileType_JUNCTION_DNBS, NULL },
69 { "SV-EVENTS", cg_eFileType_SV_EVENTS, NULL },
70 { "VAR-OLPL", cg_eFileType_VAR_OLPL, NULL },
71 { "MEI", cg_eFileType_MEI, NULL },
72 /* from the documentation */
73 { "TUMOR-CNV-DETAILS", cg_eFileType_TUMOR_CNV_DETAILS, NULL },
74 { "DIPLOID-SOMATIC-CNV-SEGMENTS",
75 cg_eFileType_DIPLOID_SOMATIC_CNV_SEGMENTS, NULL },
76 { "COVERAGE-DISTRIBUTION-CODING",
77 cg_eFileType_COVERAGE_DISTRIBUTION_CODING, NULL },
78 { "COVERAGE-BY-GC-CODING", cg_eFileType_COVERAGE_BY_GC_CODING, NULL },
79 { "LIB-SMALL-GAPS-ROLLUP", cg_eFileType_LIB_SMALL_GAPS_ROLLUP, NULL },
80
81 { "TAG_LFR", cg_eFileType_TAG_LFR, CGTagLfr15_Make },
82
83 /* VDB-1383 */
84 { "NONDIPLOID-SOMATIC-CNV-SEGMENTS",
85 cg_eFileType_NONDIPLOID_SOMATIC_CNV_SEGMENTS, NULL },
86 { "NONDIPLOID-SOMATIC-CNV-DETAILS",
87 cg_eFileType_NONDIPLOID_SOMATIC_CNV_DETAILS, NULL },
88 { "DIPLOID-SOMATIC-CNV-DETAIL-SCORES",
89 cg_eFileType_DIPLOID_SOMATIC_CNV_DETAIL_SCORES, NULL },
90 };
91
CGFile20_Make(const CGFileType ** self,const char * type,const CGLoaderFile * file)92 rc_t CGFile20_Make(const CGFileType** self,
93 const char* type, const CGLoaderFile* file)
94 {
95 return CGLoaderFileMakeCGFileType(file, type,
96 cg_ETypeXX_names, sizeof cg_ETypeXX_names / sizeof cg_ETypeXX_names[0],
97 self);
98 }
99