- //for(int i = 0; i < columnsToRemove.size(); i++)
-// {
-// cout << "Remove Column " << i << " = ";
-// if(columnsToRemove[i])
-// cout << "true\n";
-// else
-// cout << "false\n";
-// }
- //Creating the new SequenceDB
- SequenceDB newDB;
- for(int i = 0; i < db->size(); i++) {
- Sequence curSeq = db->get(i);
- string curAligned = curSeq.getAligned();
- string curName = curSeq.getName();
- string newAligned = "";
- for(int j = 0; j < curAligned.length(); j++)
- if(!columnsToRemove[j])
- newAligned += curAligned.substr(j, 1);
-
- Sequence newSeq(curName, newAligned);
- newDB.add(newSeq);
+ int filteredLength = 0;
+ for(int i=0;i<alignmentLength;i++){
+ if(filter[i] == '1'){ filteredLength++; }