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

NCBI C++ ToolKit: include/objtools/alnmgr/seqids_extractor.hpp Source File

1 #ifndef OBJTOOLS_ALNMGR___SEQIDS_EXTRACTOR__HPP 2 #define OBJTOOLS_ALNMGR___SEQIDS_EXTRACTOR__HPP 66 template

<

class

TAlnSeqId>

71  return new

TAlnSeqId(

id

);

78 template

<

class

TAlnSeqId>

98 template

<

class

TAlnSeqId,

class

TIdConverter = CAlnSeqIdConverter<TAlnSeqId> >

121  const

TSegs& segs = seq_align.

GetSegs

();

123  switch

(segs.Which()) {

126  bool

first_disc =

true

;

138  "Inconsistent Seq-ids across the disc alignments."

);

144  case

TSegs::e_Dendiag:

146  bool

first_diag =

true

;

150

id_vec.resize(ids.size());

152  else if

(id_vec.size() != ids.size()) {

154  "Inconsistent Seq-ids."

);

161  else if

(*id_vec[

row

] != TAlnSeqId(**id_it)) {

163  string

(

"Inconsistent Seq-ids: "

) +

164

id_vec[

row

]->AsString() +

" != "

+

165

TAlnSeqId(**id_it).AsString() +

"."

);

173  case

TSegs::e_Denseg:

176

id_vec.resize(ids.size());

177  for

(

size_t i

= 0;

i

< ids.size(); ++

i

) {

184  bool

first_seg =

true

;

187  typedef

vector<TLen> TLenVec;

189  ITERATE

(TSegs::TStd, std_it, segs.GetStd()) {

190  const CStd_seg

& std_seg = **std_it;

192

id_vec.resize(std_seg.

GetDim

());

194  else if

(id_vec.size() != (

size_t

) std_seg.

GetDim

()) {

196  "The Std-seg dim's need to be consistent."

);

198  if

(std_seg.

GetLoc

().size() != id_vec.size()) {

200  "Number of seq-locs inconsistent with dim."

);

206

TLenVec seg_lens(std_seg.

GetDim

());

209  switch

((*loc_it)->Which()) {

214  id

.Reset(

NewAlnSeqId

((*loc_it)->GetInt().GetId()));

217  id

.Reset(

NewAlnSeqId

((*loc_it)->GetPnt().GetId()));

220  string

err_str =

string

(

"Seq-loc of type "

) +

221

(*loc_it)->SelectionName((*loc_it)->Which()) +

222  "is not supported."

;

227

seg_lens[

i

] = (*loc_it)->GetTotalRange().GetLength();

230

id_vec[

i

].Reset(

id

);

232  else if

(*id_vec[

i

] != *

id

) {

233  string

err(

"Inconsistent Seq-ids found in seg "

);

235  ". Excpected "

+ id_vec[

i

]->AsString() +

236  ", encountered "

+

id

->AsString() +

"."

;

246  ITERATE

(TLenVec, len_i, seg_lens) {

247  if

(*len_i == 0)

continue

;

248  if

(min_len == 0 || min_len > *len_i) {

251  if

(max_len < *len_i) {

255  if

(min_len < max_len) {

256  bool

nuc_prot_diag = (min_len == max_len / 3 ||

257

min_len - 1 == max_len / 3 ?

259  for

(

size_t

i_lcl=0; i_lcl< seg_lens.size(); ++i_lcl) {

260  if

( nuc_prot_diag ) {

261

id_vec[i_lcl]->SetBaseWidth(

262

seg_lens[i_lcl] == min_len ? 3 : 1);

271  case

TSegs::e_Packed:

274

id_vec.resize(ids.size());

275  for

(

size_t i

= 0;

i

< ids.size(); ++

i

) {

280  case

TSegs::e_Sparse:

283  for

(

size_t row

= 0;

row

< rows.size(); ++

row

) {

287

id_vec.resize(segs.GetSparse().GetRows().size() + 1);

288

id_vec[0].Reset(first_id);

290  else if

(*id_vec[0] != *first_id) {

291  string

err(

"Inconsistent Seq-ids found in row "

);

299  case

TSegs::e_Spliced:

307

id_vec[0]->SetBaseWidth(

prot

? 3 : 1);

310

id_vec[1]->SetBaseWidth(1);

315  "Seq-align.segs not set."

);

318  "This type of alignment is not supported."

);

331  return

x.size() == y.size() &&

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.

Default seq-id converter.

TAlnSeqId * operator()(const CSeq_id &id) const

Scope-aware seq-id converter.

TAlnSeqId * operator()(const CSeq_id &id) const

CScopeAlnSeqIdConverter(CScope *scope)

void Validate(bool full_test=false) const

Include a standard set of the NCBI C++ Toolkit most basic headers.

CSeq_align::C_Segs::TDendiag TDendiag

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define NCBI_THROW(exception_class, err_code, message)

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

CBioseq_Handle GetBioseqHandle(const CSeq_id &id)

Get bioseq handle by seq-id.

TObjectType * Release(void)

Release a reference to the object and return a pointer to the object.

TParent::position_type position_type

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

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.

vector< CRef< CSeq_id > > TIds

vector< CRef< CSeq_loc > > TLoc

vector< CRef< CSparse_align > > TRows

const TGenomic_id & GetGenomic_id(void) const

Get the Genomic_id member data.

const TLoc & GetLoc(void) const

Get the Loc member data.

const TProduct_id & GetProduct_id(void) const

Get the Product_id member data.

const TFirst_id & GetFirst_id(void) const

Get the First_id member data.

TProduct_type GetProduct_type(void) const

Get the Product_type member data.

vector< CRef< CSeq_id > > TIds

vector< CRef< CSeq_id > > TIds

TDim GetDim(void) const

Get the Dim member data.

const TSecond_id & GetSecond_id(void) const

Get the Second_id member data.

list< CRef< CSeq_align > > Tdata

const TSegs & GetSegs(void) const

Get the Segs member data.

@ e_Empty

to NULL one Seq-id in a collection

Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.

#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