Commit 73d85874 authored by Cyprien Borée's avatar Cyprien Borée Committed by Mikaël Salson

replace pair_automaton with automaton_5

Since in the future there might be another automaton (automaton_3), the
pair_automaton variable has been changed to automaton_5 in many files.

see #3267 and #3267 (comment 96152)
parent 0a0d604b
......@@ -24,7 +24,7 @@ void Germline::init(string _code, char _shortcut,
affect_5 = string(1, toupper(shortcut)) + "-" + code + "V";
affect_4 = string(1, 14 + shortcut) + "-" + code + "D";
affect_3 = string(1, tolower(shortcut)) + "-" + code + "J";
pair_automaton = buildACAutomatonToFilterBioReader(rep_5, seed);
automaton_5 = buildACAutomatonToFilterBioReader(rep_5, seed);
}
......@@ -210,14 +210,14 @@ void Germline::override_rep5_rep3_from_labels(KmerAffect left, KmerAffect right)
Germline::~Germline()
{
if(pair_automaton){
if(pair_automaton->first){
delete pair_automaton->first;
if(automaton_5){
if(automaton_5->first){
delete automaton_5->first;
}
if(pair_automaton->second){
delete pair_automaton->second;
if(automaton_5->second){
delete automaton_5->second;
}
delete pair_automaton;
delete automaton_5;
}
if (index)
{
......
......@@ -70,8 +70,8 @@ class Germline {
string seed="", int max_indexing=0);
~Germline();
pair<vector<int>*, AbstractACAutomaton<KmerAffect>*>* pair_automaton;
pair<vector<int>*, AbstractACAutomaton<KmerAffect>*>* automaton_5;
int seg_method ;
string code ;
char shortcut ;
......
......@@ -1049,7 +1049,7 @@ FineSegmenter::FineSegmenter(Sequence seq, Germline *germline, Cost segment_c,
/* Regular 53 Segmentation */
BioReader filtered = filterBioReaderWithACAutomaton(germline->pair_automaton, germline->rep_5, sequence_or_rc);
BioReader filtered = filterBioReaderWithACAutomaton(germline->automaton_5, germline->rep_5, sequence_or_rc);
align_against_collection(sequence_or_rc, filtered, NO_FORBIDDEN_ID, reverse_V, reverse_V, false,
box_V, segment_cost);
align_against_collection(sequence_or_rc, germline->rep_3, NO_FORBIDDEN_ID, reverse_J, !reverse_J, false,
......
......@@ -357,7 +357,7 @@ void testGetNSignicativeKmers(){
for(int i = 0; i < germline.rep_5.size(); ++i){
Sequence seq = germline.rep_5.read(i);
filtered = filterBioReaderWithACAutomaton(germline.pair_automaton, germline.rep_5, seq.sequence, 1);
filtered = filterBioReaderWithACAutomaton(germline.automaton_5, germline.rep_5, seq.sequence, 1);
int j = 0;
while(j < filtered.size()){
if(extractGeneName(filtered.label(j)) == extractGeneName(seq.label)){
......
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