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

NCBI C++ ToolKit: src/objtools/alnmgr/demo/alnmrg.cpp Source File

73  virtual void Init

(

void

);

74  virtual int Run

(

void

);

104

cerr << name <<

"..."

<< endl;

108

cerr << completed <<

" out of "

<<

m_Total

<< endl;

129

arg_desc->SetUsageContext

131  "Alignment merger demo program"

);

134

arg_desc->AddDefaultKey

135

(

"in"

,

"input_file_name"

,

136  "Name of file to read from (standard input by default)"

,

139

arg_desc->AddDefaultKey

140

(

"asnout"

,

"asn_out_file_name"

,

144

arg_desc->AddOptionalKey

145

(

"asnoutb"

,

"asn_out_file_name_b"

,

146  "Text ASN output, to a file opened in binary mode (for MS-Win tests)"

,

149

arg_desc->AddDefaultKey

150

(

"b"

,

"bin_obj_type"

,

151  "This forced the input file to be read in binary ASN.1 mode\n" 152  "and specifies the type of the top-level ASN.1 object.\n"

,

155

arg_desc->AddDefaultKey

157  "This forced the output file to be written in binary ASN.1 mode.\n"

,

160

arg_desc->AddOptionalKey

161

(

"log"

,

"log_file_name"

,

162  "Name of log file to write to"

,

165

arg_desc->AddDefaultKey

167  "Output in Dense-seg format"

,

170

arg_desc->AddDefaultKey

171

(

"gapjoin"

,

"bool"

,

172  "Consolidate segments of equal lens with a gap on the query sequence"

,

175

arg_desc->AddDefaultKey

176

(

"mingap"

,

"bool"

,

177  "Consolidate all segments with a gap on the query sequence"

,

180

arg_desc->AddDefaultKey

181

(

"rmleadtrailgaps"

,

"bool"

,

182  "Remove leading and trailing gaps"

,

185

arg_desc->AddDefaultKey

186

(

"minusstrand"

,

"bool"

,

187  "Minus strand on the refseq when merging."

,

190

arg_desc->AddDefaultKey

191

(

"fillunaln"

,

"bool"

,

192  "Fill unaligned regions."

,

195

arg_desc->AddDefaultKey

196

(

"calcscore"

,

"bool"

,

197  "Calculate each aligned seq pair score and use it when merging." 198  "(Don't stitch off ObjMgr for this)."

,

201

arg_desc->AddDefaultKey

202

(

"sortseqsbyscore"

,

"bool"

,

203  "Sort sequences by score."

,

206

arg_desc->AddDefaultKey

207

(

"sortinputbyscore"

,

"bool"

,

208  "Sort input by score."

,

211

arg_desc->AddDefaultKey

212

(

"noobjmgr"

,

"bool"

,

215  "Skip ObjMgr in identifying sequences, calculating scores, etc."

,

218

arg_desc->AddOptionalKey

219

(

"se_in"

,

"SeqEntryInputFile"

,

220  "An optional Seq-entry file to load a local top level seq entry from."

,

223

arg_desc->AddOptionalKey

224

(

"fasta_in"

,

"FastaFile"

,

225  "An optional FASTA file to load into ObjMgr's scope."

,

228

arg_desc->AddOptionalKey

229

(

"blastdb"

,

"BlastDb"

,

230  "Add an optional BLAST dataloader to ObjMgr's scope."

,

233

arg_desc->AddDefaultKey

234

(

"queryseqmergeonly"

,

"bool"

,

235  "Merge the query seq only, keep subject seqs on separate rows " 236  "(even if the same seq)."

,

239

arg_desc->AddDefaultKey

240

(

"truncateoverlaps"

,

"bool"

,

241  "Truncate overlaps"

,

244

arg_desc->AddDefaultKey

245

(

"allowtranslocation"

,

"bool"

,

246  "Allow translocation"

,

249

arg_desc->AddDefaultKey

250

(

"forcetranslation"

,

"bool"

,

251  "Force translation of nucleotides"

,

254

arg_desc->AddDefaultKey

255

(

"preserverows"

,

"bool"

,

261

arg_desc->AddOptionalKey

265  " 2. Print segments\n" 267  " 4. Popset style using GetAlnSeqString\n" 268  " (memory efficient for large alns, but slower)\n" 269  " 5. Popset style using GetSeqString\n" 270  " (memory inefficient)\n" 271  " 6. Popset style using GetWholeAlnSeqString\n" 272  " (fastest, but memory inefficient)\n"

,

275

arg_desc->AddOptionalKey

276

(

"a"

,

"AnchorRow"

,

277  "Anchor row (zero based)"

,

280

arg_desc->AddDefaultKey

281

(

"w"

,

"ScreenWidth"

,

282  "Screen width for some of the viewers"

,

285

arg_desc->AddDefaultKey

286

(

"cf"

,

"GetChunkFlags"

,

287  "Flags for GetChunks (CAlnMap::TGetChunkFlags)"

,

290

arg_desc->AddDefaultKey

291

(

"progress"

,

"bool"

,

292  "Show progress feedback on stderr"

,

317  if

( args[

"log"

] ) {

326  if

(args[

"gapjoin"

] && args[

"gapjoin"

].AsBoolean()) {

330  if

(args[

"mingap"

] && args[

"mingap"

].AsBoolean()) {

334  if

(args[

"rmleadtrailgaps"

] && args[

"rmleadtrailgaps"

].AsBoolean()) {

338  if

(args[

"minusstrand"

] && args[

"minusstrand"

].AsBoolean()) {

342  if

(args[

"queryseqmergeonly"

] && args[

"queryseqmergeonly"

].AsBoolean()) {

346  if

(args[

"fillunaln"

] && args[

"fillunaln"

].AsBoolean()) {

350  if

(args[

"truncateoverlaps"

] && args[

"truncateoverlaps"

].AsBoolean()) {

354  if

(args[

"allowtranslocation"

] && args[

"allowtranslocation"

].AsBoolean()) {

358  if

(args[

"forcetranslation"

] && args[

"forcetranslation"

].AsBoolean()) {

362  if

(args[

"preserverows"

] && args[

"preserverows"

].AsBoolean()) {

366  if

(args[

"calcscore"

] && args[

"calcscore"

].AsBoolean()) {

370  if

(args[

"sortseqsbyscore"

] && args[

"sortseqsbyscore"

].AsBoolean()) {

374  if

(args[

"sortinputbyscore"

] && args[

"sortinputbyscore"

].AsBoolean()) {

378  if

( !(args[

"noobjmgr"

] && args[

"noobjmgr"

].AsBoolean()) ) {

380  if

(args[

"se_in"

]) {

383  if

(args[

"fasta_in"

]) {

384  LoadFasta

(args[

"fasta_in"

].AsInputFile());

386  if

(args[

"blastdb"

]) {

397

unique_ptr<CObjectIStream> obj_is

400

se_asn_type = obj_is->ReadFileHeader();

405

unique_ptr<CObjectIStream> obj_is

408  if

(se_asn_type ==

"Seq-entry"

) {

414  "se_in only accepts a Seq-entry should be supplied in a text asn.1 file."

);

450

unique_ptr<CObjectOStream> asn_out

452

(args[

"bout"

] && args[

"bout"

].AsBoolean() ?

455

args[

"asnoutb"

].AsOutputFile() : args[

"asnout"

].AsOutputFile()));

457  if

(args[

"dsout"

] && args[

"dsout"

].AsBoolean()) {

469  int

screen_width = args[

"w"

].AsInteger();

475

aln_vec.

SetAnchor

(args[

"a"

].AsInteger());

479  switch

(args[

"v"

].AsInteger()) {

512  string

sname = args[

"in"

].AsString();

515  string

asn_type = args[

"b"

].AsString();

516  bool

binary = !asn_type.empty();

517

unique_ptr<CObjectIStream>

in 536  if

(args[

"progress"

] && args[

"progress"

].AsBoolean()) {

556 int main

(

int

argc,

const char

* argv[])

User-defined methods of the data storage class.

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

Data loader implementation that uses the blast databases.

Helper class for reading seq-align objects from a CObjectIStream.

void Read(CObjectIStream *obj_in_stream, TCallback callback, const string &top_level_asn_object=kEmptyStr)

Read all seq-align objects from the stream.

void Chunks(CAlnMap::TGetChunkFlags flags=CAlnMap::fAlnSegsOnly)

void CsvTable(char delim=',')

Printing methods.

void SetAnchor(TNumrow anchor)

void Add(const CDense_seg &ds, TAddFlags flags=0)

void Merge(TMergeFlags flags=0)

const CSeq_align & GetSeqAlign(void) const

const CDense_seg & GetDenseg(void) const

void LoadBlastDb(const string &db)

CRef< CObjectManager > m_ObjMgr

virtual void Init(void)

Initialize the application.

virtual int Run(void)

Run the application.

void LoadSeqEntry(CNcbiIstream &is)

CAlnMix::TMergeFlags m_MergeFlags

CScope & GetScope(void) const

void LoadFasta(CNcbiIstream &is)

CAlnMix::TAddFlags m_AddFlags

void PrintMergedAln(void)

bool AddAlnToMix(const CSeq_align *aln)

virtual void SetTaskCompleted(int completed)

virtual bool InterruptTask()

virtual void SetTaskName(const string &name)

virtual void SetTaskTotal(int total)

void PopsetStyle(int scrn_width=70, EAlgorithm algorithm=eUseAlnSeqString)

Printing methods.

@ eUseWholeAlnSeqString

memory efficient, recommended for large alns

@ eUseAlnSeqString

memory ineficient

void SetEndChar(TResidue gap_char)

void SetGapChar(TResidue gap_char)

static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const string &dbname="nr", const EDbType dbtype=eUnknown, bool use_fixed_size_slices=true, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)

@ eNucleotide

nucleotide database

Base class for reading FASTA sequences.

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

void SetTaskProgressCallback(ITaskProgressCallback *callback)

Hook a callback to a task.

Task clients implement this callback interface.

Operators to edit gaps in sequences.

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.

@ fBinary

Open as binary file; for eInputFile, eOutputFile, eIOFile.

@ fPreOpen

Open file right away; for eInputFile, eOutputFile, eIOFile.

@ eInputFile

Name of file (must exist and be readable)

@ eBoolean

{'true', 't', 'false', 'f'}, case-insensitive

@ eString

An arbitrary string.

@ eOutputFile

Name of file (must be writable)

@ eInteger

Convertible into an integer number (int or Int8)

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

Set diagnostic stream.

@ eDS_Default

Try standard log file (app.name + ".log") in /log/, use stderr on failure.

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

@ eSerial_AsnText

ASN.1 text.

@ eSerial_AsnBinary

ASN.1 binary.

CRef< CSeq_entry > ReadSet(int max_seqs=kMax_Int, ILineErrorListener *pMessageListener=nullptr)

Read multiple sequences (by default, as many as are available.)

@ fRequireID

Reject deflines that lack IDs.

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.

TLoader * GetLoader(void) const

Get pointer to the loader.

void AddDataLoader(const string &loader_name, TPriority pri=kPriority_Default)

Add data loader by name.

static CRef< CObjectManager > GetInstance(void)

Return the existing object manager or create one.

CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)

Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...

string GetName(void) const

void AddDefaults(TPriority pri=kPriority_Default)

Add default data loaders from object manager.

void Reset(void)

Reset reference object.

TObjectType * GetPointerOrNull(void) THROWS_NONE

Get pointer value.

IO_PREFIX::istream CNcbiIstream

Portable alias for istream.

char * dbname(DBPROCESS *dbproc)

Get name of current database.

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:

std::istream & in(std::istream &in_, double &x_)


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