unordered_map<string, CRef<CSeq_entry> >
TQueryMap;
88 const string& user_tag);
96 const string& user_tag);
161retval =
id.AsFastaString();
163 else if(
id.IsGeneral()) {
164 const CDbtag& dbt =
id.GetGeneral();
173retval =
id.GetSeqIdString(
true);
186vector<string> tokens;
193 if(retval.empty()) {
207retval = it->GetTitle();
212 if(retval.empty()) {
232query_map[id] = seq_entry;
240TQueryMap::const_iterator it = queries.find(seqid.
GetSeqIdString());
242 if(it == queries.end()) {
247 returnit->second->GetSeq();
256 switch(seq_data.
Which()) {
291 string tmp(sequence);
306 for(
const auto& it: bioseq.
GetDescr().
Get()) {
307 if(it->IsUser() && it->GetUser().GetType().GetStr() ==
"Mapping") {
308 if(it->GetUser().HasField(
"quality")) {
309quality_str.assign(it->GetUser().GetField(
"quality").GetString());
319 for(
const auto& ann_it: bioseq.
GetAnnot()) {
320 if(ann_it->IsGraph()) {
321 for(
const auto& it: ann_it->GetData().GetGraph()) {
322 if(it->IsSetTitle() && it->GetTitle().find(
"Phred Quality") != string::npos) {
323 if(it->GetGraph().IsByte()) {
324 constvector<char>& values = it->GetGraph().GetByte().GetValues();
326quality_str.reserve(values.size());
327 for(
const auto& ch: values) {
328quality_str.push_back(ch + 33);
350 if(!
results.IsPaired() || first_seg) {
351 id.
Set(
results.GetQueryId().AsFastaString());
354 id.
Set(
results.GetLastId().AsFastaString());
378 const string& user_tag)
397 const string& cmd_line_args,
booluser_tag)
401ostr <<
"# MAGICBLAST "<<
version<< endl;
402ostr <<
"# "<< cmd_line_args << endl;
404ostr <<
"# Fields: ";
405ostr <<
"query acc."<< sep;
406ostr <<
"reference acc."<< sep;
407ostr <<
"% identity"<< sep;
408ostr <<
"not used"<< sep;
409ostr <<
"not used"<< sep;
410ostr <<
"not used"<< sep;
411ostr <<
"query start"<< sep;
412ostr <<
"query end"<< sep;
413ostr <<
"reference start"<< sep;
414ostr <<
"reference end"<< sep;
415ostr <<
"not used"<< sep;
416ostr <<
"not used"<< sep;
417ostr <<
"score"<< sep;
418ostr <<
"query strand"<< sep;
419ostr <<
"reference strand"<< sep;
420ostr <<
"query length"<< sep;
421ostr <<
"BTOP"<< sep;
422ostr <<
"num placements"<< sep;
423ostr <<
"not used"<< sep;
424ostr <<
"compartment"<< sep;
425ostr <<
"left overhang"<< sep;
426ostr <<
"right overhang"<< sep;
427ostr <<
"mate reference"<< sep;
428ostr <<
"mate ref. start"<< sep;
429ostr <<
"composite score";
431ostr << sep <<
"user tag";
443 boolis_paired,
intbatch_number,
intcompartment,
444 const string& user_tag,
453CSeq_align_set::Tdata::const_iterator
first= disc.
Get().begin();
455CSeq_align_set::Tdata::const_iterator second(
first);
460compartment, user_tag, second->GetNonNullPointer());
463 PrintTabular(ostr, **second, queries, is_paired, batch_number,
464compartment, user_tag,
first->GetNonNullPointer());
476 doubleperc_identity;
481ostr << perc_identity << sep;
492ostr << range.
GetFrom() + 1 << sep << range.
GetTo() + 1 << sep;
495ostr << range.
GetTo() + 1 << sep << range.
GetFrom() + 1 << sep;
498ostr << range.
GetFrom() + 1 << sep << range.
GetTo() + 1 << sep;
510ostr << query_len - range.
GetTo() << sep
511<< query_len - range.
GetFrom() << sep;
514ostr << range.
GetTo() + 1 << sep << range.
GetFrom() + 1 << sep;
517ostr << range.
GetFrom() + 1 << sep << range.
GetTo() + 1 << sep;
519ostr << range.
GetFrom() + 1 << sep << range.
GetTo() + 1 << sep;
527ostr << score << sep;
530ostr <<
"plus"<< sep
536 Int4fragment_score = 0;
542 if(!(*it)->GetLabel().IsStr()) {
546 if((*it)->GetLabel().GetStr() ==
"btop"&&
547(*it)->GetData().IsStr()) {
549btop_string = (*it)->GetString();
551 else if((*it)->GetLabel().GetStr() ==
"num_hits"&&
552(*it)->GetData().IsInt()) {
554num_hits = (*it)->GetInt();
564 int i= btop_string.length() - 1;
565 boolintron =
false;
568 while(
i>= 0 && (
isdigit(btop_string[
i]) ||
569btop_string[
i] ==
')')) {
573new_btop += btop_string.substr(
i+ 1, to -
i);
575 if(
i>= 0 && btop_string[
i] ==
'^') {
580 if(
isalpha(btop_string[
i]) || btop_string[
i] ==
'-') {
595new_btop += btop_string[
i];
601btop_string.swap(new_btop);
604fragment_score = score;
608fragment_score += mate_score;
613 stringleft_overhang =
"-";
614 stringright_overhang =
"-";
615 if(query_len <= 0) {
624to = query_len - range.
GetFrom();
630left_overhang.clear();
635 if(to < query_len) {
637right_overhang.clear();
641ostr << sep << query_len
642<< sep << btop_string
645<< sep << batch_number <<
":"<< compartment
646<< sep << left_overhang
647<< sep << right_overhang;
649 if(is_paired && mate) {
654ostr << sep << mate->GetSeq_id(1).AsFastaString();
657pair_start = mate->GetSeqStart(1) + 1;
660pair_start = mate->GetSeqStop(1) + 1;
662 if((align.
GetSeqStart(1) < mate->GetSeqStart(1) &&
667pair_start = -pair_start;
669ostr << sep << pair_start;
673ostr << sep <<
"-"<< sep <<
"-";
676ostr << sep << fragment_score;
678 if(!user_tag.empty()) {
679ostr << sep << user_tag;
690 const string& user_tag)
694 if(!
results.IsPaired() || first_seg) {
695 id.
Set(
results.GetQueryId().AsFastaString());
698 id.
Set(
results.GetLastId().AsFastaString());
716ostr << 0 << sep << 0 << sep;
719ostr << 0 << sep << 0 << sep;
727ostr <<
"-"<< sep <<
"-"<< sep;
732ostr << query_len << sep;
744 stringcompart =
"-";
751ostr << compart << sep;
768 if(!user_tag.empty()) {
769ostr << sep << user_tag;
781 boolis_paired,
intbatch_number,
784 boolprint_unaligned,
786 const string& user_tag)
788 boolis_concordant =
results.IsConcordant();
790 if(!no_discordant || (no_discordant && is_concordant)) {
791 for(
autoit:
results.GetSeqAlign()->Get()) {
792 PrintTabular(ostr, *it, queries, is_paired, batch_number,
793compartment++, user_tag);
798 if(!print_unaligned) {
803(no_discordant && !is_concordant)) {
806trim_read_id, user_tag);
807unaligned_ostr << endl;
812(no_discordant && !is_concordant))) {
815trim_read_id, user_tag);
816unaligned_ostr << endl;
828 boolis_paired,
intbatch_number,
830 boolprint_unaligned,
832 const string& user_tag)
839 PrintTabular(ostr, unaligned_ostr, unaligned_fmt, *it, queries,
840is_paired, batch_number, compartment, trim_read_id,
841print_unaligned, no_discordant, user_tag);
850 const string& cmd_line_args)
854 _ASSERT(seq_src && seqinfo_src);
861ostr <<
"@HD\t"<<
"VN:1.0\t"<<
"GO:query"<< endl;
872ostr <<
"@SQ\t"<<
"SN:"<<
s_GetBareId(*seqid) <<
"\tLN:"<< length;
874vector<TTaxId> taxids;
879 if(!taxids.empty() && taxids[0] != 0) {
881 for(vector<TTaxId>::iterator it = taxids.begin();
882it != taxids.end(); ++it) {
883 if(it != taxids.begin()) {
893ostr <<
"@PG\tID:magicblast\tPN:magicblast\tCL:"<< cmd_line_args << endl;
913 return a->Match(*
b);
923 constCSpliced_seg::TExons::const_iterator& next_exon)
929 if((*exon)->GetGenomic_strand() !=
930(*next_exon)->GetGenomic_strand() ||
937 if(!(*exon)->IsSetDonor_after_exon() ||
938!(*next_exon)->IsSetAcceptor_before_exon()) {
944 stringdonor = (*exon)->GetDonor_after_exon().GetBases();
945 stringacceptor = (*next_exon)->GetAcceptor_before_exon().GetBases();
952 result= (*exon)->GetGenomic_strand();
9670, acceptor.length(),
997 #define SAM_FLAG_MULTI_SEGMENTS 0x1 998 #define SAM_FLAG_SEGS_ALIGNED 0x2 999 #define SAM_FLAG_SEG_UNMAPPED 0x4 1000 #define SAM_FLAG_NEXT_SEG_UNMAPPED 0x8 1001 #define SAM_FLAG_SEQ_REVCOMP 0x10 1002 #define SAM_FLAG_NEXT_REVCOMP 0x20 1003 #define SAM_FLAG_FIRST_SEGMENT 0x40 1004 #define SAM_FLAG_LAST_SEGMENT 0x80 1005 #define SAM_FLAG_SECONDARY 0x100 1012 intbatch_number,
bool& first_secondary,
1013 bool& last_secondary,
booltrim_read_ids,
1017 boolother =
false,
1018 const string& user_tag =
"",
1029 const intkMaxInsertSize = is_spliced ?
1039CSeq_align_set::Tdata::const_iterator
first= disc.
Get().begin();
1041CSeq_align_set::Tdata::const_iterator second(
first);
1046batch_number, first_secondary, last_secondary,
1047trim_read_ids, strand_specific, only_specific,
1048print_md_tag,
false, user_tag,
1049second->GetNonNullPointer());
1052 PrintSAM(ostr, **second, queries, query_info, is_spliced,
1053batch_number, first_secondary, last_secondary,
1054trim_read_ids, strand_specific, only_specific,
1055print_md_tag,
true, user_tag,
1056 first->GetNonNullPointer());
1066 if(!(*it)->GetLabel().IsStr()) {
1070 if((*it)->GetLabel().GetStr() ==
"btop"&&
1071(*it)->GetData().IsStr()) {
1073btop_string = (*it)->GetString();
1075 else if((*it)->GetLabel().GetStr() ==
"num_hits"&&
1076(*it)->GetData().IsInt()) {
1078num_hits = (*it)->GetInt();
1080 else if((*it)->GetLabel().GetStr() ==
"context"&&
1081(*it)->GetData().IsInt()) {
1085 else if((*it)->GetLabel().GetStr() ==
"md_tag"&&
1086(*it)->GetData().IsStr()) {
1088md_tag = (*it)->GetString();
1094vector<ENa_strand> orientation;
1102 inttemplate_length = 0;
1153 TSeqPosm_start = mate->GetSeqStart(1);
1164 if(((strand_specific ==
eFwdRev&& plus_minus != other)
1165|| (strand_specific ==
eRevFwd&& minus_plus != other))
1166&& template_length < kMaxInsertSize) {
1171 if(((a_start <= m_start && plus_minus)
1172|| (m_start <= a_start && minus_plus))
1173&&
abs(template_length) < kMaxInsertSize) {
1186 if(first_secondary) {
1190first_secondary =
true;
1194 if(last_secondary) {
1198last_secondary =
true;
1205 if(trim_read_ids &&
1209read_id.resize(read_id.length() - 2);
1211ostr << read_id << sep;
1214ostr << sam_flags << sep;
1220ostr << range.
GetFrom() + 1 << sep;
1226 if(num_hits == 1) {
1229 else if(num_hits > 1) {
1231mapq = (
int)((-10.0 *
log10(1.0 - 1.0 / (
double) num_hits)) + 0.5);
1233ostr << mapq << sep;
1237 intedit_distance = 0;
1251 if((
int)qrange.
GetToOpen() < query_len) {
1256 for(
size_t i=0;
i< starts.size();
i+=2) {
1258 if(starts[
i] >= 0 && starts[
i+ 1] >= 0) {
1261 else if(starts[
i] < 0) {
1262 if(lens[
i/2] < 10) {
1274 if((
int)qrange.
GetToOpen() < query_len) {
1299 switch((*it)->Which()) {
1301 if(op && op !=
'M') {
1306num += (*it)->GetMatch();
1311 if(op && op !=
'M') {
1316edit_distance += (*it)->GetMismatch();
1317num += (*it)->GetMismatch();
1322 if(op && op !=
'I') {
1327edit_distance += (*it)->GetProduct_ins();
1328num += (*it)->GetProduct_ins();
1333 if(op && op !=
'D') {
1338edit_distance += (*it)->GetGenomic_ins();
1339num += (*it)->GetGenomic_ins();
1345 "CSpliced_exon_chunk::TPart value");
1354CSpliced_seg::TExons::const_iterator next_exon(exon);
1356 if(next_exon != spliced.
GetExons().end()) {
1357 intquery_gap = (*next_exon)->GetProduct_start().GetNucpos() -
1358(*exon)->GetProduct_end().GetNucpos() - 1;
1359 if(query_gap > 0) {
1363edit_distance += query_gap;
1365 intintron = (*next_exon)->GetGenomic_start() -
1366(*exon)->GetGenomic_end() - 1;
1373orientation.push_back(
1378 if((
int)qrange.
GetToOpen() < query_len) {
1385 "does not support this alignment structure");
1388ostr << cigar << sep;
1406ostr <<
MIN(mate->GetSeqStart(1), mate->GetSeqStop(1)) + 1;
1414ostr << template_length;
1423 if(!status && sequence.length() > 0) {
1424ostr << sequence << sep;
1433ostr << (has_qualities ? quality_str :
"*") ;
1437ostr << sep <<
"NH:i:"<< num_hits;
1442ostr << sep <<
"AS:i:"<< score;
1445ostr << sep <<
"NM:i:"<< edit_distance;
1451 if(!orientation.empty()) {
1454 switch(orientation[0]) {
1467 for(
size_t i=1;
i< orientation.size();
i++) {
1468 if(orientation[
i] != orientation[0]) {
1473ostr << sep <<
"XS:A:"<< ori;
1479 if(print_md_tag && !md_tag.empty()) {
1480vector<string> tokens;
1483ostr << sep <<
"MD:Z:";
1485 for(;
i< tokens.size();
i+=2) {
1486ostr << tokens[
i];
1488 if(
i< tokens.size() - 1) {
1492 for(
intk=0;k < num;k++) {
1499 if(!user_tag.empty()) {
1500ostr << sep <<
"XU:Z:"<< user_tag;
1512 const string& user_tag)
1517 if(!
results.IsPaired() || first_seg) {
1518 id.
Set(
results.GetQueryId().AsFastaString());
1521 id.
Set(
results.GetLastId().AsFastaString());
1527 if(trim_read_ids &&
1531read_id.resize(read_id.length() - 2);
1533ostr << read_id << sep;
1539 if((first_seg && !
results.LastAligned()) ||
1540(!first_seg && !
results.FirstAligned())) {
1552ostr <<
flags<< sep;
1579 if(status || sequence.empty()) {
1583ostr << sequence << sep;
1589ostr << (has_qualities ? quality_str :
"*");
1595ostr << sep <<
"YF:Z:F";
1598 if(!user_tag.empty()) {
1599ostr << sep <<
"XU:Z:"<< user_tag;
1612 boolis_spliced,
intbatch_number,
1613 booltrim_read_id,
boolprint_unaligned,
1617 const string& user_tag)
1619 boolfirst_secondary =
false;
1620 boollast_secondary =
false;
1622 if(strand_specific ==
eFwdRev) {
1625 else if(strand_specific ==
eRevFwd) {
1630 boolis_concordant =
results.IsConcordant();
1632 if(!no_discordant || (no_discordant && is_concordant)) {
1633 for(
autoit:
results.GetSeqAlign()->Get()) {
1634 PrintSAM(ostr, *it, queries, query_info, is_spliced, batch_number,
1635first_secondary, last_secondary, trim_read_id,
1636strand_specific, only_specific, print_md_tag,
false,
1642 if(!print_unaligned) {
1647(no_discordant && !is_concordant)) {
1650trim_read_id, user_tag);
1651unaligned_ostr << endl;
1656(no_discordant && !is_concordant))) {
1658trim_read_id, user_tag);
1659unaligned_ostr << endl;
1675 boolprint_unaligned,
1680 const string& user_tag)
1686 PrintSAM(ostr, unaligned_ostr, unaligned_fmt, *it, bioseqs, query_info,
1687is_spliced, batch_number, trim_read_id, print_unaligned,
1688no_discordant, strand_specific, only_specific, print_md_tag,
1702 for(
autoit: aligns.
Set()) {
1711 if(it->IsTitle()) {
1712vector<string> tokens;
1720it->SetSegs().SetSpliced().SetProduct_id(*seqid);
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.
User-defined methods of the data storage class.
Produce formatted blast output for command line applications.
Interface for reading SRA sequences into blast input.
Routines for creating nucleotide BLAST lookup tables.
#define MAGICBLAST_MAX_INSERT_SIZE_NONSPLICED
#define MAGICBLAST_MAX_INSERT_SIZE_SPLICED
Default maximum insert size: distance on the subject between reads that belong to a pair,...
@ fPartialFlag
The other segment is not present (did not pass quality filtering.
@ fFirstSegmentFlag
The first sequence of a pair.
@ fLastSegmentFlag
The last sequence of a pair.
Declarations of auxiliary functions using IBlastSeqInfoSrc to retrieve ids and related sequence infor...
Int4 BlastSeqSrcIteratorNext(const BlastSeqSrc *seq_src, BlastSeqSrcIterator *itr)
Increments the BlastSeqSrcIterator.
BlastSeqSrcIterator * BlastSeqSrcIteratorFree(BlastSeqSrcIterator *itr)
Frees the BlastSeqSrcIterator structure.
BlastSeqSrcIterator * BlastSeqSrcIteratorNew(void)
Allocate and initialize an iterator over a BlastSeqSrc with a default chunk size for MT-safe iteratio...
#define BLAST_SEQSRC_EOF
No more sequences available.
void BlastSeqSrcResetChunkIterator(BlastSeqSrc *seq_src)
Reset the internal "bookmark" of the last chunk for iteration provided by this object.
const CSeq_id * GetFirstId() const
EOutputFormat
Defines the output formats supported by our command line formatter.
@ eTabular
Tabular output.
@ eFasta
unaligned reads in magicblast
Results of Magic-BLAST mapping.
Magic-BLAST results for a single query/read or a pair of reads.
static SIZE_TYPE Convert(const CTempString &src, TCoding src_coding, TSeqPos pos, TSeqPos length, string &dst, TCoding dst_coding)
void GetTaxIDs(int oid, map< TGi, TTaxId > &gi_to_taxid, bool persist=false) const
Get taxid for an OID.
static SIZE_TYPE ReverseComplement(const string &src, TCoding src_coding, TSeqPos pos, TSeqPos length, string &dst)
@ eScore_PercentIdentity_Gapped
CRange< TSeqPos > GetSeqRange(TDim row) const
GetSeqRange NB: On a Spliced-seg, in case the product-type is protein, these only return the amin par...
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
bool GetNamedScore(const string &id, int &score) const
Get score.
TSeqPos GetSeqStart(TDim row) const
ENa_strand GetSeqStrand(TDim row) const
Get strand (the first one if segments have different strands).
CConstRef< CUser_object > FindExt(const string &ext_type) const
Find extension by type in ext container.
Abstract base class to encapsulate retrieval of sequence identifiers.
bool IsConsensusSplice(const string &splice5, const string &splice3)
Consensus splice is GY..AG or AT..AC.
bool IsKnownNonConsensusSplice(const string &splice5, const string &splice3)
GT-{TG,GG,AT,AA} or {GA,TT,AT,GG}-AG or AT-{AT,AA}.
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
CRef< CSeqDB > GetSeqDb() const
Obtain a reference to the database.
BlastSeqSrc * MakeSeqSrc()
Retrieves or constructs the BlastSeqSrc.
bool IsBlastDb() const
Returns true if this object represents a BLAST database.
IBlastSeqInfoSrc * MakeSeqInfoSrc()
Retrieves or constructs the IBlastSeqInfoSrc.
CRef< CSearchDatabase > GetSearchDatabase()
void GetSequenceLengthAndId(const IBlastSeqInfoSrc *seqinfo_src, int oid, CRef< objects::CSeq_id > &seqid, TSeqPos *length)
Retrieves subject sequence Seq-id and length.
@ fUnaligned
Read is unaligned.
@ fFiltered
Read did not pass quality filtering.
unsigned int TSeqPos
Type for sequence locations and lengths.
#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 TPrim & Get(void) const
#define MSerial_AsnText
I/O stream manipulators â.
const string AsFastaString(void) const
string GetSeqIdString(bool with_version=false) const
Return seqid string with optional version for text seqid type.
CSeq_id & Set(const CTempString &the_id, TParseFlags flags=fParse_AnyRaw)
Reassign based on flat specifications; arguments interpreted as with constructors.
bool Match(const CSeq_id &sid2) const
Match() - TRUE if SeqIds are equivalent.
static int BlastRank(const CRef< CSeq_id > &id)
void Reset(void)
Reset reference object.
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty â pointing to an object and has a non-null value.
bool NotEmpty(void) const THROWS_NONE
Check if CConstRef is not empty â pointing to an object and has a non-null value.
int32_t Int4
4-byte (32-bit) signed integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
position_type GetLength(void) const
bool NotEmpty(void) const
position_type GetToOpen(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.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
bool IsStr(void) const
Check if variant Str is selected.
const TTag & GetTag(void) const
Get the Tag member data.
bool IsId(void) const
Check if variant Id is selected.
const TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
vector< CRef< CUser_field > > TData
TId GetId(void) const
Get the variant data.
const TDenseg & GetDenseg(void) const
Get the variant data.
Tdata & Set(void)
Assign a value to data member.
E_Choice Which(void) const
Which variant is currently selected.
const TStarts & GetStarts(void) const
Get the Starts member data.
const TLens & GetLens(void) const
Get the Lens member data.
TProduct_length GetProduct_length(void) const
Get the Product_length member data.
vector< TSignedSeqPos > TStarts
const TSpliced & GetSpliced(void) const
Get the variant data.
list< CRef< CSpliced_exon > > TExons
const TExons & GetExons(void) const
Get the Exons member data.
bool IsDisc(void) const
Check if variant Disc is selected.
list< CRef< CSpliced_exon_chunk > > TParts
bool IsSetProduct_length(void) const
length of the product, in bases/residues from this (or from poly-a if present), a 3' unaligned length...
bool IsSpliced(void) const
Check if variant Spliced is selected.
const TDisc & GetDisc(void) const
Get the variant data.
const Tdata & Get(void) const
Get the member data.
const TSegs & GetSegs(void) const
Get the Segs member data.
bool IsDenseg(void) const
Check if variant Denseg is selected.
@ e_Product_ins
insertion in product sequence (i.e. gap in the genomic sequence)
@ e_Genomic_ins
insertion in genomic sequence (i.e. gap in the product sequence)
@ e_Match
both sequences represented, product and genomic sequences match
@ e_Mismatch
both sequences represented, product and genomic sequences do not match
ENa_strand
strand of nucleic acid
const TSeq & GetSeq(void) const
Get the variant data.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
const TInst & GetInst(void) const
Get the Inst member data.
const TIupacna & GetIupacna(void) const
Get the variant data.
bool IsSetAnnot(void) const
Check if a value has been assigned to Annot data member.
const TAnnot & GetAnnot(void) const
Get the Annot member data.
const Tdata & Get(void) const
Get the member data.
TLength GetLength(void) const
Get the Length member data.
bool IsSetDescr(void) const
descriptors Check if a value has been assigned to Descr data member.
const TNcbi4na & GetNcbi4na(void) const
Get the variant data.
const TNcbi2na & GetNcbi2na(void) const
Get the variant data.
const TSeq_data & GetSeq_data(void) const
Get the Seq_data member data.
const TNcbi8na & GetNcbi8na(void) const
Get the variant data.
const TDescr & GetDescr(void) const
Get the Descr member data.
E_Choice Which(void) const
Which variant is currently selected.
@ e_Ncbi2na
2 bit nucleic acid code
@ e_Iupacna
IUPAC 1 letter nuc acid code.
@ e_Ncbi8na
8 bit extended nucleic acid code
@ e_Ncbi4na
4 bit nucleic acid code
unsigned int
A callback function used to compare two keys in a database.
Declares CMagicBlast, the C++ API for the BLAST RNA-Seq mapping engine.
#define SAM_FLAG_SECONDARY
#define SAM_FLAG_FIRST_SEGMENT
static CNcbiOstream & PrintTabularUnaligned(CNcbiOstream &ostr, const CMagicBlastResults &results, const TQueryMap &queries, bool first_seg, const string &user_tag)
unordered_map< string, CRef< CSeq_entry > > TQueryMap
#define SAM_FLAG_SEGS_ALIGNED
static const CBioseq & s_GetQueryBioseq(const TQueryMap &queries, const CSeq_id &seqid)
static string s_GetSequenceId(const CBioseq &bioseq)
CNcbiOstream & PrintSAMHeader(CNcbiOstream &ostr, CRef< CLocalDbAdapter > db_adapter, const string &cmd_line_args)
CNcbiOstream & PrintASN1(CNcbiOstream &ostr, const CBioseq_set &query_batch, CSeq_align_set &aligns)
static CNcbiOstream & PrintSAMUnaligned(CNcbiOstream &ostr, const CMagicBlastResults &results, const TQueryMap &queries, bool first_seg, bool trim_read_ids, const string &user_tag)
unordered_set< const CSeq_id *, hash_seqid, eq_seqid > TSeq_idHashSet
#define SAM_FLAG_SEQ_REVCOMP
#define SAM_FLAG_NEXT_REVCOMP
#define SAM_FLAG_LAST_SEGMENT
static bool s_GetQualityString(const CBioseq &bioseq, string &quality_str)
CNcbiOstream & PrintTabularHeader(CNcbiOstream &ostr, const string &version, const string &cmd_line_args, bool user_tag)
static int s_GetQuerySequence(const CBioseq &bioseq, const CRange< TSeqPos > &range, bool reverse_complement, string &sequence)
static CNcbiOstream & PrintTabular(CNcbiOstream &ostr, const CSeq_align &align, const TQueryMap &queries, bool is_paired, int batch_number, int compartment, const string &user_tag, const CSeq_align *mate=NULL)
static CNcbiOstream & PrintUnaligned(CNcbiOstream &ostr, CFormattingArgs::EOutputFormat fmt, const CMagicBlastResults &results, const TQueryMap &queries, bool first_seg, bool trim_read_ids, const string &user_tag)
static string s_GetFastaDefline(const CBioseq &bioseq)
static CNcbiOstream & PrintFastaUnaligned(CNcbiOstream &ostr, const CMagicBlastResults &results, const TQueryMap &queries, bool first_seg)
static ENa_strand s_GetSpliceSiteOrientation(const CSpliced_seg::TExons::const_iterator &exon, const CSpliced_seg::TExons::const_iterator &next_exon)
static CNcbiOstream & PrintSAM(CNcbiOstream &ostr, const CSeq_align &align, const TQueryMap &queries, const BlastQueryInfo *query_info, bool is_spliced, int batch_number, bool &first_secondary, bool &last_secondary, bool trim_read_ids, E_StrandSpecificity strand_specific, bool only_specific, bool print_md_tag, bool other=false, const string &user_tag="", const CSeq_align *mate=NULL)
#define SAM_FLAG_SEG_UNMAPPED
static string s_GetBareId(const CSeq_id &id)
static void s_CreateQueryMap(const CBioseq_set &query_batch, TQueryMap &query_map)
static char s_Complement(char c)
#define SAM_FLAG_MULTI_SEGMENTS
#define SAM_FLAG_NEXT_SEG_UNMAPPED
const string version
version string
#define MIN(a, b)
returns smaller of a and b.
#define MAX(a, b)
returns larger of a and b.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...
NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...
Declares the CRemoteBlast class.
Flat formatter for Sequence Alignment/Map (SAM).
Int4 segment_flags
Flags describing segments for paired reads.
The query related information.
BlastContextInfo * contexts
Information per context.
Complete type definition of Blast Sequence Source Iterator.
Complete type definition of Blast Sequence Source ADT.
bool operator()(const CSeq_id *a, const CSeq_id *b) const
size_t operator()(const CSeq_id *s) const
static CS_CONTEXT * context
static Uint4 reverse_complement(Uint4 seq, Uint1 size)
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