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

NCBI C++ ToolKit: src/objtools/cddalignview/cav_function.cpp Source File

59 #define NCBI_USE_ERRCODE_X Objtools_CAV_Func 74  static const char

* asciiMimeFirstWord =

"Ncbi-mime-asn1"

;

75  static const char

* asciiCDDFirstWord =

"Cdd"

;

76  bool

isMime =

false

,

isBinary =

true

;

79

asnIstream >> firstWord;

80  if

(firstWord == asciiMimeFirstWord) {

83

}

else if

(firstWord == asciiCDDFirstWord) {

89

unique_ptr<SeqEntryList> newSequences(

new SeqEntryList

());

90

unique_ptr<SeqAnnotList> newAlignments(

new SeqAnnotList

());

103

newSequences->resize(1);

104

newSequences->front().Reset(&(cdd->SetSequences()));

105

*newAlignments = cdd->GetSeqannot();

119  if

(mime->IsStrucseqs()) {

120

*newSequences = mime->GetStrucseqs().GetSequences();

121

*newAlignments = mime->GetStrucseqs().GetSeqalign();

122

}

else if

(mime->IsAlignstruc()) {

123

*newSequences = mime->GetAlignstruc().GetSequences();

124

*newAlignments = mime->GetAlignstruc().GetSeqalign();

125

}

else if

(mime->IsAlignseq()) {

126

*newSequences = mime->GetAlignseq().GetSequences();

127

*newAlignments = mime->GetAlignseq().GetSeqalign();

128

}

else if

(mime->IsGeneral()) {

129  if

(mime->GetGeneral().GetSeq_align_data().IsBundle()) {

130

*newSequences = mime->GetGeneral().GetSeq_align_data().GetBundle().GetSequences();

131

*newAlignments = mime->GetGeneral().GetSeq_align_data().GetBundle().GetSeqaligns();

132

}

else if

(mime->GetGeneral().GetSeq_align_data().IsCdd()) {

133

newSequences->resize(1);

134

newSequences->front().

Reset

(&(mime->SetGeneral().SetSeq_align_data().SetCdd().SetSequences()));

135

*newAlignments = mime->GetGeneral().GetSeq_align_data().GetCdd().GetSeqannot();

142  ERR_POST_X

(3,

Error

<<

"Input is not a recognized data type (Ncbi-mime-asn1 or Cdd) : "

<< err);

145  if

(newSequences->size() == 0 || newAlignments->size() == 0) {

146  ERR_POST_X

(4,

Error

<<

"Cannot find sequences and alignments in the input data!"

);

150

*sequences = newSequences.release();

151

*alignments = newAlignments.release();

160  int

alnLoc, masterLoc, slaveLoc, currentMasterLoc, currentSlaveLoc;

161  char

masterChar, slaveChar;

164  for

(

unsigned int i

=0;

i

<alignmentSet->

alignments

.size(); ++

i

) {

165

masterLoc = slaveLoc = -1;

168  for

(alnLoc=0; alnLoc<(

int

)display->

GetWidth

(); ++alnLoc) {

171

masterChar = display->

GetCharAt

(alnLoc, 0);

172  if

(masterChar ==

'?'

) {

173  ERR_POST_X

(5,

Error

<<

"bad alignment coordinate: loc "

<< (alnLoc+1) <<

" row 1 (master)"

);

176

slaveChar = display->

GetCharAt

(alnLoc, 1 +

i

);

177  if

(slaveChar ==

'?'

) {

178  ERR_POST_X

(6,

Error

<<

"bad alignment coordinate: loc "

<< (alnLoc+1) <<

" row "

<< (

i

+2));

183  if

(!

IsGap

(masterChar)) {

187  ERR_POST_X

(7,

Error

<<

"master sequence too long at alnLoc "

<< (alnLoc+1)

188

<<

" row "

<< (

i

+2) <<

" masterLoc "

<< (masterLoc+1));

190

}

else if

(

toupper

((

unsigned char

) masterChar) !=

192  ERR_POST_X

(8,

Error

<<

"master sequence mismatch at alnLoc "

<< (alnLoc+1)

193

<<

" row "

<< (

i

+2) <<

" masterLoc "

<< (masterLoc+1));

198  if

(!

IsGap

(slaveChar)) {

201  ERR_POST_X

(9,

Error

<<

"slave sequence too long at alnLoc "

<< (alnLoc+1)

202

<<

" row "

<< (

i

+2) <<

" slaveLoc "

<< (slaveLoc+1));

204

}

else if

(

toupper

((

unsigned char

) slaveChar) !=

206  ERR_POST_X

(10,

Error

<<

"slave sequence mismatch at alnLoc "

<< (alnLoc+1)

207

<<

" row "

<< (

i

+2) <<

" slaveLoc "

<< (slaveLoc+1));

211

currentMasterLoc =

IsGap

(masterChar) ? -1 : masterLoc;

212

currentSlaveLoc =

IsGap

(slaveChar) ? -1 : slaveLoc;

216  if

(currentMasterLoc >= 0 && alignment->

masterToSlave

[currentMasterLoc] != -1) {

217  ERR_POST_X

(11,

Error

<<

"slave should be marked aligned at alnLoc "

<< (alnLoc+1)

218

<<

" row "

<< (

i

+2));

224  ERR_POST_X

(12,

Error

<<

" slave marked aligned but master unaligned at alnLoc "

<< (alnLoc+1)

225

<<

" row "

<< (

i

+2));

229  ERR_POST_X

(13,

Error

<<

"slave incorrectly marked aligned at alnLoc "

<< (alnLoc+1)

230

<<

" row "

<< (

i

+2));

233  if

(alignment->

masterToSlave

[currentMasterLoc] != currentSlaveLoc) {

234  ERR_POST_X

(14,

Error

<<

"wrong slave residue aligned at alnLoc "

<< (alnLoc+1)

235

<<

" row "

<< (

i

+2));

241  if

(!

IsGap

(masterChar)) {

244  ERR_POST_X

(15,

Error

<<

"slave should be unaligned at alnLoc "

<< (alnLoc+1)

245

<<

" row "

<< (

i

+2));

250  ERR_POST_X

(16,

Error

<<

"slave should be aligned at alnLoc "

<< (alnLoc+1)

251

<<

" row "

<< (

i

+2));

254  if

(currentSlaveLoc != alignment->

masterToSlave

[currentMasterLoc]) {

255  ERR_POST_X

(17,

Error

<<

"wrong slave residue aligned to master at alnLoc "

<< (alnLoc+1)

256

<<

" row "

<< (

i

+2));

283  unsigned int

options,

284  unsigned int

paragraphWidth,

285  double

conservationThreshhold,

293

IOS_BASE::sync_with_stdio(

true

);

298

outStream = outputStream;

305  if

(diagnosticStream)

317  ERR_POST_X

(19,

Error

<<

"Cannot do condensed display except with text/HTML output"

);

321  ERR_POST_X

(20,

Error

<<

"Cannot do fasta_lc option except with FASTA output"

);

325  ERR_POST_X

(21,

Error

<<

"Cannot do HTML header without HTML output"

);

330

unique_ptr<SequenceSet> sequenceSet(

new SequenceSet

(sequences));

331  if

(!sequenceSet.get() || sequenceSet->Status() !=

CAV_SUCCESS

) {

333  return

sequenceSet->Status();

336  if

(!alignmentSet.get() || alignmentSet->Status() !=

CAV_SUCCESS

) {

338  return

alignmentSet->Status();

342

unique_ptr<AlignmentDisplay> display(

new AlignmentDisplay

(sequenceSet.get(), alignmentSet.get()));

343  if

(!display.get() || display->Status() !=

CAV_SUCCESS

) {

345  return

display->Status();

361

from = (options &

CAV_LEFTTAILS

) ? 0 : display->GetFirstAlignedLoc(),

362

to = (options &

CAV_RIGHTTAILS

) ? display->GetWidth()-1 : display->GetLastAlignedLoc();

367

retval = display->DumpCondensed(*outStream, options,

368

from, to, paragraphWidth, conservationThreshhold, title, nFeatures, alnFeatures);

370

retval = display->DumpText(*outStream, options,

371

from, to, paragraphWidth, conservationThreshhold, title, nFeatures, alnFeatures);

373

retval = display->DumpFASTA(from, to, paragraphWidth,

386  const void

*asnDataBlock,

388  unsigned int

options,

389  unsigned int

paragraphWidth,

390  double

conservationThreshhold,

403  CNcbiIstrstream

asnIstrstream(

static_cast<const char

*

>

(asnDataBlock));

415

unique_ptr<const SeqEntryList> sequences(seqs);

416

unique_ptr<const SeqAnnotList> alignments(alns);

419

title, nFeatures, alnFeatures, outputStream, diagnosticStream);

423  const void

*asnDataBlock,

425  unsigned int

options,

426  unsigned int

paragraphWidth,

427  double

conservationThreshhold,

433

conservationThreshhold, title, nFeatures, features,

NULL

,

NULL

);

437  const

ncbi::objects::CNcbi_mime_asn1& mime,

438  unsigned int

options,

439  unsigned int

paragraphWidth,

440  double

conservationThreshhold,

451  if

(mime.IsStrucseqs()) {

452

sequences = &(mime.GetStrucseqs().GetSequences());

453

alignments = &(mime.GetStrucseqs().GetSeqalign());

454

}

else if

(mime.IsAlignstruc()) {

455

sequences = &(mime.GetAlignstruc().GetSequences());

456

alignments = &(mime.GetAlignstruc().GetSeqalign());

457

}

else if

(mime.IsAlignseq()) {

458

sequences = &(mime.GetAlignseq().GetSequences());

459

alignments = &(mime.GetAlignseq().GetSeqalign());

460

}

else if

(mime.IsGeneral()) {

461  if

(mime.GetGeneral().GetSeq_align_data().IsBundle()) {

462

sequences = &(mime.GetGeneral().GetSeq_align_data().GetBundle().GetSequences());

463

alignments = &(mime.GetGeneral().GetSeq_align_data().GetBundle().GetSeqaligns());

464

}

else if

(mime.GetGeneral().GetSeq_align_data().IsCdd()) {

465

localSeqList.resize(1);

466

localSeqList.front().Reset(

const_cast<CSeq_entry

*

>

(&(mime.GetGeneral().GetSeq_align_data().GetCdd().GetSequences())));

467

sequences = &localSeqList;

468

alignments = &(mime.GetGeneral().GetSeq_align_data().GetCdd().GetSeqannot());

472  if

(!sequences || !alignments) {

473  ERR_POST_X

(31,

Error

<<

"Ncbi-mime-asn1 object is not of recognized type"

);

477  return CAV_DisplayMultiple

(*sequences, *alignments, options, paragraphWidth, conservationThreshhold,

478

title, nFeatures, features, outputStream, diagnosticStream);

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.

User-defined methods of the data storage class.

list< CRef< objects::CSeq_annot > > SeqAnnotList

bool IsUnaligned(char ch)

bool ReadASNFromIstream(CNcbiIstream &inStream, ASNClass &ASNobject, bool isBinary, string &err)

static bool VerifyAlignmentData(const AlignmentSet *alignmentSet, const AlignmentDisplay *display)

int CAV_DisplayMultiple(const SeqEntryList &sequences, const SeqAnnotList &alignments, unsigned int options, unsigned int paragraphWidth, double conservationThreshhold, const char *title, int nFeatures, const AlignmentFeature *alnFeatures, CNcbiOstream *outputStream, CNcbiOstream *diagnosticStream)

static int LoadASNFromIstream(CNcbiIstream &asnIstream, const SeqEntryList **sequences, const SeqAnnotList **alignments)

static EDiagSev defaultDiagPostLevel

list< CRef< objects::CSeq_entry > > SeqEntryList

C interface header for cddalignview as function call.

#define CAV_IGNORE_BAD_ALN

#define CAV_ERROR_DISPLAY

#define CAV_SHOW_IDENTITY

#define CAV_FASTA_LOWERCASE

#define CAV_ERROR_BAD_PARAMS

#define CAV_ERROR_BAD_ASN

#define CAV_NO_CHANGE_DIAG

unsigned int GetWidth(void) const

static const double SHOW_IDENTITY

char GetCharAt(int alnLoc, int row) const

ResidueVector masterToSlave

EDiagSev SetDiagPostLevel(EDiagSev post_sev=eDiag_Error)

Set the threshold severity for posting the messages.

#define ERR_POST_X(err_subcode, message)

Error posting with default error code and given error subcode.

EDiagSev

Severity level for the posted diagnostics.

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

Set diagnostic stream.

@ eDiag_Info

Informational message.

@ eDiag_Error

Error message.

@ eDiag_Fatal

Fatal error – guarantees exit(or abort)

void Critical(CExceptionArgs_Base &args)

void Error(CExceptionArgs_Base &args)

void Info(CExceptionArgs_Base &args)

void Reset(void)

Reset reference object.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

IO_PREFIX::istream CNcbiIstream

Portable alias for istream.

unsigned int

A callback function used to compare two keys in a database.

Defines NCBI C++ diagnostic APIs, classes, and macros.

The NCBI C++/STL use hints.

NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.


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