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, CGReads25_Make },
36 { "MAPPINGS" , cg_eFileType_MAPPINGS, CGMappings25_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 { "IDENTIFIER-MAPPING" , cg_eFileType_IDENTIFIER_MAPPING, NULL },
42 { "DBSNP-TO-CGI" , cg_eFileType_DBSNP_TO_CGI, NULL },
43 { "GENE-ANNOTATION" , cg_eFileType_GENE_ANNOTATION, NULL },
44 { "SUMMARY-REPORT" , cg_eFileType_SUMMARY_REPORT, NULL },
45 { "VAR-ANNOTATION" , cg_eFileType_VAR_ANNOTATION, NULL },
46 { "GENE-VAR-SUMMARY-REPORT", cg_eFileType_GENE_VAR_SUMMARY_REPORT, NULL },
47 { "EVIDENCE-CORRELATION" , cg_eFileType_EVIDENCE_CORRELATION, NULL },
48 { "EVIDENCE-DNBS", cg_eFileType_EVIDENCE_DNBS, CGEvidenceDnbs25_Make },
49 { "EVIDENCE-INTERVALS" , cg_eFileType_EVIDENCE_INTERVALS,
50 CGEvidenceIntervals25_Make },
51 { "COVERAGE-DISTRIBUTION" , cg_eFileType_COVERAGE_DISTRIBUTION, NULL },
52 { "COVERAGE-BY-GC" , cg_eFileType_COVERAGE_BY_GC, NULL },
53 { "DEPTH-OF-COVERAGE" , cg_eFileType_DEPTH_OF_COVERAGE, NULL },
54 { "INDEL-LENGTH-CODING" , cg_eFileType_INDEL_LENGTH_CODING, NULL },
55 { "INDEL-LENGTH" , cg_eFileType_INDEL_LENGTH, NULL },
56 { "SUBSTITUTION-LENGTH-CODING"
57 , cg_eFileType_SUBSTITUTION_LENGTH_CODING, NULL },
58 { "SUBSTITUTION-LENGTH" , cg_eFileType_SUBSTITUTION_LENGTH, NULL },
59 { "CNV_SEGMENTS" , cg_eFileType_CNV_SEGMENTS, NULL },
60 { "CNV-SEGMENTS" , cg_eFileType_CNV_SEGMENTS, NULL },
61 { "TUMOR_CNV_SEGMENTS" , cg_eFileType_TUMOR_CNV_SEGMENTS, NULL },
62 { "TUMOR-CNV-SEGMENTS" , cg_eFileType_TUMOR_CNV_SEGMENTS, NULL },
63 { "CNV_DETAILS_SCORES" , cg_eFileType_CNV_DETAILS_SCORES, NULL },
64 { "CNV-DETAILS-SCORES" , cg_eFileType_CNV_DETAILS_SCORES, NULL },
65 { "CNV-DETAIL-SCORES" , cg_eFileType_CNV_DETAILS_SCORES, NULL },
66 { "TUMOR_DETAILS_SCORES" , cg_eFileType_TUMOR_DETAILS_SCORES, NULL },
67 { "TUMOR-DETAILS-SCORES" , cg_eFileType_TUMOR_DETAILS_SCORES, NULL },
68 { "NONDIPLOID-SOMATIC-CNV-SEGMENTS",
69 cg_eFileType_NONDIPLOID_SOMATIC_CNV_SEGMENTS, NULL },
70 { "NONDIPLOID-SOMATIC-CNV-DETAILS",
71 cg_eFileType_NONDIPLOID_SOMATIC_CNV_DETAILS, NULL },
72 { "JUNCTIONS" , cg_eFileType_JUNCTIONS, NULL },
73 { "JUNCTION-DNBS" , cg_eFileType_JUNCTION_DNBS, NULL },
74 { "SV-EVENTS" , cg_eFileType_SV_EVENTS, NULL },
75 { "VAR-OLPL" , cg_eFileType_VAR_OLPL, NULL },
76 { "MEI" , cg_eFileType_MEI, NULL },
77 /* from Standard Sequencing Service Data File Formats file test */
78 { "TUMOR-CNV-DETAILS", cg_eFileType_TUMOR_CNV_DETAILS, NULL },
79 { "DIPLOID-SOMATIC-CNV-SEGMENTS"
80 , cg_eFileType_DIPLOID_SOMATIC_CNV_SEGMENTS, NULL },
81 { "COVERAGE-DISTRIBUTION-CODING"
82 , cg_eFileType_COVERAGE_DISTRIBUTION_CODING, NULL },
83 { "COVERAGE-BY-GC-CODING", cg_eFileType_COVERAGE_BY_GC_CODING, NULL },
84 { "LIB-SMALL-GAPS-ROLLUP", cg_eFileType_LIB_SMALL_GAPS_ROLLUP, NULL },
85 /* from Cancer Sequencing Service Data File Formats file test */
86 { "DIPLOID-SOMATIC-CNV-DETAILSCORES"
87 , cg_eFileType_DIPLOID_SOMATIC_CNV_DETAIL_SCORES, NULL },
88
89 { "TAG_LFR" , cg_eFileType_TAG_LFR, CGTagLfr25_Make },
90 };
91
CGFile25_Make(const CGFileType ** self,const char * type,const CGLoaderFile * file)92 rc_t CGFile25_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