wsInfo = setWebService();\r
\r
SequenceI seq = msf[0];\r
+\r
altitle = "JNet prediction on " + seq.getName() +\r
" using alignment from " + title;\r
\r
AlignSeq.extractGaps("-. ", seq.getSequence()) +\r
"\n");\r
SequenceI aln[] = new SequenceI[msf.length];\r
- for (int i=0,j=msf.length; i<j;i++)\r
- aln[i] = new jalview.datamodel.Sequence(msf[i]);\r
+ for (int i=0,j=msf.length; i<j;i++) {\r
+ aln[i] = new jalview.datamodel.Sequence(msf[i]);\r
+ }\r
+\r
SequenceInfo = jalview.analysis.SeqsetUtils.uniquify(aln, true);\r
\r
if (!locateWebService())\r
" Service location failed\nfor URL :" + WsURL +\r
"\n" +\r
ex.getMessage());\r
- wsInfo.setStatus(wsInfo.STATE_STOPPED_SERVERERROR);\r
+ wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR);\r
\r
return false;\r
}\r
this.sequence.setSeq(AlignSeq.extractGaps("-. ",\r
msf[0].getSequence()));\r
\r
- jalview.io.PileUpfile mwrite = new jalview.io.PileUpfile();\r
this.msa = new vamsas.objects.simple.Msfalignment();\r
- msa.setMsf(mwrite.print(msf));\r
+ jalview.io.PileUpfile pileup = new jalview.io.PileUpfile();\r
+ msa.setMsf(pileup.print(msf));\r
}\r
\r
public void run()\r
\r
\r
\r
- private void addFloatAnnotations(Alignment al, int[] gapmap,\r
+ /* private void addFloatAnnotations(Alignment al, int[] gapmap,\r
Vector values, String Symname,\r
String Visname, float min,\r
float max, int winLength)\r
\r
al.addAnnotation(new AlignmentAnnotation(Symname, Visname,\r
annotations, min, max, winLength));\r
- }\r
+ }*/\r
\r
void parseResult()\r
{\r
{\r
al = new Alignment(new FormatAdapter().readFile(\r
result.getAligfile(), "Paste", format));\r
+ SequenceI sqs[] = new SequenceI[al.getHeight()];\r
for (int i=0, j=al.getHeight(); i<j; i++) {\r
- SequenceI sq = al.getSequenceAt(i);\r
- if (!jalview.analysis.SeqsetUtils.SeqCharacterUnhash(\r
- sq, (Hashtable) SequenceInfo.get(sq.getName())))\r
+ sqs[i] = al.getSequenceAt(i);\r
+ }\r
+ if (!jalview.analysis.SeqsetUtils.deuniquify(\r
+ (Hashtable) SequenceInfo,sqs))\r
{\r
throw (new Exception(\r
- "Couldn't recover sequence properties for JNet "\r
- +((i==0) ? "Query sequence" : "alignment sequence ("+i+")")));\r
+ "Couldn't recover sequence properties for alignment."));\r
}\r
- }\r
+\r
noMsa = false;\r
FirstSeq = 0;\r
}\r
}\r
}\r
\r
+ al.setDataset(null);\r
\r
AlignmentAnnotation annot;\r
Annotation[] annotations = null;\r
// JBPNote Should also rename the query sequence sometime...\r
i = 0;\r
\r
+ SequenceI seqRef = al.getSequenceAt(FirstSeq);\r
+\r
while (i < preds.length)\r
{\r
String id = preds[i].getName().toUpperCase();\r
{\r
annot = new AlignmentAnnotation(preds[i].getName(),\r
"JNet Output", annotations, 0f,\r
- 10f, 1);\r
+ 10f,\r
+ AlignmentAnnotation.BAR_GRAPH);\r
}\r
else\r
{\r
"JNet Output", annotations);\r
}\r
\r
- al.addAnnotation(annot);\r
+ al.addAnnotation(annot, seqRef);\r
\r
if (noMsa)\r
{\r
i++;\r
}\r
\r
- Hashtable scores = prediction.getScores();\r
+ //Hashtable scores = prediction.getScores();\r
\r
/* addFloatAnnotations(al, gapmap, (Vector)scores.get("JNETPROPH"),\r
"JnetpropH", "Jnet Helix Propensity", 0f,1f,1);\r
}\r
catch (Exception ex)\r
{\r
- jalview.bin.Cache.log.warn("Exception whilst parsing JNet style secondary structure prediction.");\r
- jalview.bin.Cache.log.debug("Exception: ",ex);\r
+ jalview.bin.Cache.log.warn("Exception whilst parsing JNet style secondary structure prediction.",ex);\r
}\r
}\r
}\r