98 if (!
id.GetTextseq_Id()) {
100 }
else if (
id.GetTextseq_Id()->IsSetAccession()) {
117 CBioseq_set::GetTypeInfo_enum_EClass();
131 bool best_is_na =
false;
133 const CSeq_id* best_seq_id = 0;
134 const CSeq_id* best_seq_id_with_gb = 0;
135 const CSeq_id* best_seq_id_with_accession = 0;
138 bool takeit =
false, is_na;
139 const CSeq_id* current_seq_id = 0;
140 const CSeq_id* current_seq_id_with_gb = 0;
141 const CSeq_id* current_seq_id_with_accession = 0;
144 if (!current_seq_id) {
145 current_seq_id = &(*ii);
148 current_seq_id_with_gb = &(*ii);
151 current_seq_id_with_accession = &(*ii);
162 if (best_seq_id_with_accession) {
163 if (current_seq_id_with_accession) {
168 }
else if (current_seq_id_with_accession) {
170 }
else if (best_seq_id_with_gb) {
171 if (current_seq_id_with_gb) {
176 }
else if (current_seq_id_with_gb) {
178 }
else if (best_is_na) {
193 best_seq_id = current_seq_id;
194 best_seq_id_with_gb = current_seq_id_with_gb;
195 best_seq_id_with_accession = current_seq_id_with_accession;
201 if (best_seq_id_with_accession) {
202 best_seq_id = best_seq_id_with_accession;
204 else if (best_seq_id_with_gb) {
205 best_seq_id = best_seq_id_with_gb;
208 *
label +=
"(No Bioseqs)";
216 size_t len = sset.size();
219 }
else if (
len == 1) {
220 *
label +=
" (1 component)";
231 "CBioseq_set::GetNucFromNucProtSet() : incompatible class (" +
239 }
else if (se.
IsSet() &&
246 "CBioseq_set::GetNucFromNucProtSet() : \
247 nuc-prot set doesn't contain the nucleotide bioseq");
255 "CBioseq_set::GetGenomicFromGenProdSet() : incompatible class (" +
260 if ((*it)->IsSeq()) {
261 const CBioseq& seq = (*it)->GetSeq();
270 "CBioseq_set::GetGenomicFromGenProdSet() : \
271 gen-prod set doesn't contain the genomic bioseq");
279 "CBioseq_set::GetMasterFromSegSet() : incompatible class (" +
284 if ((*it)->IsSeq()) {
285 return (*it)->GetSeq();
290 "CBioseq_set::GetMasterFromSegSet() : \
291 segset set doesn't contain the master bioseq");
static bool s_has_gb(const CSeq_id &id)
static bool s_is_na(const CBioseq &seq)
static bool s_has_accession(const CSeq_id &id)
const CBioseq & GetNucFromNucProtSet(void) const
const CBioseq & GetMasterFromSegSet(void) const
CSeq_entry * GetParentEntry(void) const
const CBioseq & GetGenomicFromGenProdSet(void) const
CConstRef< CBioseq_set > GetParentSet(void) const
bool NeedsDocsumTitle() const
void GetLabel(string *label, ELabelType type) const
CSeq_entry * GetParentEntry(void) const
CConstRef< CBioseq_set > GetParentSet(void) const
CSeq_entry * GetParentEntry(void) const
Template class for iteration on objects of class C (non-medifiable version)
static const char si[8][64]
#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.
const string & FindName(TEnumValueType value, bool allowBadValue) const
Find name of the enum by its numeric value.
#define ENUM_METHOD_NAME(EnumName)
string GetSeqIdString(bool with_version=false) const
Return seqid string with optional version for text seqid type.
CConstBeginInfo ConstBegin(const C &obj)
Get starting point of non-modifiable object hierarchy.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string SizetToString(size_t value, TNumToStringFlags flags=0, int base=10)
Convert size_t to string.
static const char label[]
@ e_Other
for historical reasons, 'other' = 'refseq'
@ e_Tpe
Third Party Annot/Seq EMBL.
@ e_Tpd
Third Party Annot/Seq DDBJ.
@ e_Tpg
Third Party Annot/Seq Genbank.
const TSeq & GetSeq(void) const
Get the variant data.
bool IsSetClass(void) const
Check if a value has been assigned to Class data member.
TClass GetClass(void) const
Get the Class member data.
const TSet & GetSet(void) const
Get the variant data.
bool IsSeq(void) const
Check if variant Seq is selected.
bool IsSetSeq_set(void) const
Check if a value has been assigned to Seq_set data member.
bool IsSet(void) const
Check if variant Set is selected.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
list< CRef< CSeq_entry > > TSeq_set
@ eClass_pop_set
population study
@ eClass_phy_set
phylogenetic study
@ eClass_mut_set
set of mutations
@ eClass_eco_set
ecological sample study
@ eClass_nuc_prot
nuc acid and coded proteins
@ eClass_gen_prod_set
genomic products, chrom+mRNA+protein
@ eClass_segset
segmented sequence + parts
const TInst & GetInst(void) const
Get the Inst member data.
bool IsSetMol(void) const
Check if a value has been assigned to Mol data member.
TLength GetLength(void) const
Get the Length member data.
TMol GetMol(void) const
Get the Mol member data.
@ eMol_na
just a nucleic acid