protected List<Arg> argList;
+ private static final char ARGFILECOMMENT = '#';
+
static
{
argMap = new HashMap<>();
if (a.hasOption(Opt.GLOB))
{
// strip off and save the SubVals to be added individually later
- globSubVals = ArgParser.getSubVals(val);
+ globSubVals = new SubVals(val);
// make substitutions before looking for files
String fileGlob = makeSubstitutions(globSubVals.getContent(),
linkedId);
}
// check for unique id
- SubVals idsv = ArgParser.getSubVals(val);
+ SubVals idsv = new SubVals(val);
String id = idsv.get(ArgValues.ID);
if (id != null && avm.hasId(a, id))
{
return sb.toString();
}
- public static SubVals getSubVals(String item)
- {
- return new SubVals(item);
- }
-
public static ArgParser parseArgFiles(List<String> argFilenameGlobs,
boolean initsubstitutions)
{
.append(EQUALS).append(argFile.getCanonicalPath())
.toString();
argsList.add(setargfile);
- argsList.addAll(Files.readAllLines(Paths.get(argFile.getPath())));
+ argsList.addAll(readArgFile(argFile));
argsList.add(Arg.UNSETARGFILE.argString());
} catch (IOException e)
{
return new ArgParser(argsList, initsubstitutions, true);
}
+ protected static List<String> readArgFile(File argFile)
+ {
+ List<String> args = new ArrayList<>();
+ if (argFile != null && argFile.exists())
+ {
+ try
+ {
+ for (String line : Files.readAllLines(Paths.get(argFile.getPath())))
+ {
+ if (line != null && line.length() > 0
+ && line.charAt(0) != ARGFILECOMMENT)
+ args.add(line);
+ }
+ } catch (IOException e)
+ {
+ String message = Arg.ARGFILE.argString() + "=\"" + argFile.getPath()
+ + "\": File could not be read.";
+ Console.debug(message, e);
+ Jalview.exit(message, 3);
+ }
+ }
+ return args;
+ }
+
}
\ No newline at end of file
return false;
}
- ContactMatrixI matrix = new PAEContactMatrix(sm.getSequence(),
- (Map<String, Object>) pae_obj);
+ SequenceI seq = sm.getSequence();
+ Console.debug("##### SEQUENCE FOUND=" + seq.getName());
+ Map<String, Object> paeObject = (Map<String, Object>) pae_obj;
- AlignmentAnnotation cmannot = sm.getSequence().addContactList(matrix);
+ ContactMatrixI matrix = new PAEContactMatrix(seq, paeObject);
+ AlignmentAnnotation cmannot = seq.addContactList(matrix);
if (label != null)
{
- Console.debug("Setting annotation label to '" + label + "'");
cmannot.label = label;
}
- sm.getSequence().addAlignmentAnnotation(cmannot);
+ // seq.addAlignmentAnnotation(cmannot);
return true;
}