/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
public static final int PROTEIN = 0;
public static final int NUCLEOTIDE = 1;
+
+ public boolean hasRNAStructure = false;
/** DOCUMENT ME!! */
public AlignmentAnnotation[] annotations;
*/
public SequenceI getSequenceAt(int i)
{
- if (i < sequences.size())
+ if (i>-1 && i < sequences.size())
{
return (SequenceI) sequences.elementAt(i);
}
for (int i = 0; i < sequences.size(); i++)
{
Sequence seq = (Sequence) sequences.elementAt(i);
- seq.setSequence(seq.getSequenceAsString().replace('.', gc).replace(
- '-', gc).replace(' ', gc));
+ seq.setSequence(seq.getSequenceAsString().replace('.', gc)
+ .replace('-', gc).replace(' ', gc));
}
}
*/
public boolean deleteAnnotation(AlignmentAnnotation aa)
{
+ return deleteAnnotation(aa, true);
+ }
+
+ public boolean deleteAnnotation(AlignmentAnnotation aa, boolean unhook)
+ {
int aSize = 1;
if (annotations != null)
if (swap)
{
annotations = temp;
- unhookAnnotation(aa);
+ if (unhook) {
+ unhookAnnotation(aa);
+ }
}
return swap;
}
*/
public void addAnnotation(AlignmentAnnotation aa, int pos)
{
+ if(aa.getRNAStruc()!= null){
+ hasRNAStructure=true;
+ }
+
int aSize = 1;
if (annotations != null)
{
return false;
}
}
+
+ public boolean hasRNAStructure(){
+ //TODO can it happen that structure is removed from alignment?
+ return hasRNAStructure;
+ }
public void setDataset(Alignment data)
{