ofstream
out(fname.c_str());
57 throwruntime_error(
"Failed to open"+ fname);
66 if( !(*s)->CanGetId() ) {
70 _ASSERT((*s)->GetId().IsStr());
71 const stringscore_type = (*s)->GetId().GetStr();
72 if(score_type ==
"score") {
73retval.
score= (*s)->GetValue().GetInt();
74}
else if(score_type ==
"e_value") {
75retval.
evalue= (*s)->GetValue().GetReal();
76}
else if(score_type ==
"bit_score") {
77retval.
bit_score= (*s)->GetValue().GetReal();
78}
else if(score_type ==
"num_ident") {
79retval.
num_ident= (*s)->GetValue().GetInt();
86 stringfname(
"densegconvert.asn");
90 throwruntime_error(
"Invalid number of dimensions");
96 copy(denseg.GetStarts().begin(),
97denseg.GetStarts().end(),
98back_inserter(retval.
starts));
100 copy(denseg.GetLens().begin(),
101denseg.GetLens().end(),
102back_inserter(retval.
lengths));
103 _ASSERT(retval.
lengths.size() == (
size_t)denseg.GetNumseg());
107 _ASSERT(ids.size() == (
size_t)denseg.GetDim());
110 if(query_id->
IsGi()) {
115 if(subj_id->
IsGi()) {
123 stringfname(
"seqalignconvert.asn");
127 throwruntime_error(
"Seq-align is not of partial type");
130 throwruntime_error(
"Invalid number of dimensions");
137 switch(segs.
Which()) {
146 throwruntime_error(
"Std-seg support is not implemented");
150 throwruntime_error(
"Unsupported alignment data type");
155std::vector<SeqAlign>& retval)
157 stringfname(
"blastseqalignconvert.asn");
162retval.push_back(neutral_seqalign);
166std::vector<SeqAlign>& retval)
168 if( !ss.CanGet() ) {
169 throwruntime_error(
"Empty Seq-align-set");
User-defined methods of the data storage class.
std::ofstream out("events_result.xml")
main entry point for tests
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define MSerial_AsnText
I/O stream manipulators â.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
const TDenseg & GetDenseg(void) const
Get the variant data.
E_Choice Which(void) const
Which variant is currently selected.
vector< CRef< CScore > > TScore
vector< CRef< CSeq_id > > TIds
bool IsStd(void) const
Check if variant Std is selected.
list< CRef< CSeq_align > > Tdata
bool IsDenseg(void) const
Check if variant Denseg is selected.
@ eType_partial
mapping pieces together
TGi GetGi(void) const
Get the variant data.
bool IsGi(void) const
Check if variant Gi is selected.
Magic spell ;-) needed for some weird compilers... very empiric.
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
void DensegConvert(const objects::CDense_seg &denseg, SeqAlign &retval)
void s_PrintTextAsnObject(const string fname, const T &obj)
void SetScores(const CSeq_align::TScore &scores, SeqAlign &retval)
void SeqAlignConvert(const objects::CSeq_align &sa, SeqAlign &retval)
void BlastSeqAlignSetConvert(const objects::CSeq_align &sa, std::vector< SeqAlign > &retval)
void SeqAlignSetConvert(const objects::CSeq_align_set &ss, std::vector< SeqAlign > &retval)
Converts a Seq-align-set into a neutral seqalign for use with the CSeqAlignCmp class.
Neutral sequence alignment (for representing an HSP in BLAST)
std::vector< TSeqPos > lengths
Lengths of aligned segments.
double bit_score
HSP bit score.
int num_ident
Number of identical residues.
double evalue
HSP evalue.
CAlignedGis sequence_gis
Gis of the aligned sequences.
std::vector< int > starts
Query/Subject starting offsets.
int query_strand
Strand of the query sequence.
int subject_strand
Strand of the subject sequence.
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