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

NCBI C++ ToolKit: src/algo/structure/cd_utils/cuCD.cpp Source File

80  if

(!cd->AlignAnnotsValid()) {

96

list< CRef< CCdd_descr > >& cdDescrList = cd->

SetDescription

().Set();

97

list< CRef< CCdd_descr > >::iterator lit = cdDescrList.begin();

98  while

(lit != cdDescrList.end())

100  if

((*lit)->IsRepeats())

101

lit = cdDescrList.erase(lit);

111  if

(!pCD->

IsSeqAligns

() || positions.size() == 0)

115

list< CRef< CSeq_align > >& alignments = pCD->

GetSeqAligns

();

116  if

(alignments.size() != positions.size())

119

vector<CRef< CSeq_align > > temp(alignments.size());

120

list<CRef< CSeq_align > >::iterator lit = alignments.begin();

123  for

(;lit != alignments.end(); lit++)

126  if

(positions[

row

] >= (

int

) temp.size())

128

temp[positions[

row

]] = *lit;

138  for

(

unsigned int i

= 0;

i

< temp.size();

i

++)

140

alignments.push_back(temp[

i

]);

152

TStructureAlignments::iterator saListIt, saListEnd;

156

TSAMap::iterator saMapIt, saMapEnd;

162  if

(

nRows

-1 != positions.size())

169

TStructureAlignments& saList = pCD->

SetFeatures

().SetFeatures().front()->SetFeatures();

170

saListIt = saList.begin();

171

saListEnd = saList.end();

178  for

(

i

= 0;

i

< (

nRows

- 1) && saListIt != saListEnd; ++

i

) {

190  if

(nPDBs == n3DAlign) {

192

saMapIt = saMapTmp.begin();

193

saMapEnd = saMapTmp.end();

194  for

(; saMapIt != saMapEnd; ++saMapIt) {

195

saList.push_back(saMapIt->second);

208

list< CRef< CCdd_descr > > & descList = cd->

SetDescription

().Set();

209

list< CRef< CCdd_descr > >::iterator it = descList.begin();

210  for

(; it != descList.end(); it++)

212  if

((*it)->IsCreate_date())

222

dateDesc->SetCreate_date(*curDate);

223

descList.push_back(dateDesc);

235

list< CRef< CCdd_descr > > & descList = cd->

SetDescription

().Set();

236

list< CRef< CCdd_descr > >::iterator it = descList.begin();

237  for

(; it != descList.end(); it++)

239  if

((*it)->IsUpdate_date())

249

dateDesc->SetUpdate_date(*curDate);

250

descList.push_back(dateDesc);

300  int

Lower, Upper, Lower2, Upper2;

320  for

(

int

j=0; j<NumMatches; j++) {

324  if

(((Lower2 >= Lower) && (Lower2 <= Upper)) ||

325

((Upper2 >= Lower) && (Upper2 <= Upper)) ||

326

((Lower2 <= Lower) && (Upper2 >= Upper)) ||

327

((Lower2 >= Lower) && (Upper2 <= Upper))) {

328

rows2.push_back(matches[j]);

330

}

else if

(cd1AsChild) {

331  if

((Lower2 >= Lower) && (Upper2 <= Upper)) {

332

rows2.push_back(matches[j]);

335  if

((Lower2 <= Lower) && (Upper2 >= Upper)) {

336

rows2.push_back(matches[j]);

360  bool

sameCD = (cd1 == cd2 || !cd2) ?

true

:

false

;

365  if

(cd1 ==

NULL

&& cd2 ==

NULL

)

return

0;

366  if

(sameCD && !cd2) {

371  for

(RowIndex1=0; RowIndex1<NumRows; RowIndex1++) {

373

NumMatches =

GetMappedRowIds

(cd1, RowIndex1, cd2, matches,

true

,

true

);

376  if

(sameCD && NumMatches == 1) {

381  for

(

int

j=0; j<NumMatches; j++) {

383  if

(sameCD && matches[j] == RowIndex1) {

387

rowsOfCD1.push_back(RowIndex1);

388

rowsOfCD2.push_back(matches[j]);

392  return

rowsOfCD1.size();

401

vector<int> rows1, rows2;

407  if

(!cd || (convertedSequences.size() > 0 && !forceRecompute)) {

413

convertedSequences.clear();

414  for

(

int i

= 0;

i

< numSeq; ++

i

) {

432  if

(ppAlignedResidues ==

NULL

) {

433

ppAlignedResidues =

new char

*[numRows];

434  for

(

int i

=0;

i

<numRows;

i

++) {

435

ppAlignedResidues[

i

] =

new char

[numAligned]{ 0 };

440

}

else if

(!forceRecompute) {

444  for

(

int i

= 0;

i

< numRows;

i

++) {

448

isMaster = (

i

== 0);

457  bool

isOK =

true

, useRefRow =

true

;

459  unsigned int i

, col,

row

, pos, mapIndex,

nRows

, nCols, nBlocks;

460  char

** alignedResidues =

NULL

;

461  string

rowString, colString;

465

vector<int> starts, lengths;

477  ERR_POST

(

"Creation of MultipleAlignment object failed for CD "

<< cd->

GetAccession

() <<

"."

);

481  ERR_POST

(

"CD "

<< cd->

GetAccession

() <<

" must have a consistent block structure for column extraction."

);

495  if

(referenceRow >=

nRows

) {

507

nBlocks = starts.size();

508  if

(nBlocks == lengths.size()) {

509  for

(

i

= 0, col = 0;

i

< nBlocks; ++

i

) {

510

pos = (useRefRow) ? starts[

i

] : col;

511  for

(j = 0; j < lengths[

i

]; ++j, ++col, ++pos) {

527  if

(isOK && alignedResidues) {

528  for

(col = 0; col < nCols; ++col) {

531

colString += alignedResidues[

row

][col];

533

mapIndex = colToPos[col];

534  columns

[mapIndex] = colString;

539  if

(alignedResidues) {

541  delete

[] alignedResidues[

row

];

543  delete

[] alignedResidues;

561

masterBioseq->

Assign

(*bioseq);

563

list< CRef< CSeq_id > >& idList = masterBioseq->

SetId

();

565

idList.push_back(seqIdRef);

567

list< CRef< CSeq_annot > >& seqAnnots = masterBioseq->

SetAnnot

();

569

list< CRef< CSeq_loc > >& seqlocs = seqAnnot->

SetData

().SetLocs();

571

seqlocs.push_back(seqLoc);

572

seqAnnots.push_back(seqAnnot);

598

+

"th row, because CD has only " 600

BioseqForNthRow->

Assign

(*bioseq);

601  return

(BioseqForNthRow);

605

BioseqForNthRow->

Assign

(*bioseq);

607

list< CRef< CSeq_id > >& idList = BioseqForNthRow->

SetId

();

609

idList.push_back(seqIdRef);

611

list< CRef< CSeq_annot > >& seqAnnots = BioseqForNthRow->

SetAnnot

();

613

list< CRef< CSeq_loc > >& seqlocs = seqAnnot->

SetData

().SetLocs();

615

seqlocs.push_back(seqLoc);

616

seqAnnots.push_back(seqAnnot);

617  return

BioseqForNthRow;

628  for

(

int i

=0;

i

<

N

;

i

++) {

630  if

(!errstr.empty())

return

(

false

);

641  if

(!taxServer.

Init

())

649  for

(

int i

= 0;

i

< num;

i

++)

652

cd->

GetGI

(

i

,gi,

false

);

671  TTaxId

joined = taxServer.

Join

(comTax, taxid);

674  LOG_POST

(

"Failed to join two taxids:"

<<comTax<<

" and "

<<taxid<<

". The latter one is ignored."

);

691

orgRef->

Assign

(*taxServer.

GetOrgRef

(comTax, is_species, is_uncultured, blast_name));

701  int

nAncestors, nClassical = 0;

708  if

(

result

&& isAncestors) {

709

list< CRef< CDomain_parent > >::const_iterator pit = pCD->

GetAncestors

().begin(), pit_end = pCD->

GetAncestors

().end();

710  while

(pit != pit_end) {

717  result

= ((nClassical == 1 && nAncestors == 1) ||

718

(nClassical == 0 && nAncestors > 0));

727  static const char

* msgHeader =

"Remastering CD to "

;

731  if

(seqId->

IsPdb

())

736  for

(;

i

< nrows;

i

++)

739  if

(seqId->

IsPdb

())

758

list<CRef< CSeq_align > >& seqAlignList = cd->

GetSeqAligns

();

762

list<CRef< CSeq_align > >::iterator lit = seqAlignList.begin();

763

list<CRef< CSeq_align > >::iterator guideIt;

764  for

(; lit != seqAlignList.end(); lit++)

769  bmp

.remaster(guideBmp);

770

*lit =

bmp

.toSeqAlign();

786  if

(SeqID->

IsPdb

()) {

803  if

((

int

)oldMasterRow >= cd.

GetNumRows

() || oldMasterRow == 0)

return false

;

806  int

From, To, NewFrom, NewTo;

807

CAlign_annot_set::Tdata::iterator alignAnnotIt, alignAnnotEnd;

808

CPacked_seqint::Tdata::iterator intervalIt, intervalEnd;

817  for

(alignAnnotIt = cd.

SetAlignannot

().Set().begin(); alignAnnotIt != alignAnnotEnd; alignAnnotIt++) {

819  if

((*alignAnnotIt)->SetLocation().IsInt()) {

821

From = (

int

) (*alignAnnotIt)->SetLocation().GetInt().GetFrom();

822

To = (

int

) (*alignAnnotIt)->SetLocation().GetInt().GetTo();

826  if

(!seqIdOldMaster->

Match

((*alignAnnotIt)->SetLocation().SetInt().GetId()) || NewFrom < 0 || NewTo < 0)

832  if

(seqIdMaster->

Match

((*alignAnnotIt)->SetLocation().SetInt().GetId()) && !seqIdMaster->

Match

(*seqIdOldMaster)) {

838

(*alignAnnotIt)->SetLocation().SetInt().SetFrom(NewFrom);

839

(*alignAnnotIt)->SetLocation().SetInt().SetTo(NewTo);

840

(*alignAnnotIt)->SetLocation().SetInt().SetId(*seqIdMaster);

843  else if

((*alignAnnotIt)->SetLocation().IsPacked_int()) {

845

intervalIt = (*alignAnnotIt)->SetLocation().SetPacked_int().Set().begin();

846

intervalEnd = (*alignAnnotIt)->SetLocation().SetPacked_int().Set().end();

847  for

(; intervalIt != intervalEnd; ++intervalIt) {

849

From = (

int

) (*intervalIt)->GetFrom();

850

To = (

int

) (*intervalIt)->GetTo();

853  if

(!seqIdOldMaster->

Match

((*intervalIt)->GetId()) || NewFrom < 0 || NewTo < 0)

859  if

(seqIdMaster->

Match

((*intervalIt)->GetId()) && !seqIdMaster->

Match

(*seqIdOldMaster)) {

865

(*intervalIt)->SetFrom(NewFrom);

866

(*intervalIt)->SetTo(NewTo);

867

(*intervalIt)->SetId(*seqIdMaster);

878

vector<int> consensusRows, consensusSeqListIds;

892  for

(

int i

= consensusSeqListIds.size() - 1;

i

>= 0 ; --

i

) {

907  if

(masterLen == 0)

return result

;

911  unsigned int i

, j, nBlocks;

927

vector<BlockModelPair*> blockModelPairs;

928  set<int>

forcedCTerminiInIntersection;

930

list< CRef< CSeq_align > >& cdSeqAligns = ccd->

GetSeqAligns

();

931

list< CRef< CSeq_align > >::iterator cdSeqAlignIt = cdSeqAligns.begin(), cdSeqAlignEnd = cdSeqAligns.end();

933  for

(

i

= 0; cdSeqAlignIt != cdSeqAlignEnd; ++cdSeqAlignIt, ++

i

) {

937  if

(

bmp

&&

bmp

->isValid()) {

939

blockModelPairs.push_back(

bmp

);

946  for

(j = 0; j < nBlocks - 1; ++j) {

948

forcedCTerminiInIntersection.

insert

(

bmp

->getMaster().getBlock(j).getEnd());

956  if

(blockModelPairs.size() != cdSeqAligns.size()) {

962

nAlignedIBM = (intersectedBlockModel) ? intersectedBlockModel->

getTotalBlockLength

() : 0;

963  if

(nAlignedIBM == 0) {

978

nBlocks = intersectedBlockModel->

getBlocks

().size();

979  for

(

i

= 0, cdSeqAlignIt = cdSeqAligns.begin();

i

<

nRows

- 1 ; ++

i

, ++cdSeqAlignIt) {

981  bmp

= blockModelPairs[

i

];

985  for

(j = 0; j < nBlocks; ++j) {

986  const Block

& jthMasterBlock = intersectedBlockModel->

getBlock

(j);

987

slaveStart =

bmp

->mapToMaster(jthMasterBlock.

getStart

());

990  assert

(slaveStart != -1);

993

intersectedSeqAlignSlave->

addBlock

(

b

);

995

*cdSeqAlignIt = intersectedSeqAlignSlave->

toSeqAlign

(*intersectedBlockModel);

1001

blockModelPairs.clear();

1004  delete

intersectedBlockModel;

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.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

User-defined methods of the data storage class.

bool GetSeqIDForRow(int row, CRef< CSeq_id > &SeqID) const

void addOneAlignment(const BlockModel &bm)

BlockModel * getIntersectedAlignment(double rowFraction=1.0)

CRef< CSeq_align > toSeqAlign() const

int mapToMaster(int slavePos) const

int getTotalBlockLength() const

CRef< CSeq_id > getSeqId() const

CRef< CSeq_align > toSeqAlign(const BlockModel &master) const

void addBlock(Block &block)

int getGapToCTerminal(int bn, int len=-1) const

vector< Block > & getBlocks()

bool EraseTheseRows(const std::vector< int > &TossRows)

void EraseSequence(int SeqIndex)

int GetUpperBound(int Row) const

string GetSequenceStringByRow(int rowId)

bool GetSeqAlign(int Row, CRef< CSeq_align > &seqAlign)

int GetRowsWithConsensus(vector< int > &consensusRows) const

bool GetSeqIDFromAlignment(int RowIndex, CRef< CSeq_id > &SeqID) const

bool FindConsensusInSequenceList(vector< int > *indices=NULL) const

int Num3DAlignments() const

string GetSequenceStringByIndex(int SeqIndex)

int GetAllRowIndicesForSeqId(const CRef< CSeq_id > &SeqID, list< int > &rows) const

int GetAlignmentLength() const

int GetLowerBound(int Row) const

const list< CRef< CSeq_align > > & GetSeqAligns() const

bool UsesConsensusSequenceAsMaster() const

bool GetGI(int Row, TGi &GI, bool ignorePDBs=true)

bool GetBioseqForRow(int rowId, CRef< CBioseq > &bioseq)

string GetAccession(int &Version) const

int GetNumSequences() const

bool GetSeqIDForRow(int Pair, int DenDiagRow, CRef< CSeq_id > &SeqID) const

bool GetPDB(int Row, const CPDB_seq_id *&pPDB)

bool GetTaxId4GI(TGi gi, TTaxId &tax_id_out)

CConstRef< COrg_ref > GetOrgRef(TTaxId tax_id, bool &is_species, bool &is_uncultured, string &blast_name, bool *is_specified=NULL)

TTaxId Join(TTaxId taxid1, TTaxId taxid2)

bool isBlockAligned() const

iterator_bool insert(const value_type &val)

void SetAlignedResiduesOnSequence(const CRef< CSeq_align > &align, const string &sequenceString, char *&pAlignedRes, bool isMaster=false)

int GetBlockLengths(const CRef< CSeq_align > &seqAlign, vector< int > &lengths)

int GetBlockStarts(const CRef< CSeq_align > &seqAlign, vector< int > &starts, bool onMaster)

bool SetCreationDate(CCdCore *cd)

bool ReMasterCdWithoutUnifiedBlocks(CCdCore *cd, int Row, bool resetFields)

int NumberOfOverlappedRows(CCdCore *cd1, CCdCore *cd2)

bool RemasterWithStructure(CCdCore *cd, string *msg)

void ResetFields(CCdCore *cd)

CCdCore * CopyCD(const CCdCore *cd)

bool obeysParentTypeConstraints(const CCdCore *pCD)

int GetOverlappedRows(CCdCore *cd1, CCdCore *cd2, vector< int > &rowsOfCD1, vector< int > &rowsOfCD2)

int PurgeConsensusSequences(CCdCore *pCD, bool resetFields)

string GetVerboseNameStr(const CCdCore *cd)

void SetAlignedResiduesForCD(CCdCore *cd, char **&ppAlignedResidues, bool forceRecompute)

bool Reorder(CCdCore *pCD, const vector< int > positions)

CRef< COrg_ref > GetCommonTax(CCdCore *cd, bool useRootWhenNoTaxInfo)

CCdCore * ExtractCDFromMime(CNcbi_mime_asn1 *ncbiMime)

bool remasterAlignannot(CCdCore &cd, unsigned int oldMasterRow)

void GetAlignmentColumnsForCD(CCdCore *cd, map< unsigned int, string > &columns, unsigned int referenceRow)

CRef< CBioseq > GetMasterBioseqWithFootprintOld(CCdCore *cd)

bool ReorderStructureAlignments(CCdCore *pCD, const vector< int > &positions)

bool SetUpdateDate(CCdCore *cd)

bool GetBioseqWithFootprintForNRows(CCdCore *cd, int N, vector< CRef< CBioseq > > &bioseqs, string &errstr)

int GetMappedRowIds(CCdCore *cd1, int row1, CCdCore *cd2, vector< int > &rows2, bool cd1AsChild, bool overlapMode)

void SetConvertedSequencesForCD(CCdCore *cd, vector< string > &convertedSequences, bool forceRecompute)

int IntersectByMaster(CCdCore *ccd, double rowFraction)

CRef< CBioseq > GetBioseqWithFootprintForNthRow(CCdCore *cd, int N, string &errstr)

CRef< CBioseq > GetMasterBioseqWithFootprint(CCdCore *cd)

int GetReMasterFailureCode(const CCdCore *cd)

const int ALIGN_ANNOTS_VALID_FAILURE

static ASNClass * CopyASNObject(const ASNClass &originalObject, std::string *err)

TTaxId GetTaxIdInBioseq(const CBioseq &bioseq)

static const char si[8][64]

thread_local unique_ptr< FtaMsgPost > bmp

static const column_t columns[]

SStrictId_Tax::TId TTaxId

Taxon id type.

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

#define LOG_POST(message)

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

virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)

Set object to copy of another one.

const string AsFastaString(void) const

bool Match(const CSeq_id &sid2) const

Match() - TRUE if SeqIds are equivalent.

void Reset(void)

Reset reference object.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

#define BEGIN_SCOPE(ns)

Define a new scope.

static string IntToString(int value, TNumToStringFlags flags=0, int base=10)

Convert int to string.

@ eCurrent

Use current time. See also CCurrentTime.

list< CRef< CBiostruc_feature > > TFeatures

const TFeatures & GetFeatures(void) const

Get the Features member data.

void ResetTrunc_master(void)

Reset Trunc_master data member.

void ResetFeatures(void)

Reset Features data member.

TMaster3d & SetMaster3d(void)

Assign a value to Master3d data member.

void ResetScoremat(void)

Reset Scoremat data member.

bool IsSetAlignannot(void) const

alignment annotation Check if a value has been assigned to Alignannot data member.

void ResetProfile_range(void)

Reset Profile_range data member.

void SetFeatures(TFeatures &value)

Assign a value to Features data member.

void SetDescription(TDescription &value)

Assign a value to Description data member.

const TAncestors & GetAncestors(void) const

Get the Ancestors member data.

void ResetDistance(void)

Reset Distance data member.

bool IsSetMaster3d(void) const

record if CD has a 3D representative Check if a value has been assigned to Master3d data member.

bool IsSetAncestors(void) const

list of parents Check if a value has been assigned to Ancestors data member.

void SetAlignannot(TAlignannot &value)

Assign a value to Alignannot data member.

void ResetPosfreq(void)

Reset Posfreq data member.

const TName & GetName(void) const

Get the Name member data.

bool IsSetParent(void) const

this CD is the result of a split Check if a value has been assigned to Parent data member.

bool IsSetFeatures(void) const

contains structure alignment data or "core" definitions Check if a value has been assigned to Feature...

const TFeatures & GetFeatures(void) const

Get the Features member data.

@ eParent_type_classical

the classification of parent child relations

bool IsGeneral(void) const

Check if variant General is selected.

const TCdd & GetCdd(void) const

Get the variant data.

const TGeneral & GetGeneral(void) const

Get the variant data.

bool IsCdd(void) const

Check if variant Cdd is selected.

const TSeq_align_data & GetSeq_align_data(void) const

Get the Seq_align_data member data.

bool IsPdb(void) const

Check if variant Pdb is selected.

void SetData(TData &value)

Assign a value to Data data member.

TId & SetId(void)

Assign a value to Id data member.

TAnnot & SetAnnot(void)

Assign a value to Annot data member.

unsigned int

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

double value_type

The numeric datatype used by the parser.

Defines: CTimeFormat - storage class for time format.

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

#define row(bind, expected)


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