<classpathentry kind="lib" path="lib/spring-web-3.0.5.RELEASE.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
- <classpathentry kind="lib" path="lib/VARNAv3-9-dev.jar"/>
+ <classpathentry kind="lib" path="lib/VARNAv3-9-dev.jar" sourcepath="/VARNA3-1"/>
<classpathentry kind="lib" path="/usr/lib/jvm/java-7-oracle/jre/lib/plugin.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
String tmpPDBFile;
public PDBViewer(PDBEntry pdbentry, SequenceI[] seq, String[] chains,
- AlignmentPanel ap, String protocol) throws ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ AlignmentPanel ap, String protocol) throws ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
this.pdbentry = pdbentry;
import jalview.datamodel.*;
import jalview.io.FileParse;
+import jalview.io.RnamlFile;
+import jalview.ws.jws1.Annotate3D;
public class PDBfile extends jalview.io.AlignFile
{
*/
boolean VisibleChainAnnotation = false;
- public PDBfile(String inFile, String inType) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public PDBfile(String inFile, String inType) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(inFile, inType);
}
- public PDBfile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public PDBfile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(source);
}
return null;
}
- public void parse() throws IOException
+ public void parse() throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
// TODO set the filename sensibly - try using data source name.
id = safeName(getDataName());
if(isRNA(chainseq)==true)
{
System.out.println("this is a PDB format and RNA sequence");
+ Annotate3D an3d = new Annotate3D(id);
+ System.out.println(id);
+ //BufferedWriter r = an3d.getReader();
+
+ BufferedReader in = new BufferedReader(new FileReader("temp.rnaml"));
+
+ String str;
+ while ((str = in.readLine()) != null) {
+ System.out.println(str);
+ System.out.println("toto");
+
+ }
+ String type = "File";
+ RnamlFile rnaml =new RnamlFile("temp.rnaml",type);
+ System.out.println("Create rnamfile object");
+ //rnaml.parse("temp");
+ this.annotations =rnaml.getAnnot();
+
}
AlignmentAnnotation[] chainannot = chainseq.getAnnotation();
import jalview.schemes.PIDColourScheme;\r
import jalview.schemes.PurinePyrimidineColourScheme;\r
import jalview.schemes.RNAHelicesColourChooser;\r
+import jalview.schemes.RNAInteractionColourScheme;\r
import jalview.schemes.ResidueProperties;\r
import jalview.schemes.StrandColourScheme;\r
import jalview.schemes.TCoffeeColourScheme;\r
RNAHelixColour.setEnabled(false);\r
purinePyrimidineColour.setEnabled(false);\r
}\r
+ \r
// Some JVMS send keyevents to Top frame or lowest panel,\r
// Havent worked out why yet. So add to both this frame and seqCanvas for\r
// now\r
{\r
changeColour(new PurinePyrimidineColourScheme());\r
}\r
+ else if (source == RNAInteractionColour)\r
+ {\r
+ changeColour(new RNAInteractionColourScheme());\r
+ }\r
else if (source == RNAHelixColour)\r
{\r
new RNAHelicesColourChooser(viewport, alignPanel);\r
MenuItem buriedColour = new MenuItem();\r
\r
MenuItem purinePyrimidineColour = new MenuItem();\r
+ MenuItem RNAInteractionColour = new MenuItem();\r
MenuItem RNAHelixColour = new MenuItem();\r
\r
MenuItem userDefinedColour = new MenuItem();\r
buriedColour.addActionListener(this);\r
purinePyrimidineColour.setLabel("Purine/Pyrimidine");\r
purinePyrimidineColour.addActionListener(this);\r
+ RNAInteractionColour.setLabel("Purine/Pyrimidine");\r
+ RNAInteractionColour.addActionListener(this);\r
RNAHelixColour.setLabel("by RNA Helices");\r
RNAHelixColour.addActionListener(this);\r
userDefinedColour.setLabel("User Defined...");\r
colourMenu.add(buriedColour);\r
colourMenu.add(nucleotideColour);\r
colourMenu.add(purinePyrimidineColour);\r
+ colourMenu.add(RNAInteractionColour);\r
colourMenu.add(tcoffeeColour);\r
colourMenu.add(userDefinedColour);\r
colourMenu.addSeparator();\r
* @throws ExceptionFileFormatOrSyntax \r
* @throws ExceptionLoadingFailed \r
* @throws ExceptionPermissionDenied \r
+ * @throws InterruptedException \r
*/\r
- public boolean loadScoreFile( String source ) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed {\r
+ public boolean loadScoreFile( String source ) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException {\r
\r
TCoffeeScoreFile file = new TCoffeeScoreFile(source, AppletFormatAdapter.checkProtocol(source));\r
if( !file.isValid()) {\r
import jalview.analysis.Rna;
import jalview.analysis.WUSSParseException;
+import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Hashtable;
+import fr.orsay.lri.varna.models.rna.RNA;
+
/**
* DOCUMENT ME!
*
/** DOCUMENT ME!! */
public Annotation[] annotations;
+
+
/**
* RNA secondary structure contact positions
else
// Check for RNA secondary structure
{
- if (annotations[i].secondaryStructure == 'S')
+ if (annotations[i].secondaryStructure == 'S'
+ || annotations[i].secondaryStructure == 'C')
{
hasIcons |= true;
isrna |= true;
{
if (annotations[i] == null)
annotations[i] = new Annotation(String.valueOf(gapchar), null,
- ' ', 0f);
+ ' ', 0f,null);
else if (annotations[i].displayCharacter == null
|| annotations[i].displayCharacter.equals(" "))
annotations[i].displayCharacter = String.valueOf(gapchar);
this.calcId = calcId;
}
+
+
}
package jalview.datamodel;
import java.awt.*;
+import java.util.ArrayList;
+
+import fr.orsay.lri.varna.models.rna.RNA;
/**
* DOCUMENT ME!
/** DOCUMENT ME!! */
public float value;
+
+
// add visual cues here
description = desc;
secondaryStructure = ss;
value = val;
+
}
/**
secondaryStructure = that.secondaryStructure;
value = that.value;
colour = that.colour;
+
}
/**
*/
public Annotation(float val)
{
- this(null, null, ' ', val);
+ this(null, null, ' ', val,null);
}
+
+
+
+
}
import java.util.Enumeration;
import java.util.Vector;
+import fr.orsay.lri.varna.models.rna.RNA;
+
/**
*
* Implements the SequenceI interface for a char[] based sequence object.
String vamsasId;
DBRefEntry[] dbrefs;
+
+ RNA rna;
/**
* This annotation is displayed below the alignment but the positions are tied
* @param The position for this sequence. This value is zero-based (zero for this first sequence)
*/
public void setIndex(int value) { index = value; }
+
+ public void setRNA(RNA r){rna=r;}
+
+ public RNA getRNA() { return rna; }
+
}
*/
package jalview.datamodel;
+
import java.util.Vector;
+import fr.orsay.lri.varna.models.rna.RNA;
+
/**
* DOCUMENT ME!
*
* @return The index of the sequence in the alignment
*/
public int getIndex();
+
+ /**
+ * @return The RNA of the sequence in the alignment
+ */
+
+ public RNA getRNA();
+
+ /**
+ * @param rna The RNA.
+ */
+ public void setRNA(RNA rna);
+
}
AlignmentPanel ap;
- public AppVarna(String sname, SequenceI seq, String strucseq, String struc,
+ public AppVarna(String sname, SequenceI seq, String strucseq, RNA struc,
String name, AlignmentPanel ap)
{
- System.out.println("je suis là (AppVarna!!");
- System.out.println("1:"+sname);
- System.out.println("2:"+seq);
- System.out.println("3:"+strucseq);
- System.out.println("4:"+struc);
- System.out.println("5:"+name);
- System.out.println("6:"+ap);
+
+
this.ap = ap;
ArrayList<RNA> rnaList = new ArrayList<RNA>();
- RNA rna1 = new RNA(name);
- try
+ System.out.println(struc);
+ RNA rna1 = new RNA(struc);
+ rna1.setName(name);
+ rna1.restrictTo(strucseq);
+ /*try
{
- System.out.println("ou ici ?");
+ System.err.println(struc + "->" + replaceOddGaps(struc));
rna1.setRNA(strucseq, replaceOddGaps(struc));
- System.out.println("La séquence est :"+rna1.getSeq());
- System.out.println("La séquence est :"+struc);
- System.out.println("La séquence est :"+replaceOddGaps(struc).toString());
+
} catch (ExceptionUnmatchedClosingParentheses e2)
{
e2.printStackTrace();
} catch (ExceptionFileFormatOrSyntax e3)
{
e3.printStackTrace();
- }
+ }*/
RNA trim = trimRNA(rna1, "trimmed "+sname);
+ //TODO: Use RNA.selectTo instead...
rnaList.add(trim);
rnaList.add(rna1);
public void initVarna()
{
- System.out.println("initialisation VANRA");
+
// vab.setFinishedInit(false);
varnaPanel = vab.get_varnaPanel();
setBackground(Color.white);
getBounds().width, getBounds().height);
this.pack();
showPanel(true);
- System.out.println("Sortie initialisation VANRA");
+
}
public String replaceOddGaps(String oldStr)
{
// super("VARNA in Jalview");
initVarna(seq, struc);
- System.out.println("here(1)");
+
}
public AppVarnaBinding(ArrayList<RNA> rnaList)
{
- System.out.println("here(2)");
+;
// super("VARNA in Jalview");
initVarnaEdit(rnaList);
}
private void initVarna(String seq, String str)
{
- System.out.println("initialisation VARNA (appvarnabinding");
+
DefaultListModel dlm = new DefaultListModel();
DefaultListSelectionModel m = new DefaultListSelectionModel();
try
{
- System.out.println("here");
+
vp = new VARNAPanel("0", ".");
_RNA1.setRNA(seq, str);
_RNA1.drawRNARadiate(vp.getConfig());
private void initVarnaEdit(ArrayList<RNA> rnaInList)
{
- System.out.println("initialisation VARNA(2) (appvarnabinding");
+
DefaultListModel dlm = new DefaultListModel();
int marginTools = 40;
FullBackup sel = (FullBackup) _sideList.getSelectedValue();
Mapping map = Mapping.DefaultOutermostMapping(vp.getRNA()
.getSize(), sel.rna.getSize());
- vp.showRNAInterpolated(sel.rna, sel.config, map);
+ //vp.showRNAInterpolated(sel.rna, sel.config, map);
+ vp.showRNA(sel.rna, sel.config);
// _seq.setText(sel.rna.getSeq());
_str.setText(sel.rna.getStructDBN());
}
try
{
- System.out.println("here(plop)");
+
vp = new VARNAPanel("0", ".");
for (int i = 0; i < rnaInList.size(); i++)
{
rnaInList.get(i).drawRNARadiate(vp.getConfig());
- System.out.println(i);
+
}
} catch (ExceptionNonEqualLength e)
{
public void onUINewStructure(VARNAConfig v, RNA r)
{
- _rnaList.add(v, r, "", true);
+ //_rnaList.add(v, r, "", true);
}
public void onWarningEmitted(String s)
* @throws ExceptionFileFormatOrSyntax
* @throws ExceptionLoadingFailed
* @throws ExceptionPermissionDenied
+ * @throws InterruptedException
*/
- public PDBEntry associatePdbWithSeq(String choice, String protocol, SequenceI sequence, boolean prompt) throws ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public PDBEntry associatePdbWithSeq(String choice, String protocol, SequenceI sequence, boolean prompt) throws ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
PDBEntry entry = new PDBEntry();
try
protected JRadioButtonMenuItem BLOSUM62Colour = new JRadioButtonMenuItem();
protected JRadioButtonMenuItem purinePyrimidineColour = new JRadioButtonMenuItem();
+ protected JRadioButtonMenuItem RNAInteractionColour = new JRadioButtonMenuItem();
// protected JRadioButtonMenuItem covariationColour = new
// JRadioButtonMenuItem();
colours.add(PIDColour);
colours.add(BLOSUM62Colour);
colours.add(purinePyrimidineColour);
+ colours.add(RNAInteractionColour);
// colours.add(covariationColour);
for (int i = 0; i < jalview.io.FormatAdapter.WRITEABLE_FORMATS.length; i++)
menuItem = new JMenuItem();
menuItem.setText("2D RNA "+structureLine);
menuItem.addActionListener(new java.awt.event.ActionListener()
+
{
public void actionPerformed(ActionEvent e)
{
- System.out.println("1:"+structureLine);
- System.out.println("2:"+seq);
- System.out.println("3:"+seq.getSequenceAsString());
- System.out.println("4:"+rnastruc);
- System.out.println("5:"+seq.getName());
- System.out.println("6:"+ap);
- new AppVarna(structureLine, seq, seq.getSequenceAsString(), rnastruc, seq
- .getName(), ap);
+ //System.out.println("1:"+structureLine);
+ System.out.println("1:sname"+seq.getName());
+ System.out.println("2:seq"+seq);
+
+ //System.out.println("3:"+seq.getSequenceAsString());
+ System.out.println("3:strucseq"+rnastruc);
+ System.out.println("4:struc"+seq.getRNA());
+ System.out.println("5:name"+seq.getName());
+ System.out.println("6:ap"+ap);
+ new AppVarna(seq.getName(),seq,rnastruc,seq.getRNA(), seq.getName(), ap);
System.out.println("end");
}
});
{
// TODO: VARNA does'nt print gaps in the sequence
- new AppVarna(seq.getName()+" structure",seq,seq.getSequenceAsString(), rnastruc, seq
- .getName(), ap);
+ new AppVarna(seq.getName()+" structure",seq,rnastruc,seq.getRNA(),
+ seq.getName(), ap);
}
});
viewStructureMenu.add(menuItem);
{
purinePyrimidineColour.setSelected(true);
}
+
+ else if (sg.cs instanceof RNAInteractionColourScheme)
+ {
+ RNAInteractionColour.setSelected(true);
+ }
/*
* else if (sg.cs instanceof CovariationColourScheme) {
* covariationColour.setSelected(true); }
} catch (ExceptionLoadingFailed e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
+ } catch (InterruptedException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
}
}
});
colourMenu.add(turnColour);
colourMenu.add(buriedColour);
colourMenu.add(nucleotideMenuItem);
+ colourMenu.add(RNAInteractionColour);
if (ap.getAlignment().isNucleotide()) {
colourMenu.add(purinePyrimidineColour);
}
purinePyrimidineColour_actionPerformed();
}
});
+
+ RNAInteractionColour.setText("RNA Interaction type");
+ RNAInteractionColour
+ .addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ RNAInteractionColour_actionPerformed();
+ }
+ });
/*
* covariationColour.addActionListener(new java.awt.event.ActionListener() {
* public void actionPerformed(ActionEvent e) {
refresh();
}
+ protected void RNAInteractionColour_actionPerformed()
+ {
+ getGroup().cs = new RNAInteractionColourScheme();
+ refresh();
+ }
/*
* protected void covariationColour_actionPerformed() { getGroup().cs = new
* CovariationColourScheme(sequence.getAnnotation()[0]); refresh(); }
oal = null;
}
- public void pdbFromFile_actionPerformed() throws ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public void pdbFromFile_actionPerformed() throws ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
jalview.io.JalviewFileChooser chooser = new jalview.io.JalviewFileChooser(
jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
* @throws ExceptionFileFormatOrSyntax
* @throws ExceptionLoadingFailed
* @throws ExceptionPermissionDenied
+ * @throws InterruptedException
*/
- public AlignFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public AlignFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(inFile, type);
initData();
* @throws ExceptionFileFormatOrSyntax
* @throws ExceptionLoadingFailed
* @throws ExceptionPermissionDenied
+ * @throws InterruptedException
*/
- public AlignFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public AlignFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(source);
initData();
* @throws ParserConfigurationException
* @throws ExceptionLoadingFailed
* @throws ExceptionPermissionDenied
+ * @throws InterruptedException
*/
- public abstract void parse() throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed;
+ public abstract void parse() throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException;
/**
* Print out in alignment file format the Sequences in the seqs Vector.
}
else if (format.equals("PDB"))
{
- //if (contient de l'ARN)
- // {
- System.out.println(inFile); //donne le path
-
- //new URL = http://paradise-ibmc.u-strasbg.fr/webservices/annotate3d?data=inFile;
- //afile = new RnamlFile(inFile, type);
-
- //}
- afile = new MCview.PDBfile(inFile, type);
-
+ afile = new MCview.PDBfile(inFile, type);
}
else if (format.equals("STH"))
{
* @throws ExceptionFileFormatOrSyntax
* @throws ExceptionLoadingFailed
* @throws ExceptionPermissionDenied
+ * @throws InterruptedException
*/
- public BLCFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public BLCFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(inFile, type);
}
- public BLCFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public BLCFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(source);
}
{
}
- public ClustalFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public ClustalFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(inFile, type);
}
- public ClustalFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public ClustalFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(source);
}
* @throws ExceptionFileFormatOrSyntax
* @throws ExceptionLoadingFailed
* @throws ExceptionPermissionDenied
+ * @throws InterruptedException
*/
- public FastaFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public FastaFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(inFile, type);
}
- public FastaFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public FastaFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(source);
}
* @throws ExceptionFileFormatOrSyntax \r
* @throws ExceptionLoadingFailed \r
* @throws ExceptionPermissionDenied \r
+ * @throws InterruptedException \r
*/\r
- public FeaturesFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed\r
+ public FeaturesFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException\r
{\r
super(inFile, type);\r
}\r
\r
- public FeaturesFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed\r
+ public FeaturesFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException\r
{\r
super(source);\r
}\r
* @throws ExceptionFileFormatOrSyntax
* @throws ExceptionLoadingFailed
* @throws ExceptionPermissionDenied
+ * @throws InterruptedException
*/
- public JPredFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public JPredFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(inFile, type);
}
- public JPredFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public JPredFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(source);
}
* @throws ExceptionFileFormatOrSyntax
* @throws ExceptionLoadingFailed
* @throws ExceptionPermissionDenied
+ * @throws InterruptedException
*/
- public static void main(String[] args) throws ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public static void main(String[] args) throws ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
try
{
* @throws ExceptionFileFormatOrSyntax
* @throws ExceptionLoadingFailed
* @throws ExceptionPermissionDenied
+ * @throws InterruptedException
*/
- public MSFfile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public MSFfile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(inFile, type);
}
- public MSFfile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public MSFfile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(source);
}
{
}
- public PIRFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public PIRFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(inFile, type);
}
- public PIRFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public PIRFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(source);
}
{
}
- public PfamFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public PfamFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(inFile, type);
}
- public PfamFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public PfamFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(source);
}
* @throws ExceptionFileFormatOrSyntax
* @throws ExceptionLoadingFailed
* @throws ExceptionPermissionDenied
+ * @throws InterruptedException
*/
- public PileUpfile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public PileUpfile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(inFile, type);
}
- public PileUpfile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public PileUpfile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(source);
}
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;
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;
public class RnamlFile extends AlignFile
{
public String id;
+ protected ArrayList<RNA> result;
public RnamlFile()
{
}
- 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<c; i++ ) {
+// seqs.get(i).setIndex(i);
+// }
+//
+//
+// }
+ public BufferedReader CreateReader() throws FileNotFoundException
+ {
+ FileReader fr = null;
+ fr = new FileReader(inFile);
+
+ BufferedReader r = new BufferedReader (fr);
+ return r;
+ }
- public void parse() throws ExceptionPermissionDenied, ExceptionLoadingFailed, ExceptionFileFormatOrSyntax, FileNotFoundException
- {
- System.out.println("this is a rnaml file");
-
-
- FileReader fr = null;
+ public void parse() throws FileNotFoundException, ExceptionPermissionDenied, ExceptionLoadingFailed, ExceptionFileFormatOrSyntax
+ {
+ FileReader fr = null;
fr = new FileReader(inFile);
BufferedReader r = new BufferedReader (fr);
-
+ 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");
Hashtable seqhash = new Hashtable();
Vector headers = new Vector();
//ArrayList<String> seq =new ArrayList();
- System.out.println(r);
- ArrayList<RNA> 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());
for(int j=0;j<rna1.length();j++)
{
annot[j] =rna1.substring(j,j+1);
- System.out.println(annot[j]);
+ //System.out.println(annot[j]);
}
for(int k=0;k<rna1.length();k++)
seqs[0].addAlignmentAnnotation(align);
this.annotations.addElement(align);
}
+ //Annotate3D tintin = new Annotate3D();
-
+ //System.out.println(tintin);
return dataName;
}
+ public ArrayList getRNA()
+ {
+ return result;
+ }
+
+ public Vector getAnnot()
+ {
+ return annotations;
+ }
}
{
}
- public SimpleBlastFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public SimpleBlastFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(inFile, type);
}
- public SimpleBlastFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public SimpleBlastFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(source);
}
{\r
}\r
\r
- public StockholmFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed\r
+ public StockholmFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException\r
{\r
super(inFile, type);\r
}\r
\r
- public StockholmFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed\r
+ public StockholmFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException\r
{\r
super(source);\r
}\r
*/
public class TCoffeeScoreFile extends AlignFile {
- public TCoffeeScoreFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public TCoffeeScoreFile(String inFile, String type) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(inFile, type);
}
- public TCoffeeScoreFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
+ public TCoffeeScoreFile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException
{
super(source);
}
protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem();
protected JRadioButtonMenuItem purinePyrimidineColour = new JRadioButtonMenuItem();
+
+ protected JRadioButtonMenuItem RNAInteractionColour = new JRadioButtonMenuItem();
// protected JRadioButtonMenuItem covariationColour = new
// JRadioButtonMenuItem();
colours.add(purinePyrimidineColour);
// colours.add(covariationColour);
colours.add(tcoffeeColour);
-
+ colours.add(RNAInteractionColour);
setColourSelected(jalview.bin.Cache
.getDefault("DEFAULT_COLOUR", "None"));
purinePyrimidineColour.setSelected(true);
break;
+
+ case ColourSchemeProperty.RNAINTERACTION:
+ RNAInteractionColour.setSelected(true);
+
+ break;
/*
* case ColourSchemeProperty.COVARIATION:
* covariationColour.setSelected(true);
});
purinePyrimidineColour.setText("Purine/Pyrimidine");
- purinePyrimidineColour
- .addActionListener(new java.awt.event.ActionListener()
+ purinePyrimidineColour.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
purinePyrimidineColour_actionPerformed(e);
}
});
+
+ RNAInteractionColour.setText("RNA Interaction type");
+ RNAInteractionColour.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ RNAInteractionColour_actionPerformed(e);
+ }
+ });
/*
* covariationColour.setText("Covariation");
* covariationColour.addActionListener(new java.awt.event.ActionListener() {
colourMenu.add(buriedColour);
colourMenu.add(nucleotideColour);
colourMenu.add(purinePyrimidineColour);
+ colourMenu.add(RNAInteractionColour);
// colourMenu.add(covariationColour);
colourMenu.add(tcoffeeColour);
colourMenu.add(userDefinedColour);
colourMenu.add(abovePIDThreshold);
colourMenu.add(modifyPID);
colourMenu.add(annotationColour);
- colourMenu.add(rnahelicesColour);
+ colourMenu.add(rnahelicesColour);
calculateMenu.add(sort);
calculateMenu.add(calculateTree);
calculateMenu.addSeparator();
protected void purinePyrimidineColour_actionPerformed(ActionEvent e)
{
}
+
+ protected void RNAInteractionColour_actionPerformed(ActionEvent e)
+ {
+ }
+
/*
* protected void covariationColour_actionPerformed(ActionEvent e) { }
{
char ss = validRes ? row_annotations[column].secondaryStructure
: ' ';
- //System.out.println(ss);
+
if (ss == 'S')
{
// distinguish between forward/backward base-pairing
if (row_annotations[column].displayCharacter.indexOf(')') > -1)
{
ss = 's';
- System.out.println(ss);
+
}
}
if (ss == 'C')
if ((row_annotations[column].displayCharacter.indexOf(']') > -1) || (row_annotations[column].displayCharacter.indexOf('}') > -1))
{
ss = 'c';
- System.out.println(ss);
+
}
}
if (!validRes || (ss != lastSS))
public static final int TCOFFEE = 15;
+ public static final int RNAINTERACTION = 16;
/**
* index of first colourscheme (includes 'None')
{
ret = PURINEPYRIMIDINE;
}
+
+ else if (name.equalsIgnoreCase("RNA Interaction type"))
+ {
+ ret = RNAINTERACTION;
+ }
// else if (name.equalsIgnoreCase("Covariation"))
// {
// ret = COVARIATION;
{
index = TCOFFEE;
}
+ else if (cs instanceof RNAInteractionColourScheme)
+ {
+ index = RNAINTERACTION;
+ }
+
+
/*
* else if (cs instanceof CovariationColourScheme) { index = COVARIATION; }
*/
ret = "T-Coffee Scores";
break;
+
+ case RNAINTERACTION:
+ ret = "RNA Interaction type";
+
+ break;
/*
* case COVARIATION: ret = "Covariation";
*
case TCOFFEE:
cs = new TCoffeeColourScheme(coll);
+ break;
+
+ case RNAINTERACTION:
+ cs = new RNAInteractionColourScheme();
+ break;
+
// case COVARIATION:
// cs = new CovariationColourScheme(annotation);
final static File ALIGN_FILE = new File("test/jalview/io/tcoffee.fasta_aln");
@Test
- public void testReadHeader() throws IOException, FileNotFoundException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed {
+ public void testReadHeader() throws IOException, FileNotFoundException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException {
TCoffeeScoreFile scoreFile = new TCoffeeScoreFile(SCORE_FILE.getPath(),AppletFormatAdapter.FILE);
assertTrue(scoreFile.getWarningMessage(),scoreFile.isValid());
@Test
- public void testWrongFile() throws ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed {
+ public void testWrongFile() throws ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException {
try {
TCoffeeScoreFile result = new TCoffeeScoreFile(ALIGN_FILE.getPath(), FormatAdapter.FILE);
assertFalse(result.isValid());
}
@Test
- public void testHeightAndWidth() throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed {
+ public void testHeightAndWidth() throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException {
TCoffeeScoreFile result = new TCoffeeScoreFile(SCORE_FILE.getPath(), FormatAdapter.FILE);
assertTrue(result.isValid());
assertEquals( 8, result.getHeight() );
}
@Test
- public void testParse() throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed {
+ public void testParse() throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException {
TCoffeeScoreFile parser = new TCoffeeScoreFile(SCORE_FILE.getPath(), FormatAdapter.FILE);
@Test
- public void testGetAsList() throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed {
+ public void testGetAsList() throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException {
TCoffeeScoreFile parser = new TCoffeeScoreFile(SCORE_FILE.getPath(),FormatAdapter.FILE);
assertTrue(parser.getWarningMessage(),parser.isValid());
@Test
- public void testGetAsArray() throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed {
+ public void testGetAsArray() throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed, InterruptedException {
TCoffeeScoreFile parser = new TCoffeeScoreFile(SCORE_FILE.getPath(),FormatAdapter.FILE);
assertTrue(parser.getWarningMessage(),parser.isValid());