for (ArgValue av : avm.getArgValueList(Arg.STRUCTURE))
{
String val = av.getValue();
- SubVals subId = new SubVals(val);
+ SubVals subId = av.getSubVals();
SequenceI seq = getSpecifiedSequence(af, subId);
if (seq == null)
{
for (ArgValue av : avm.getArgValueList(Arg.PAEMATRIX))
{
String val = av.getValue();
- SubVals subVals = ArgParser.getSubVals(val);
+ SubVals subVals = av.getSubVals();
String paeLabel = subVals.get("label");
File paeFile = new File(subVals.getContent());
String paePath = null;
Console.warn(
"Problem with the PAE file path: '" + paePath + "'");
}
- String structid = null;
- String structfile = null;
- int seqindex = SubVals.NOTSET;
- if (subVals.notSet())
+ String structid = subVals.get("structid");
+ String structfile = subVals.get("structfile");
+ String seqid = subVals.get("seqid");
+ int seqindex = subVals.getIndex();
+
+ // let's find a structure
+ if (structfile == null && structid == null && seqid == null
+ && seqindex == SubVals.NOTSET)
{
ArgValue likelyStructure = avm
.getClosestPreviousArgValueOfArg(av, Arg.STRUCTURE);
}
}
}
- else if (subVals.has("structfile"))
- {
- structfile = subVals.get("structfile");
- }
- else if (subVals.has("structid"))
- {
- structid = subVals.get("structid");
- }
+
if (structfile != null)
{
- Console.info("##### Attaching paeFile '" + paePath + "' to "
+ Console.debug("##### Attaching paeFile '" + paePath + "' to "
+ "structfile=" + structfile);
EBIAlfaFold.addAlphaFoldPAE(af.getCurrentView().getAlignment(),
paeFile, seqindex, structfile, true, false, paeLabel);
}
else if (structid != null)
{
- Console.info("##### Attaching paeFile '" + paePath + "' to "
+ Console.debug("##### Attaching paeFile '" + paePath + "' to "
+ "structid=" + structid);
EBIAlfaFold.addAlphaFoldPAE(af.getCurrentView().getAlignment(),
- paeFile, seqindex, subVals.get("structid"), true, true,
- paeLabel);
+ paeFile, seqindex, structid, true, true, paeLabel);
}
- else
+ else if (seqid != null)
+ {
+ Console.debug("##### Attaching paeFile '" + paePath + "' to "
+ + "seqid=" + seqid);
+ EBIAlfaFold.addAlphaFoldPAE(af.getCurrentView().getAlignment(),
+ paeFile, seqindex, seqid, false, false, paeLabel);
+ }
+ else if (seqindex >= 0)
{
- seqindex = subVals.getIndex();
Console.debug("##### Attaching paeFile '" + paePath
+ "' to sequence index " + seqindex);
EBIAlfaFold.addAlphaFoldPAE(af.getCurrentView().getAlignment(),
paeFile, seqindex, null, false, false, paeLabel);
- // required to readjust the height and position of the PAE
- // annotation
}
for (AlignmentViewPanel ap : af.getAlignPanels())
{
+ // required to readjust the height and position of the PAE
+ // annotation
ap.adjustAnnotationHeight();
}
}
for (ArgValue av : avm.getArgValueList(Arg.IMAGE))
{
String val = av.getValue();
- SubVals subVal = new SubVals(val);
+ SubVals subVal = av.getSubVals();
String type = "png"; // default
String fileName = subVal.getContent();
File file = new File(fileName);