try
{
File tmpFile = File.createTempFile(id, ".cif");
+ Console.debug("Retrieving structure file for "+id+" from "+alphaFoldCif);
UrlDownloadClient.download(alphaFoldCif, tmpFile);
-
+
// may not need this check ?
file = tmpFile.getAbsolutePath();
if (file == null)
return pdbAlignment;
}
+ private boolean importPaeJSONAsContactMatrix(AlignmentI pdbAlignment,
+ File pae) throws Exception
+ {
+ FileInputStream pae_input = new FileInputStream(pae);
+
+ List<Object> pae_obj = (List<Object>) Platform
+ .parseJSON(pae_input);
+ if (pae_obj == null)
+ {
+ return false;
+ }
+ ContactMatrixI matrix = new PAEContactMatrix(
+ pdbAlignment.getSequenceAt(0), (Map<String, Object>)pae_obj.get(0));
+
+ pdbAlignment.getSequenceAt(0).addAlignmentAnnotation(pdbAlignment.addContactList(matrix));
+ return true;
+ }
+
/**
- * general purpose structure importer - designed to yield alignment useful for transfer of annotation to associated sequences
+ * general purpose structure importer - designed to yield alignment useful for
+ * transfer of annotation to associated sequences
+ *
* @param alphaFoldCif
* @param tmpFile
* @param id