-
- if(ap.av.alignment.isNucleotide()==true){
- AlignmentAnnotation[] aa = ap.av.alignment.getAlignmentAnnotation();
- String rnastruc=new String();
- for(int i=0; i<aa.length;i++){
- if(aa[i].getRNAStruc() != null){
- rnastruc=aa[i].getRNAStruc();
- break;
- }
- }
-
- AlignmentAnnotation a[] = seq.getAnnotation();
-
- //TODO: make rnastrucF a bit more nice
- final String rnastrucF=rnastruc;
- menuItem = new JMenuItem();
- menuItem.setText("RNA structure");
- menuItem.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- //System.out.println("Call Varna "+seq.getSequenceAsString()+" "+seq.getName());
- //TODO: VARNA does'nt print gaps in the sequence
-
- new AppVarna(seq.getSequenceAsString(),rnastrucF,seq.getName(),ap);
- }
- });
- viewStructureMenu.add(menuItem);
- }
+
+ if (ap.av.alignment.isNucleotide() == true)
+ {
+ AlignmentAnnotation[] aa = ap.av.alignment.getAlignmentAnnotation();
+ for (int i = 0; i < aa.length; i++)
+ {
+ if (aa[i].getRNAStruc() != null)
+ {
+ final String rnastruc = aa[i].getRNAStruc();
+
+ menuItem = new JMenuItem();
+ menuItem.setText("RNA structure - consensus");
+ menuItem.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ new AppVarna(seq.getSequenceAsString(), rnastruc, seq
+ .getName(), ap);
+ }
+ });
+ viewStructureMenu.add(menuItem);
+ }
+ }
+
+ // SequenceFeatures[] test = seq.getSequenceFeatures();
+
+ if (seq.getAnnotation() != null)
+ {
+ AlignmentAnnotation seqAnno[] = seq.getAnnotation();
+ for (int i = 0; i < seqAnno.length; i++)
+ {
+ if (seqAnno[i].getRNAStruc() != null)
+ {
+ final String rnastruc = seqAnno[i].getRNAStruc();
+
+ // TODO: make rnastrucF a bit more nice
+ menuItem = new JMenuItem();
+ menuItem.setText("RNA structure - "+seq.getName());
+ menuItem.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ // TODO: VARNA does'nt print gaps in the sequence
+ new AppVarna(seq.getSequenceAsString(), rnastruc, seq
+ .getName(), ap);
+ }
+ });
+ viewStructureMenu.add(menuItem);
+ }
+ }
+ }
+
+
+ }