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

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

41  auto

ret = residues.find(eaa);

43

ret = residues.find(

'X'

);

45  return static_cast<unsigned char>

(ret);

49  return kResidues

[

static_cast<int>

(stdCode)];

64

: m_masterIn(

false

), m_residueRowsMap(), m_residueTypeCount(0), m_indexByConsensus(-1)

124  unsigned int max

= 0;

146  double

w = 1.0/denom;

157  double

w = 1.0/denom;

172

rowWeights[cit->second.first] += colResWeight;

173

total += colResWeight;

174

rowsUsed.

insert

(cit->second.first);

176  if

(countGap && ((

int

)rowsUsed.

size

() < numRows))

178  double

gapWeight = (1.0 - total) / (numRows - rowsUsed.

size

());

179  for

(

int row

= 0;

row

< numRows;

row

++)

181  if

(rowsUsed.

find

(

row

) != rowsUsed.

end

())

182

rowWeights[

row

] += gapWeight;

190  double

totalWeight = 0;

191  double

maxResWeight = 0;

192  double

resWeight = 0;

195

pair <ResidueRowsMap::const_iterator, ResidueRowsMap::const_iterator> range =

200  int row

= cit->second.first;

201

resWeight += rowWeights[

row

];

203  if

(resWeight > maxResWeight)

206

maxResWeight = resWeight;

208

totalWeight += resWeight;

222

residues[rit->second.first] = rit->first;

241

pair <ResidueRowsMap::const_iterator, ResidueRowsMap::const_iterator> range =

245  if

(cit->second.first ==

row

)

246  return

cit->second.second;

255  return

(*cit)->second.second;

265  if

(!(cit->second.second))

291

backgroundResFreq[

'A'

] = 7.67/100.0;

292

backgroundResFreq[

'R'

] = 5.21/100.0;

293

backgroundResFreq[

'N'

] = 4.32/100.0;

294

backgroundResFreq[

'D'

] = 5.25/100.0;

295

backgroundResFreq[

'C'

] = 1.62/100.0;

296

backgroundResFreq[

'Q'

] = 3.93/100.0;

297

backgroundResFreq[

'E'

] = 6.48/100.0;

298

backgroundResFreq[

'G'

] = 6.88/100.0;

299

backgroundResFreq[

'H'

] = 2.25/100.0;

300

backgroundResFreq[

'I'

] = 5.85/100.0;

301

backgroundResFreq[

'L'

] = 9.56/100.0;

302

backgroundResFreq[

'K'

] = 5.95/100.0;

303

backgroundResFreq[

'M'

] = 2.37/100.0;

304

backgroundResFreq[

'F'

] = 4.08/100.0;

305

backgroundResFreq[

'P'

] = 4.89/100.0;

306

backgroundResFreq[

'S'

] = 7.04/100.0;

307

backgroundResFreq[

'T'

] = 5.55/100.0;

308

backgroundResFreq[

'W'

] = 1.20/100.0;

309

backgroundResFreq[

'Y'

] = 3.14/100.0;

310

backgroundResFreq[

'V'

] = 6.63/100.0;

316  static double

* backgroundResFreqArray = 0;

318  if

(backgroundResFreqArray == 0)

336  double

freqThreshold = 0.0001f;

338  const double

ln2 =

log

(2.0f);

347  if

( standardFreq > freqThreshold)

349  double

freq = double(

count

)/total;

350  double

freqRatio = freq/standardFreq;

351  if

(freqRatio > freqThreshold)

352  info

+= freq * (

log

(freqRatio))/ln2;

362

: mPos(posOnMaster), gap(aGap)

387

: m_frequencyThreshold(0.5),

389

m_profiles(), m_rowWeights(),

390

m_consensus(), m_guideAlignment()

402  const

vector<Block>& mBlocks =

bmp

.getMaster().getBlocks();

403  const

vector<Block>& sBlocks =

bmp

.getSlave().getBlocks();

408  for

(

unsigned int

bn = 0; bn < mBlocks.size(); bn++)

410  for

(

int i

= 0;

i

< mBlocks[bn].getLen();

i

++)

412  int

mPos = mBlocks[bn].getStart() +

i

;

413  int

sPos = sBlocks[bn].getStart() +

i

;

415  m_profiles

[col].addOccurence(mSeq[mPos], masterRow,

true

);

419  if

(bn != (mBlocks.size() -1))

421  int

mPos = mBlocks[bn].getEnd();

422  int

sPos = sBlocks[bn].getEnd();

424  int

sGapLen =

bmp

.getSlave().getGapToCTerminal(bn);

425  int

mGapLen =

bmp

.getMaster().getGapToCTerminal(bn);

429  for

(

int

gap =1; gap <= mGapLen; gap++)

432  m_profiles

[col].addOccurence(mSeq[mPos+gap], masterRow,

false

);

437  int

midOnMaster = mGapLen/2 + mGapLen%2;

438  int

mid = sGapLen/2 + sGapLen%2;

439  for

(

int

gap =1; gap <= sGapLen; gap++)

444  if

(gap <= midOnMaster)

447

col.

mPos

= mPos + gap;

451

col.

mPos

= mPos + midOnMaster;

452

col.

gap

= gap - midOnMaster;

457  int

mPosNext = mBlocks[bn+1].getStart();

458  int

sPosNext = sBlocks[bn+1].getStart();

459  int delta

= sPosNext - (sPos + gap);

460  if

(

delta

<= (mGapLen/2))

467

col.

mPos

= mPosNext - (mGapLen/2);

481  bool

countGap =

false

;

484  double

weightsSum = 0;

489  int

highestCount = 0;

492  int

aCount = cit->second.getSumCount();

493  if

(aCount > highestCount)

494

highestCount = aCount;

521  double

defaultWeight = 0.0;

523

defaultWeight = 1.0f * double(colUsed)/double(

m_totalRows

);

526  int

noWeightRows = 0;

572

blocksOnMaster.clear();

573

blocksOnConsensus.clear();

577  bool

inBlock =

false

;

578  int

startM = 0, endM = 0;

591  bool

qualifiedForConsensus = (

weight

>= threshold && res );

592  bool

qualifiedForGuide = qualifiedForConsensus && ((cit->second).isAligned(0));

597  if

(qualifiedForGuide)

608  if

(qualifiedForGuide)

611  if

(col.

mPos

== (endM + 1))

618

blocksOnMaster.push_back(

Block

(startM, endM - startM + 1, blockId));

619

blocksOnConsensus.push_back(

Block

(startC, endM - startM + 1, blockId));

630

blocksOnMaster.push_back(

Block

(startM, endM - startM + 1, blockId));

631

blocksOnConsensus.push_back(

Block

(startC, endM - startM + 1, blockId));

635  if

(qualifiedForConsensus)

637

cit->second.setIndexByConsensus(

m_consensus

.size());

648

blocksOnMaster.push_back(

Block

(startM, endM - startM + 1, blockId));

649

blocksOnConsensus.push_back(

Block

(startC, endM - startM + 1, blockId));

699

seq.assign(mcc.

getSeq

());

708

cr.

read

(pit->second);

717  if

(pit->first.gap == 0)

719  int

mPos = pit->first.mPos;

721

cr.

read

(pit->second);

731  if

(pit->second.getIndexByConsensus() >= 0)

732

cr.

read

(pit->second);

741  if

(pit->second.isAllRowsAligned())

742

cr.

read

(pit->second);

756  bool

useCol =

false

;

761

useCol = (cit->first.gap == 0);

792

blocksOnMaster.clear();

793

blocksOnConsensus.clear();

800  bool

inBlock =

false

;

801  int

startM = 0, endM = 0;

816  bool

qualifiedForGuide = qualifiedForConsensus && ((cit->second).isAligned(0));

819  if

(qualifiedForGuide)

830  if

(qualifiedForGuide)

833  if

(col.

mPos

== (endM + 1))

840

blocksOnMaster.push_back(

Block

(startM, endM - startM + 1, blockId));

841

blocksOnConsensus.push_back(

Block

(startC, endM - startM + 1, blockId));

852

blocksOnMaster.push_back(

Block

(startM, endM - startM + 1, blockId));

853

blocksOnConsensus.push_back(

Block

(startC, endM - startM + 1, blockId));

858  if

(qualifiedForConsensus)

861  if

(curMap.

find

(conIndex) != curMap.

end

()) {

870  if

(curMap.

find

(conIndex) != curMap.

end

()) {

881

blocksOnMaster.push_back(

Block

(startM, endM - startM + 1, blockId));

882

blocksOnConsensus.push_back(

Block

(startC, endM - startM + 1, blockId));

889

vector<UnalignedSegReader::Seg> segs;

891  if

(segs.size() == 0)

906  for

(

unsigned int i

= 0;

i

< segs.size();

i

++)

908  for

(

int

k = segs[

i

].

first

; k <= segs[

i

].second; k++)

914

: m_totalUnaligned(0), m_pos(0)

976  return

seg.second - seg.first + 1 ;

981  string head

=

in

.substr(0, seg.first);

982  string

tail =

in

.substr(seg.second + 1,

in

.size() - (seg.second + 1));

Various auxiliary BLAST utility functions.

double * BLAST_GetStandardAaProbabilities(void)

Get the standard amino acid probabilities.

vector< Block > & getBlocks()

bool operator<(const ColumnAddress &rhs) const

virtual void read(ColumnResidueProfile &crp)=0

double calculateColumnWeight(char residue, bool countGap, int numRows) const

double reweightColumnByRowWeights(const vector< double > &rowWeights, char &heaviestResidue) const

void addOccurence(char residue, int row, bool aligned)

unsigned char getResidueByRow(int row)

static int getResiduesStringSize()

pair< int, bool > RowStatusPair

static const string getResiduesString()

ResidueRowsMap::iterator * findRow(int row)

int getIndexByConsensus() const

bool isAllRowsAligned() const

double getBackgroundResFreq(char res)

void setIndexByConsensus(int col)

vector< ResidueRowsMap::iterator * > m_residuesByRow

double sumUpColumnWeightsByRow(vector< double > &rowWeights, bool countGap, int numRows) const

void getResiduesByRow(vector< char > &residues, bool byNcbiStd=true) const

ResidueRowsMap m_residueRowsMap

double calcInformationContent()

char getMostFrequentResidue(int &count) const

static unsigned char getNcbiStdCode(char eaa)

static char getEaaCode(char stdCode)

static void useDefaultBackgroundResFreq()

int getResidueTypeCount() const

bool isAligned(char residue, int row) const

vector< double > m_rowWeights

const string & makeConsensus()

set< int > m_colsToSkipOnConsensus

UnqualForConsMap::const_iterator UnqualForConsCit

void adjustConsensusAndGuide()

void traverseColumnsOnMaster(ColumnReader &cr)

BlockModelPair m_guideAlignment

UnqualForConsMap m_numUnqualAfterConsIndex

double calcInformationContent(bool byConsensus=true)

const string getConsensus(bool inNcbieaa=true)

set< int > m_colsToSkipOnMaster

void traverseAlignedColumns(ColumnReader &cr)

void countUnalignedConsensus(UnalignedSegReader &ucr)

const BlockModelPair & getGuideAlignment() const

bool HasUnqualAfterIndex(int index) const

int countColumnsOnMaster(string &seq)

unsigned int GetNumUnqualAfterIndex(int index) const

void calculateRowWeights()

void addOneRow(BlockModelPair &bmp, const string &mSeq, const string &sSeq)

void traverseAllColumns(ColumnReader &cr)

void traverseColumnsOnConsensus(ColumnReader &cr)

vector< CRef< CSeq_id > > m_seqIds

bool skipUnalignedSeg(UnalignedSegReader &ucr, int len)

void segsToSet(vector< UnalignedSegReader::Seg > &segs, set< int > &cols)

double m_frequencyThreshold

void read(ColumnResidueProfile &crp)

string getIndexSequence()

int getLongUnalignedSegs(int length, vector< Seg > &segs)

string subtractSeg(Seg seg, string &in)

vector< Seg > m_unalignedSegs

string subtractLongestSeg(int threshold)

void setIndexSequence(string &seq)

container_type::const_iterator const_iterator

container_type::iterator iterator

const_iterator begin() const

const_iterator end() const

const_iterator find(const key_type &key) const

const_iterator_pair equal_range(const key_type &key) const

container_type::const_iterator const_iterator

const_iterator end() const

iterator insert(const value_type &val)

const_iterator begin() const

container_type::iterator iterator

container_type::value_type value_type

iterator_bool insert(const value_type &val)

const_iterator find(const key_type &key) const

const_iterator end() const

static CSafeStatic< map< char, double > > s_BackgroundResFreq

static const size_t kResiduesSize

static const char kResidues[]

thread_local unique_ptr< FtaMsgPost > bmp

static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)

#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.

unsigned int

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

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

Int4 delta(size_t dimension_, const Int4 *score_)

#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