\r
//LOAD USERDEFINED COLOURS\r
jalview.gui.UserDefinedColours.initUserColourSchemes( getProperty("USER_DEFINED_COLOURS"));\r
+ jalview.io.PIRFile.useModellerOutput = Cache.getDefault("PIR_MODELLER", false);\r
}\r
\r
\r
pileupjv.setSelected( Cache.getDefault("PILEUP_JVSUFFIX", true) );\r
pirjv.setSelected( Cache.getDefault("PIR_JVSUFFIX", true) );\r
\r
+ modellerOutput.setSelected( Cache.getDefault("PIR_MODELLER", false));\r
+\r
autoCalculateConsCheck.setSelected( Cache.getDefault("AUTO_CALC_CONSENSUS", true));\r
+ padGaps.setSelected( Cache.getDefault("PAD_GAPS", false));\r
\r
/****************************************************\r
* Set up Connections\r
Cache.applicationProperties.setProperty("PFAM_JVSUFFIX", Boolean.toString(pfamjv.isSelected()) );\r
Cache.applicationProperties.setProperty("PILEUP_JVSUFFIX", Boolean.toString(pileupjv.isSelected()) );\r
Cache.applicationProperties.setProperty("PIR_JVSUFFIX", Boolean.toString(pirjv.isSelected()) );\r
+ Cache.applicationProperties.setProperty("PIR_MODELLER", Boolean.toString(modellerOutput.isSelected()) );\r
+ jalview.io.PIRFile.useModellerOutput = modellerOutput.isSelected();\r
\r
Cache.applicationProperties.setProperty("AUTO_CALC_CONSENSUS",\r
Boolean.toString(autoCalculateConsCheck.isSelected()));\r
-\r
+ Cache.applicationProperties.setProperty("PAD_GAPS",\r
+ Boolean.toString(padGaps.isSelected()));\r
Cache.saveProperties();\r
try\r
{\r
public class PIRFile\r
extends AlignFile\r
{\r
+ public static boolean useModellerOutput = false;\r
+\r
Vector words = new Vector(); //Stores the words in a line after splitting\r
\r
public PIRFile()\r
{\r
StringBuffer sequence;\r
String line = null;\r
+ ModellerDescription md;\r
\r
while ( (line = nextLine()) != null)\r
{\r
}\r
\r
seqs.addElement(newSeq);\r
- ModellerDescription md = new ModellerDescription(newSeq.\r
- getDescription());\r
+\r
+ md = new ModellerDescription(newSeq.\r
+ getDescription());\r
md.updateSequenceI(newSeq);\r
}\r
}\r
int len = 72;\r
StringBuffer out = new StringBuffer();\r
int i = 0;\r
+ ModellerDescription md;\r
\r
while ( (i < s.length) && (s[i] != null))\r
{\r
String seq = s[i].getSequence();\r
seq = seq + "*";\r
\r
+\r
if (is_NA)\r
{\r
- // modeller doesn't really do nucleotides, so we don't do anything fancy\r
- // Nucleotide sequence tags should have a >DL; prefix\r
- out.append(">N1;" + s[i].getName() + "\n"); // JBPNote Should change >P to >N\r
+ // modeller doesn't really do nucleotides, so we don't do anything fancy\r
+ // Official tags area as follows, for now we'll use P1 and DL\r
+ // Protein (complete) P1\r
+ // Protein (fragment) F1\r
+ // DNA (linear) Dl\r
+ // DNA (circular) DC\r
+ // RNA (linear) RL\r
+ // RNA (circular) RC\r
+ // tRNA N3\r
+ // other functional RNA N1\r
+\r
+ out.append(">N1;" + s[i].getName() + "\n");\r
if (s[i].getDescription() == null)\r
{\r
out.append(s[i].getName() + " " +\r
}\r
else\r
{\r
- out.append(">P1;" + s[i].getName() + "\n");\r
- ModellerDescription md = new ModellerDescription(s[i]);\r
- out.append(md.getDescriptionLine() + "\n");\r
+\r
+ if(useModellerOutput)\r
+ {\r
+ out.append(">P1;" + s[i].getName() + "\n");\r
+ md = new ModellerDescription(s[i]);\r
+ out.append(md.getDescriptionLine() + "\n");\r
+ }\r
+ else\r
+ {\r
+ out.append(">P1;" + printId(s[i]) + "\n");\r
+ if (s[i].getDescription() != null)\r
+ out.append(s[i].getDescription() + "\n");\r
+ else\r
+ out.append(s[i].getName() + " "\r
+ + (s[i].getEnd() - s[i].getStart() + 1)\r
+ + " residues\n");\r
+ }\r
}\r
int nochunks = (seq.length() / len) + 1;\r
\r
protected JCheckBox smoothFont = new JCheckBox();\r
JPanel calcTab = new JPanel();\r
protected JCheckBox autoCalculateConsCheck = new JCheckBox();\r
+ protected JCheckBox padGaps = new JCheckBox();\r
+ protected JCheckBox modellerOutput = new JCheckBox();\r
/**\r
* Creates a new GPreferences object.\r
*/\r
smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);\r
smoothFont.setText("Smooth Font");\r
calcTab.setLayout(null);\r
+ autoCalculateConsCheck.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
autoCalculateConsCheck.setText("AutoCalculate Consensus");\r
- autoCalculateConsCheck.setBounds(new Rectangle(16, 29, 209, 23));\r
+ autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));\r
+ padGaps.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+ padGaps.setText("Pad gaps when editing");\r
+ padGaps.setBounds(new Rectangle(22, 94, 168, 23));\r
+ modellerOutput.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+ modellerOutput.setText("Use Modeller Output");\r
+ modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));\r
jPanel2.add(fullScreen);\r
\r
jPanel2.add(annotations);\r
jPanel11.add(pfamjv);\r
jPanel11.add(pileupjv);\r
jPanel11.add(pirjv);\r
+ exportTab.add(modellerOutput);\r
tabbedPane.add(calcTab, "Calculations");\r
calcTab.add(autoCalculateConsCheck);\r
+ calcTab.add(padGaps);\r
\r
exportTab.add(epsLabel);\r
exportTab.add(epsRendering);\r