std::vector< std::string >& );
108arg_desc->SetUsageContext(
110 "Convert foreign ids to GI numbers",
115 "Map in opposite direction",
118arg_desc->AddDefaultKey(
"genome",
120 "Source build or genome number",
124arg_desc->AddOptionalKey(
"mapfile",
126 "Mapper configuration file",
129arg_desc->AddDefaultKey(
"mapdb",
131 "Mapper database in the form \"host:database\"",
146vector< string > SourceIds;
149vector<string>::iterator it;
150 for( it = SourceIds.begin(); it != SourceIds.end(); ++it ) {
151 stringstrSource = *it;
156cout << strSource <<
" : "<< strTarget << endl;
168 stringstrGenome =
GetArgs()[
"genome"].AsString();
169 stringstrMapFile =
GetArgs()[
"mapfile"].AsString();
170 stringstrMapDb =
GetArgs()[
"mapdb"].AsString();
171 boolbReverse =
GetArgs()[
"reverse"];
173 if( strGenome.empty() && strMapFile.empty() && strMapDb.empty() ) {
174 return new CIdMapper( strGenome, bReverse );
176 if( !strMapFile.empty() ) {
180 if( !strMapDb.empty() ) {
192vector< string >& Ids )
196 for(
unsigned intu = 1; u <= args.
GetNExtra(); ++u ) {
197Ids.push_back( args[ u ].AsString() );
204 const string& strSource )
232 int main(
intargc,
const char** argv)
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
int main(int argc, const char **argv)
void Init()
Initialize the application.
void GetSourceIds(std::vector< std::string > &)
string GetTargetString(CSeq_id_Handle)
CSeq_id_Handle GetSourceHandle(const std::string &)
int Run()
Run the application.
IdMapper implementation using hardcoded values.
IdMapper implementation using an external configuration file.
IdMapper implementation using an external database.
IdMapper base class implementation.
virtual CSeq_id_Handle Map(const CSeq_id_Handle &)
Map a single given CSeq_id_Handle to another.
Include a standard set of the NCBI C++ Toolkit most basic headers.
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
const CNcbiArguments & GetArguments(void) const
Get the application's cached unprocessed command-line arguments.
size_t GetNExtra(void) const
Get the number of unnamed positional (a.k.a. extra) args.
@ eInputFile
Name of file (must exist and be readable)
@ eString
An arbitrary string.
@ eDS_ToStderr
To standard error stream.
static CSeq_id_Handle GetGiHandle(TGi gi)
Faster way to create a handle for a gi.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
string AsString(void) const
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
Split a string into two pieces using the specified delimiters.
@ fConvErr_NoThrow
Do not throw an exception on error.
const CharType(& source)[N]
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4