Commit 4f05481d authored by Mathieu Giraud's avatar Mathieu Giraud

core/output.cpp: AIRR fields 'vj_in_frame', 'stop_codon'

see #3569
parent d1590646
#include "output.h"
#include "segment.h"
#define NULL_VAL ""
#define AIRR_TRUE "T"
......@@ -184,7 +185,18 @@ map <string, string> CloneOutputAIRR::fields()
fields["cdr3_aa"] = get(KEY_SEG, "cdr3", "aa");
fields["junction"] = NULL_VAL;
fields["junction_aa"] = get(KEY_SEG, "junction", "aa");
fields["productive"] = TF_format_bool(get(KEY_SEG, "junction", "productive"));
bool productive = (fields["productive"] == AIRR_TRUE); // thsus false for both AIRR_FALSE and NULL_VAL
string unproductive = get(KEY_SEG, "junction", "unproductive");
fields["vj_in_frame"] = productive ? AIRR_TRUE
: unproductive == UNPROD_STOP_CODON ? AIRR_TRUE
: unproductive == UNPROD_OUT_OF_FRAME ? AIRR_FALSE
: NULL_VAL;
fields["stop_codon"] = productive ? AIRR_FALSE
: unproductive == UNPROD_STOP_CODON ? AIRR_TRUE
: NULL_VAL;
fields["rev_comp"] = NULL_VAL;
fields["warnings"] = getWarnings();
......@@ -202,6 +214,7 @@ void SampleOutputAIRR::out(ostream &s)
"sequence",
"productive",
"vj_in_frame", "stop_codon",
"junction_aa",
"junction",
"cdr3_aa",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment