NCBI C++ ToolKit
cuCdUpdateParameters.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: cuCdUpdateParameters.cpp 102007 2024-03-18 15:49:08Z gaudaensj $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Charlie Liu
27  *
28  * File Description:
29  *
30  *
31  * ===========================================================================
32  */
33 
34 #include <ncbi_pch.hpp>
36 #include <stdio.h>
37 
39 BEGIN_SCOPE(cd_utils)
40 
42  "blast",
43  "psi-blast"
44 };
45 
46 string BlastDatabaseNames[] = {
47  "nr",
48  "swissprot",
49  "pdb",
50  "pat",
51  "Yeast",
52  "ecoli",
53  "Drosophila genome",
54  "month",
55  "SMARTBLAST/landmark",
56  "CDSEARCH_TEST/nr_v4",
57  "CDSEARCH_TEST/pdb_v5",
58  "CDSEARCH/CDDupdate"
59 };
60 
61 string OrganismNames[] = {
62  "All organisms",
63  "Cellular organisms",
64  "Viruses",
65  "Archaea",
66  "Bacteria",
67  "Eukaryota",
68  "Viridiplantae",
69  "Fungi",
70  "Metazoa",
71  "Arthropoda",
72  "Vertebrata",
73  "Mammalia",
74  "Rodentia",
75  "Primates"
76 };
77 
79  "unclassified",
80  "environmental samples",
81  "environmental sequence"
82 };
83 
84 
86  : blastType(ePSI_BLAST),
87  database(eNR),
88  organism(eAll_organisms),
89  entrezQuery(),
90  numHits(0),
91  evalue(0.01),
92  timeToCheck(100000),
93  missingResidueThreshold(1),
94  excludingTaxNodes(true),
95  nonRedundify(false),
96  refresh(false),
97  useNRPrefs(false),
98  noFilter(false),
99  replaceOldAcc(true),
100  identityThreshold(-1),
101  allowedOverlapWithCDRow(0),
102  useCustomLocalDB(false),
103  customLocalDBPath("")
104 {
105 }
106 
107 
109 {
110 }
111 
113 {
114  string result("CD-Updating parameters:");
116  result += ',';
118  result += ',';
120  result += ',';
121  result += entrezQuery;
122  result += ',';
123 
124  char evalueStr[100];
125  sprintf(evalueStr,"e-value:%.2e", evalue);
126  result += evalueStr;
127  return result;
128 }
129 
131 {
132  if (bt >= eBlastTypeEnd)
133  return "";
134  else
135  return BlastTypeNames[bt];
136 }
137 
139 {
140  if (db >= eBlastDatabaseEnd)
141  return "";
142  else
143  return BlastDatabaseNames[db];
144 }
145 
147  if (database >= eBlastDatabaseEnd ){
148  return "";
149  } else if (useCustomLocalDB) {
150  return customLocalDBPath;
151  }
153 }
154 
156 {
157  if (org >= eOrganismEnd)
158  return "";
159  else
160  return OrganismNames[org];
161 }
162 
164 {
165  if (et >= eEnvironmentalTaxEnd)
166  return "";
167  else
168  return EnvironmentalTaxNames[et];
169 }
170 
171 END_SCOPE(cd_utils)
static string getBlastTypeName(BlastType bt)
static string getOrganismName(Organism org)
static string getEnvironmentalTaxName(EnvironmentalTax bt)
string BlastDatabaseNames[]
string OrganismNames[]
string BlastTypeNames[]
string EnvironmentalTaxNames[]
@ eEnvironmentalTaxEnd
@ eAll_organisms
@ eOrganismEnd
@ eBlastDatabaseEnd
@ eBlastTypeEnd
#define true
Definition: bool.h:35
#define false
Definition: bool.h:36
string
Definition: cgiapp.hpp:690
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
use only n Cassandra database for the lookups</td > n</tr > n< tr > n< td > yes</td > n< td > do not use tables BIOSEQ_INFO and BLOB_PROP in the Cassandra database
else result
Definition: token2.c:20
Modified on Fri Sep 20 14:58:23 2024 by modify_doxy.py rev. 669887