Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consistency of option "--outfmt 6 qseq sseq" with blastp #818

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions src/output/blast_tab_format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ void Blast_tab_format::print_match(const HspContext& r, Output::Info& info)
out << ",";
out << "\n\t{\n";
}
HspContext::Iterator qi = r.begin(), si = r.begin();
for (auto i = fields.cbegin(); i != fields.cend(); ++i) {
if(is_json){
out << prepos << "\"" << field_def[*i].key << "\":";
Expand Down Expand Up @@ -277,17 +278,19 @@ void Blast_tab_format::print_match(const HspContext& r, Output::Info& info)
out << r.subject_source_range().end_;
break;
case 17:
r.query.source().print(out, r.query_source_range().begin_, r.query_source_range().end_, input_value_traits);
break;
//r.query.source().print(out, r.query_source_range().begin_, r.query_source_range().end_, input_value_traits);
while (qi.good()) { out << qi.query_char(); ++qi; }
break; // qseq
case 18:
{
vector<Letter> seq;
seq.reserve(r.subject_range().length());
for (HspContext::Iterator j = r.begin(); j.good(); ++j)
if (!(j.op() == op_insertion))
seq.push_back(j.subject());
out << Sequence(seq);
break;
//vector<Letter> seq;
//seq.reserve(r.subject_range().length());
//for (HspContext::Iterator j = r.begin(); j.good(); ++j)
//if (!(j.op() == op_insertion))
//seq.push_back(j.subject());
//out << Sequence(seq);
while (si.good()) { out << si.subject_char(); ++si; }
break; // sseq
}
case 19:
out.print_e(r.evalue());
Expand Down Expand Up @@ -670,4 +673,4 @@ void Blast_tab_format::print_footer(Consumer &f) const {
const char* s = "\n]";
f.consume(s, strlen(s));
}
}
}