- {
- residueHash = new Hashtable();
- for (j = 0; j < jSize; j++) //foreach row
- {
- if (sequences[j]==null)
- {
- System.err.println("WARNING: Consensus skipping null sequence - possible race condition.");
- continue;
- }
- seq = sequences[j].getSequence();
- if (seq.length > i)
- {
- c = seq[i];
- s = struc[i];
- nonGap=0;
-
- //standard representation for gaps in sequence and structure
- if (c == '.' || c == ' ')
- {
- c = '-';
- }
- if (s == '.' || s == ' ')
- {
- s = '-';
- }
-
- if (c == '-')
- {
- values['-']++;
- continue;
- }
- if(s == '-'){
- values['-']++;
- continue;
- }
- nonGap++;
- cEnd=seq[rna[i].getEnd()];
- if(checkBpType(c,cEnd)){
- values['H']++; //H means it's a helix (structured)
- }
- }
- }
- /*UPDATE this for new values
+ {
+ residueHash = new Hashtable();
+ maxResidue="";
+ values = new int[255];
+ bpEnd=-1;
+
+ s = struc[i];
+ if (s == '.' || s == ' ')
+ {
+ s = '-';
+ }
+
+ if(s == '-'){
+ values['-']++;
+ }
+ else
+ {
+ for (j = 0; j < jSize; j++) //foreach row
+ {
+ if (sequences[j]==null)
+ {
+ System.err.println("WARNING: Consensus skipping null sequence - possible race condition.");
+ continue;
+ }
+ seq = sequences[j].getSequence();
+
+ if (seq.length > i)
+ {
+ c = seq[i];
+
+ //standard representation for gaps in sequence and structure
+ if (c == '.' || c == ' ')
+ {
+ c = '-';
+ }
+
+ if (c == '-')
+ {
+ values['-']++;
+ continue;
+ }
+ if(s == '('){
+ bpEnd=rna[(rna.length-1-nonGap)].getEnd();
+ cEnd=seq[bpEnd];
+ if(checkBpType(c,cEnd)){
+ values['H']++; //H means it's a helix (structured)
+ }
+ }
+ }
+ }
+ nonGap++;
+ }
+ /*UPDATE this for new values