X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fdbsources%2FEBIAlfaFold.java;h=fd10c794f0a095fcfa5c561d2d9f3129da813651;hb=beb2fee66dde629e3bbb7febb38d0116e1a64df2;hp=d0538c1c1e4f0b57d9e1e3e7d9c4842501c57451;hpb=b7e9e2edf0c1557089eff0e4b5c17c0b31e698c2;p=jalview.git diff --git a/src/jalview/ws/dbsources/EBIAlfaFold.java b/src/jalview/ws/dbsources/EBIAlfaFold.java index d0538c1..fd10c79 100644 --- a/src/jalview/ws/dbsources/EBIAlfaFold.java +++ b/src/jalview/ws/dbsources/EBIAlfaFold.java @@ -44,6 +44,7 @@ import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.ContactMatrixI; import jalview.datamodel.DBRefEntry; +import jalview.datamodel.GroupSet; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; @@ -314,6 +315,8 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy if (isStruct) { + // ###### WRITE A TEST for this bit of the logic addAlphaFoldPAE with + // different params. StructureSelectionManager ssm = StructureSelectionManager .getStructureSelectionManager(Desktop.instance); if (ssm != null) @@ -445,7 +448,7 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy } ContactMatrixI matrix = new PAEContactMatrix(sequence, (Map) paeDict); - ((PAEContactMatrix) matrix).makeGroups(5f, true); + matrix.setGroupSet(GroupSet.makeGroups(matrix, 5f, true)); AlignmentAnnotation cmannot = sequence.addContactList(matrix); if (label != null) @@ -474,6 +477,7 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy return paeDict; } + // ###### TEST THIS public static boolean importPaeJSONAsContactMatrixToStructure( StructureMapping[] smArray, InputStream paeInput, String label) throws IOException, ParseException @@ -500,14 +504,13 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy } SequenceI seq = sm.getSequence(); - Console.debug("##### SEQUENCE FOUND=" + seq.getName()); ContactMatrixI matrix = new PAEContactMatrix(seq, (Map) pae_obj); - ((PAEContactMatrix) matrix).makeGroups(5f, true); - AlignmentAnnotation cmannot = seq.addContactList(matrix); - seq.addAlignmentAnnotation(cmannot); - // seq.addAlignmentAnnotation(cmannot); - + matrix.setGroupSet(GroupSet.makeGroups(matrix, 5f, true)); + AlignmentAnnotation cmannot = sm.getSequence().addContactList(matrix); + /* this already happens in Sequence.addContactList() + seq.addAlignmentAnnotation(cmannot); + */ return true; }