Skip to content

Commit

Permalink
a little more doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tedsharpe committed Jul 25, 2019
1 parent c1e2249 commit c78d21e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1018,10 +1018,11 @@ public CodonVariationGroup( final int[] refCodonValues, final CodonVariation cod
// returns false if the presented variation cannot be added to the group
public boolean addVariation( final CodonVariation codonVariation ) {
final int codonId = codonVariation.getCodonId();
// if we're skipping a codon, start a new group (except for frameshift groups)
if ( codonId > endingCodon + 1 && !isFrameShift ) return false;
switch ( codonVariation.getVariationType() ) {
case FRAMESHIFT:
return false;
return false; // start new group for the frameshift
case INSERTION:
insCount += 1;
altCalls.append(codonTranslation.charAt(codonVariation.getCodonValue()));
Expand All @@ -1037,6 +1038,7 @@ public boolean addVariation( final CodonVariation codonVariation ) {
if ( !isEmpty() ) altCalls.append(aa);
break;
}
// synonymous codon -- start new group
return false;
}
if ( isFrameShift && isEmpty() ) startingCodon = codonId;
Expand Down

0 comments on commit c78d21e

Please sign in to comment.