A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/demo__align__cleanup_8cpp_source.html below:

NCBI C++ ToolKit: src/algo/align/advanced_cleanup/demo/demo_align_cleanup.cpp Source File

61  virtual void Init

(

void

);

62  virtual int Run

(

void

);

63  virtual void Exit

(

void

);

73

arg_desc->SetUsageContext(

GetArguments

().GetProgramBasename(),

74  "Assembly alignment cleanup program"

);

78

arg_desc->AddDefaultKey(

"ifmt"

,

"InputFormat"

,

79  "Format for input file"

,

82

arg_desc->SetConstraint(

"ifmt"

,

84  "seq-align"

,

"seq-align-set"

,

"seq-annot"

));

86

arg_desc->AddDefaultKey(

"query-type"

,

"QueryType"

,

87  "Type of query sequences"

,

90

arg_desc->SetConstraint(

"query-type"

,

92  "auto"

,

"genomic"

,

"rna"

,

"protein"

));

96

arg_desc->AddDefaultKey

97

(

"splign-direction"

,

"SplignDirection"

,

"Query direction for splign"

,

99

arg_desc->SetConstraint(

"splign-direction"

,

101  "sense"

,

"antisense"

,

"both"

));

103

arg_desc->AddFlag(

"with-best-placement"

,

104  "Invoke best placement algorithm on alignments."

);

107

arg_desc->AddDefaultKey(

"o"

,

"Output"

,

108  "Output cleaned alignments"

,

110

arg_desc->AddAlias(

"output"

,

"o"

);

112

arg_desc->AddFlag(

"t"

,

113  "Both input and output data streams are " 114  "ASN.1 text, not binary."

);

115

arg_desc->AddFlag(

"it"

,

"Input data streams are ASN.1 text, not binary."

);

116

arg_desc->AddFlag(

"ot"

,

"Output data streams are ASN.1 text, not binary."

);

148  if

(args[

"query-type"

].AsString() ==

"genomic"

) {

150

}

else if

(args[

"query-type"

].AsString() ==

"rna"

) {

152

}

else if

(args[

"query-type"

].AsString() ==

"protein"

) {

158  if

(args[

"splign-direction"

].AsString() ==

"sense"

) {

160

}

else if

(args[

"splign-direction"

].AsString() ==

"antisense"

) {

171

unique_ptr<CObjectIStream> is(

173  while

(!is->EndOfData()) {

174  if

(args[

"ifmt"

].AsString() ==

"seq-align"

) {

177

input_aligns.push_back(align);

178

}

else if

(args[

"ifmt"

].AsString() ==

"seq-align-set"

) {

181

input_aligns.insert(input_aligns.end(),

182

align->

Get

().begin(), align->

Get

().end());

183

}

else if

(args[

"ifmt"

].AsString() ==

"seq-annot"

) {

186

input_aligns.insert(input_aligns.end(),

196  cleanup

.Cleanup(input_aligns, cleaned_aligns, query_type,

197

args[

"with-best-placement"

],

false

, splign_dir);

199

unique_ptr<CObjectOStream> os(

216 main

(

int

argc,

const char

* argv[])

static void SetupArgDescriptions(CArgDescriptions &arg_desc)

virtual void Init(void)

Initialize the application.

virtual void Exit(void)

Cleanup on application exit.

virtual int Run(void)

Run the application.

static void SetupObjectManager(const CArgs &args, objects::CObjectManager &obj_mgr, TLoaders loaders=fDefault)

Set up the standard object manager data loaders according to the arguments provided above.

static void AddArgumentDescriptions(CArgDescriptions &arg_desc, TLoaders loaders=fDefault)

Add a standard set of arguments used to configure the object manager.

class CInputStreamSource encapsulates details of how we supply applications with input data through s...

static void SetStandardInputArgs(CArgDescriptions &arg_desc, const string &prefix="input", const string &description="data to process", bool is_mandatory=false)

Supply a standard set of arguments via argument descriptions to an application.

int main(int argc, const char *argv[])

static void cleanup(void)

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.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

const CNcbiArguments & GetArguments(void) const

Get the application's cached unprocessed command-line arguments.

@ eString

An arbitrary string.

@ eOutputFile

Name of file (must be writable)

ESerialDataFormat

Data file format.

@ eSerial_AsnText

ASN.1 text.

@ eSerial_AsnBinary

ASN.1 binary.

static CObjectOStream * Open(ESerialDataFormat format, CNcbiOstream &outStream, bool deleteOutStream)

Create serial object writer and attach it to an output stream.

static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)

Create serial object reader and attach it to an input stream.

static CRef< CObjectManager > GetInstance(void)

Return the existing object manager or create one.

void AddDefaults(TPriority pri=kPriority_Default)

Add default data loaders from object manager.

list< CRef< CSeq_align > > Tdata

const Tdata & Get(void) const

Get the member data.

const TAlign & GetAlign(void) const

Get the variant data.

const TData & GetData(void) const

Get the Data member data.

Magic spell ;-) needed for some weird compilers... very empiric.

Defines the CNcbiApplication and CAppException classes for creating NCBI applications.

Defines command line argument related classes.

Defines unified interface to application:

Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...

CRef< objects::CObjectManager > om


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