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__genomic__compart_8cpp_source.html below:

NCBI C++ ToolKit: src/algo/align/util/demo/demo_genomic_compart.cpp Source File

61  virtual void Init

(

void

);

62  virtual int Run

(

void

);

63  virtual void Exit

(

void

);

77

arg_desc->SetUsageContext(

GetArguments

().GetProgramBasename(),

78  "CArgDescriptions demo program"

);

80

arg_desc->AddDefaultKey(

"i"

,

"InputFile"

,

81  "File of ASN text Seq-aligns"

,

85

arg_desc->AddDefaultKey(

"o"

,

"OutputFile"

,

90

arg_desc->AddFlag(

"allow-intersect"

,

91  "Permit compartments to contain intersecting alignments " 92  "provided the alignments are consistent"

);

94

arg_desc->AddFlag(

"allow-intersect-query"

,

95  "Permit compartments to contain intersecting alignments " 96  "for the query only"

);

98

arg_desc->AddFlag(

"allow-intersect-subject"

,

99  "Permit compartments to contain intersecting alignments " 100  "for the subject only"

);

102

arg_desc->AddFlag(

"allow-intersect-both"

,

103  "Permit compartments to contain intersecting alignments " 104  "only if both query and subject intersect"

);

121

list< CRef<CSeq_align> > aligns;

124

unique_ptr<CObjectIStream> is

126  while

( !is->EndOfData() ) {

129

aligns.push_back(align);

136  if

(args[

"allow-intersect"

]) {

139  if

(args[

"allow-intersect-query"

]) {

142  if

(args[

"allow-intersect-subject"

]) {

145  if

(args[

"allow-intersect-both"

]) {

149

list< CRef<CSeq_align_set> > compartments;

153  LOG_POST

(

Error

<<

"output compartments: "

<< compartments.size());

167  LOG_POST

(

Error

<<

" query = "

<< id1 <<

" ("

<<

r1

.GetFrom() + 1 <<

".."

<<

r1

.GetTo() + 1 <<

")"

);

168  LOG_POST

(

Error

<<

" subject = "

<< id2 <<

" ("

<<

r2

.GetFrom() + 1 <<

".."

<<

r2

.GetTo() + 1 <<

")"

);

171  string

title(

"Compartment "

);

176

annot.

SetData

().SetAlign() = (*i)->Get();

198 int main

(

int

argc,

const char

* argv[])

static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)

CRange< TSeqPos > GetSeqRange(TDim row) const

GetSeqRange NB: On a Spliced-seg, in case the product-type is protein, these only return the amin par...

const CSeq_id & GetSeq_id(TDim row) const

Get seq-id (the first one if segments have different ids).

void SetNameDesc(const string &name)

void SetTitleDesc(const string &title)

virtual int Run(void)

Run the application.

virtual void Init(void)

Initialize the application.

virtual void Exit(void)

Cleanup on application exit.

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

void FindCompartments(const list< CRef< CSeq_align > > &aligns, list< CRef< CSeq_align_set > > &align_sets, TCompartOptions options=fCompart_Defaults, float diff_len_filter=3.0f)

@ fCompart_AllowIntersectionsSubject

@ fCompart_AllowIntersectionsBoth

@ fCompart_AllowIntersections

@ fCompart_AllowIntersectionsQuery

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 NON_CONST_ITERATE(Type, Var, Cont)

Non constant version of ITERATE macro.

const CNcbiArguments & GetArguments(void) const

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

@ eInputFile

Name of file (must exist and be readable)

@ eOutputFile

Name of file (must be writable)

#define LOG_POST(message)

This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...

void SetDiagStream(CNcbiOstream *os, bool quick_flush=true, FDiagCleanup cleanup=0, void *cleanup_data=0, const string &stream_name="")

Set diagnostic stream.

void Error(CExceptionArgs_Base &args)

#define MSerial_AsnText

I/O stream manipulators –.

@ eSerial_AsnText

ASN.1 text.

static CSeq_id_Handle GetHandle(const CSeq_id &id)

Normal way of getting a handle, works for any seq-id.

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.

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

IO_PREFIX::istream CNcbiIstream

Portable alias for istream.

static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)

Convert numeric value to string.

void SetSegs(TSegs &value)

Assign a value to Segs data member.

void SetData(TData &value)

Assign a value to Data data member.

Defines the CNcbiApplication and CAppException classes for creating NCBI applications.

Defines command line argument related classes.

Defines unified interface to application:

static const sljit_gpr r1

static const sljit_gpr r2

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