X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FRnamlFile.java;h=69786fba1dad765ce09847a0244d5c21c4c930d2;hb=c5677e9860106a821a3e6e0429b20ede7b9a732a;hp=e614e6b9dd08de41ecaddc3b668983c175b8be0b;hpb=a7f8fa9c06d82efbbdbc6a0bf1054bb21610b353;p=jalview.git diff --git a/src/jalview/io/RnamlFile.java b/src/jalview/io/RnamlFile.java index e614e6b..69786fb 100644 --- a/src/jalview/io/RnamlFile.java +++ b/src/jalview/io/RnamlFile.java @@ -10,6 +10,7 @@ import jalview.datamodel.SecondaryStructureAnnotation; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; +import jalview.ws.jws1.Annotate3D; import java.io.BufferedReader; import java.io.FileNotFoundException; @@ -36,6 +37,7 @@ import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax; import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed; import fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied; import fr.orsay.lri.varna.factories.RNAFactory; +import fr.orsay.lri.varna.factories.RNAFactory.RNAFileType; import fr.orsay.lri.varna.models.rna.RNA; import fr.orsay.lri.varna.utils.RNAMLParser; @@ -45,6 +47,7 @@ import fr.orsay.lri.varna.utils.RNAMLParser; public class RnamlFile extends AlignFile { public String id; + protected ArrayList result; public RnamlFile() { @@ -52,36 +55,114 @@ public class RnamlFile extends AlignFile } - public RnamlFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed + public RnamlFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException { super(inFile, type); } - public RnamlFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed + public RnamlFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException { super(source); } +// public RnamlFile(BufferedReader r) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed +// { +// super(); +// parse(r); +// // sets the index of each sequence in the alignment +// for( int i=0,c=seqs.size(); i 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 seq =new ArrayList(); - System.out.println(r); - ArrayList result = RNAFactory.loadSecStrRNAML(r); + //System.out.println(r); + + result = RNAFactory.loadSecStr(r,RNAFileType.FILE_TYPE_RNAML); System.out.println("this is the secondary scructure:" +result.toArray()); System.out.println("this is the secondary scructure:" +result.toString()); @@ -110,7 +191,7 @@ public class RnamlFile extends AlignFile for(int j=0;j