+ Hashtable seqhash = new Hashtable();
+ Vector headers = new Vector();
+ //ArrayList<String> seq =new ArrayList();
+ //System.out.println(r);
+
+
+ result = RNAFactory.loadSecStrRNAML(r);
+
+ System.out.println("this is the secondary scructure:" +result.toArray());
+ //System.out.println("this is the secondary scructure:" +result.toString());
+ //System.out.println("this is the secondary scructure:" +result.size());
+ for(int i=0;i<result.size();i++)
+ {
+ //System.out.println(result.get(0).getSeq());
+ //System.out.println(result.get(0).getStructBPSEQ());
+ //System.out.println(result.get(0).getStructDBN(true));
+ String rna1 =result.get(0).getStructDBN(true);
+ //System.out.println(result.get(0).getAnnotations());
+ String seq = result.get(0).getSeq();
+ System.out.println(type); //the type is "File"
+ System.out.println(inFile );//inFile is the path
+ int begin=0;
+ int end = seq.length()-1;
+ SequenceI[] seqs = new SequenceI[1];
+ id = safeName(getDataName());
+ seqs[0] = new Sequence(id, seq, begin, end);
+ SequenceFeature feat = new SequenceFeature(type, "",5, 13, 0f, null);
+ seqs[0].addSequenceFeature(feat);
+ this.setSeqs(seqs);
+
+ String[] annot=new String[10000] ;
+ Annotation[] ann = new Annotation[1000];
+ for(int j=0;j<rna1.length();j++)
+ {
+ annot[j] =rna1.substring(j,j+1);
+ System.out.println(annot[j]);
+ }
+
+ for(int k=0;k<rna1.length();k++)
+ {
+ ann[k] = new Annotation(annot[k], "", ' ', 0f);
+
+ ann[k].secondaryStructure = jalview.schemes.ResidueProperties.getRNASecStrucState(annot[k]).charAt(0);
+
+ }
+ AlignmentAnnotation align = new AlignmentAnnotation("Secondary structure","",ann);
+ seqs[0].addAlignmentAnnotation(align);
+ seqs[0].setRNA(result.get(begin));
+ this.annotations.addElement(align);
+
+
+ }
+
+ //Annotate3D tintin = new Annotate3D();
+
+ //System.out.println(tintin);
+ }
+
+
+ public void parse(BufferedReader r) throws ExceptionPermissionDenied, ExceptionLoadingFailed, ExceptionFileFormatOrSyntax
+ {
+ System.out.println("parse with Buffer (RnamlFile");