64 { 3, 4, 3, 4, 5, 9, 2, 6, 6, 6, 6, 6, 5, 4, 12, 5, 5, 6, 3, 4, 3, 5, 11, 0, 9, 5};
66 { 5, 5, 5, 5, 7, 9, 3, 7, 11, 11, 12, 11, 9, 6, 19, 7, 8, 12, 5, 7, 5, 9, 10, 0, 9, 7};
68 { 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 2, 3, 1, 2, 4, 1, 1, 1, 1, 2, 0, 1, 1};
70 { 1, 3, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 1, 0, 2, 3};
72 { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
74 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0};
77 template <
class Iterator>
81 size_t c = 0, h = 2,
n = 0, o = 1, s = 0, se = 0;
83 for ( ; start != end; ++start) {
84 unsigned char ch = *start;
86 if ( ch >=
'a' && ch <=
'z' ) {
88 }
else if ( ch >=
'A' && ch <=
'Z' ) {
90 }
else if ( ch !=
'-' && ch !=
'*' ) {
92 "GetProteinWeight: bad residue");
102 return 12.01115 * c +
117 "molecular weight only valid for protein features");
131 switch (
prot.GetProcessed()) {
160 for ( ; feat_it; ++feat_it) {
176 CConstRef<CMolInfo> molinfo(sequence::GetMolInfo(bsh));
178 comp = molinfo->GetCompleteness();
179 LOG_POST(Error << "comp = " << comp);
225 (
location->GetTotalRange().GetFrom() > 0 ||
234 CConstRef<CMolInfo> molinfo(sequence::GetMolInfo(handle));
236 comp = molinfo->GetCompleteness();
237 LOG_POST(Error << "comp = " << comp);
272 ncbieaa_sequence.end());
280 "GetMolecularWeights requires a protein!");
295 for (
CFeat_CI feat(handle, sel); feat; ++feat) {
296 bool is_mature =
false, is_signal =
false;
298 switch (
data.Which()) {
300 switch (
data.GetProt().GetProcessed()) {
310 "processed active peptide")) {
329 }
else if (is_signal && signal.
Empty()
330 && !feat->GetLocation().IsWhole() ) {
331 signal = &feat->GetLocation();
335 if (locations.
empty()) {
345 }
else if (v[0] ==
'M') {
Exceptions for objmgr/util library.
@ eSubtype_sig_peptide_aa
@ eSubtype_mat_peptide_aa
namespace ncbi::objects::
iterator_bool insert(const value_type &val)
Include a standard set of the NCBI C++ Toolkit most basic headers.
static const char location[]
#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.
TRange GetTotalRange(void) const
void GetProteinWeights(const CBioseq_Handle &handle, TWeights &weights)
Automatically picks reasonable ranges: in decreasing priority order,.
double GetProteinWeight(const CSeq_feat &feat, CScope &scope, const CSeq_loc *location, TGetProteinWeight opts)
@ fGetProteinWeight_ForceInitialMetTrim
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
const CSeqFeatData & GetData(void) const
TSeqPos GetBioseqLength(void) const
CConstRef< CSeq_id > GetSeqId(void) const
Get id which can be used to access this bioseq handle Throws an exception if none is available.
CScope & GetScope(void) const
Get scope this handle belongs to.
TMol GetBioseqMolType(void) const
Get some values from core:
CSeqVector GetSeqVector(EVectorCoding coding, ENa_strand strand=eNa_strand_plus) const
Get sequence: Iupacna or Iupacaa if use_iupac_coding is true.
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
SAnnotSelector & IncludeFeatSubtype(TFeatSubtype subtype)
Include feature subtype in the search.
SAnnotSelector & SetResolveTSE(void)
SetResolveTSE() is equivalent to SetResolveMethod(eResolve_TSE).
SAnnotSelector & IncludeFeatType(TFeatType type)
Include feature type in the search.
TSeqPos GetBufferSize(void) const
Get number of chars from current position to the current buffer end.
SAnnotSelector & SetOverlapIntervals(void)
Check overlapping of individual intervals.
void SetCoding(TCoding coding)
const_iterator end(void) const
bool Empty(void) const THROWS_NONE
Check if CConstRef is empty – not pointing to any object which means having a null value.
bool NotEmpty(void) const THROWS_NONE
Check if CConstRef is not empty – pointing to an object and has a non-null value.
position_type GetLength(void) const
#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 int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
TProcessed GetProcessed(void) const
Get the Processed member data.
@ eProcessed_signal_peptide
@ eProcessed_transit_peptide
E_Choice Which(void) const
Which variant is currently selected.
const TLocation & GetLocation(void) const
Get the Location member data.
const TData & GetData(void) const
Get the Data member data.
const TProt & GetProt(void) const
Get the variant data.
@ e_Region
named region (globin locus)
void SetTo(TTo value)
Assign a value to To data member.
void SetId(TId &value)
Assign a value to Id data member.
void SetFrom(TFrom value)
Assign a value to From data member.
@ eCompleteness_complete
complete biological entity
@ eCompleteness_no_left
missing 5' or NH3 end
@ eCompleteness_partial
partial but no details given
@ eCompleteness_no_ends
missing both ends
@ e_Ncbieaa
extended ASCII 1 letter aa codes
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is whole
static const int kNumO[26]
static const int kNumC[26]
static const int kNumS[26]
static const int kNumN[26]
double s_GetProteinWeight(Iterator start, Iterator end)
static const int kNumH[26]
static const int kNumSe[26]