void SequenceSet::UnpackSeqEntry(const CSeq_entry& seqEntry) { if (seqEntry.IsSeq()) { const Sequence *sequence = new Sequence(seqEntry.GetSeq()); if (!sequence || sequence->Status() != CAV_SUCCESS) { status = sequence->Status(); return; } sequences.push_back(sequence); } else { // Bioseq-set UnpackSeqSet(seqEntry.GetSet()); } }
/**\internal **\brief Get a FASTA formatted id string (the first available) from the ** CSeq_entry structure. ** **\param entry sequence description structure **\return the first id string corresponding to entry **/ static const string GetIdString( const CSeq_entry & entry ) { CRef<CObjectManager> om(CObjectManager::GetInstance()); const CBioseq & seq = entry.GetSeq(); CRef<CScope> scope(new CScope(*om)); CSeq_entry_Handle seh = scope->AddTopLevelSeqEntry( const_cast< CSeq_entry & >( entry ) ); return CWinMaskSeqTitle::GetId( seh, seq ); /* list< CRef< CSeq_id > > idlist = seq.GetId(); if( idlist.empty() ) return "???"; else { CNcbiOstrstream os; (*idlist.begin())->WriteAsFasta( os ); return CNcbiOstrstreamToString(os); } */ }