{
return;
}
-
- int gSize = sg.getSize();
- SequenceI[] seqs = new SequenceI[gSize];
- SequenceFeature[] features = new SequenceFeature[gSize];
-
+ int rsize=0,gSize = sg.getSize();
+ SequenceI[] rseqs,seqs = new SequenceI[gSize];
+ SequenceFeature[] tfeatures,features = new SequenceFeature[gSize];
+
for (int i = 0; i < gSize; i++)
{
- seqs[i] = sg.getSequenceAt(i);
int start = sg.getSequenceAt(i).findPosition(sg.getStartRes());
int end = sg.findEndRes(sg.getSequenceAt(i));
- features[i] = new SequenceFeature(null, null, null, start, end,
+ if (start<=end)
+ {
+ seqs[rsize] = sg.getSequenceAt(i);
+ features[rsize] = new SequenceFeature(null, null, null, start, end,
"Jalview");
+ rsize++;
+ }
}
+ rseqs = new SequenceI[rsize];
+ tfeatures = new SequenceFeature[rsize];
+ System.arraycopy(seqs,0,rseqs, 0, rsize);
+ System.arraycopy(features, 0, tfeatures, 0, rsize);
+ features = tfeatures;
+ seqs = rseqs;
if (ap.seqPanel.seqCanvas.getFeatureRenderer().amendFeatures(seqs,
features, true, ap))
{
return;
}
-
- int gSize = sg.getSize();
- SequenceI[] seqs = new SequenceI[gSize];
- SequenceFeature[] features = new SequenceFeature[gSize];
-
+ int rsize=0,gSize = sg.getSize();
+ SequenceI[] rseqs,seqs = new SequenceI[gSize];
+ SequenceFeature[] tfeatures,features = new SequenceFeature[gSize];
+
for (int i = 0; i < gSize; i++)
{
- seqs[i] = sg.getSequenceAt(i).getDatasetSequence();
int start = sg.getSequenceAt(i).findPosition(sg.getStartRes());
int end = sg.findEndRes(sg.getSequenceAt(i));
- features[i] = new SequenceFeature(null, null, null, start, end,
+ if (start<=end)
+ {
+ seqs[rsize] = sg.getSequenceAt(i).getDatasetSequence();
+ features[rsize] = new SequenceFeature(null, null, null, start, end,
"Jalview");
+ rsize++;
+ }
}
-
+ rseqs = new SequenceI[rsize];
+ tfeatures = new SequenceFeature[rsize];
+ System.arraycopy(seqs,0,rseqs, 0, rsize);
+ System.arraycopy(features, 0, tfeatures, 0, rsize);
+ features = tfeatures;
+ seqs = rseqs;
if (ap.seqPanel.seqCanvas.getFeatureRenderer().amendFeatures(seqs,
features, true, ap))
{