public byte[] getConsensusSequence() {
		if (consensusPos!=-1) getConsensusBreakpointPosition();
		
		StringBuilder consensus = new StringBuilder();
		int pos = matrixStart;
		for (int[] vote : votingMatrix) {
			if (((increment==-1) && pos > consensusPos) || ((increment==1) && pos < consensusPos)) {
				pos += increment;
				continue; 
			}
			int max_vote = -1;
			int max_vote_idx = -1;
			int tot_vote = 0;
			for (int i=0; i<vote.length; i++) {
				tot_vote += vote[i];
				if (vote[i] > max_vote) {
					max_vote = vote[i];
					max_vote_idx = i;
				}
			}
			if ( (float)max_vote/(float)tot_vote <= 0.5 ) max_vote_idx = 0;
			char b = Utilities.indexToNucleotide(max_vote_idx);
			consensus.append(b);
			
			pos += increment;
		}
		votingMatrix = null;
		
		return Utilities.stringToByte(consensus.toString());
	}