X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2Fscoremodels%2FFeatureDistanceModel.java;h=38217e922aa0633089bffccaa105f03f85096ca5;hb=a83adb45bdf9554e270921b4baad94defd314b36;hp=c20d4f1a76353ee54adcb41221ce5175c607057a;hpb=3d0101179759ef157b088ea135423cd909512d9f;p=jalview.git diff --git a/src/jalview/analysis/scoremodels/FeatureDistanceModel.java b/src/jalview/analysis/scoremodels/FeatureDistanceModel.java index c20d4f1..38217e9 100644 --- a/src/jalview/analysis/scoremodels/FeatureDistanceModel.java +++ b/src/jalview/analysis/scoremodels/FeatureDistanceModel.java @@ -55,12 +55,12 @@ public class FeatureDistanceModel extends DistanceScoreModel @Override public ScoreModelI getInstance(AlignmentViewPanel view) { - FeatureDistanceModel instance; + FeatureDistanceModel model; try { - instance = this.getClass().newInstance(); - instance.configureFromAlignmentView(view); - return instance; + model = this.getClass().newInstance(); + model.configureFromAlignmentView(view); + return model; } catch (InstantiationException | IllegalAccessException e) { System.err.println("Error in " + getClass().getName() @@ -177,10 +177,12 @@ public class FeatureDistanceModel extends DistanceScoreModel /** * Builds and returns a map containing a (possibly empty) list (one per * SeqCigar) of visible feature types at the given column position. The map - * has no entry for sequences which are gapped at the column position. + * does not include entries for features which straddle a gapped column + * positions. * * @param seqs * @param columnPosition + * (0..) * @return */ protected Map> findFeatureTypesAtColumn( @@ -192,9 +194,12 @@ public class FeatureDistanceModel extends DistanceScoreModel int spos = seq.findPosition(columnPosition); if (spos != -1) { + /* + * position is not a gap + */ Set types = new HashSet(); - List sfs = fr.findFeaturesAtRes(seq.getRefSeq(), - spos); + List sfs = fr.findFeaturesAtResidue( + seq.getRefSeq(), spos); for (SequenceFeature sf : sfs) { types.add(sf.getType());