private static final int PDB_ID_LENGTH = 4;
+ private static String AF_VERSION = "2";
+
public EBIAlfaFold()
{
super();
return "1";
}
- public static String getAlphaFoldCifDownloadUrl(String id)
+ public static String getAlphaFoldCifDownloadUrl(String id, String vnum)
{
- return "https://alphafold.ebi.ac.uk/files/" + id + "-model_v1.cif";
+ if (vnum == null || vnum.length() == 0)
+ {
+ vnum = AF_VERSION;
+ }
+ return "https://alphafold.ebi.ac.uk/files/" + id + "-model_v" + vnum
+ + ".cif";
}
- public static String getAlphaFoldPaeDownloadUrl(String id)
+ public static String getAlphaFoldPaeDownloadUrl(String id, String vnum)
{
+ if (vnum == null || vnum.length() == 0)
+ {
+ vnum = AF_VERSION;
+ }
return "https://alphafold.ebi.ac.uk/files/" + id
- + "-predicted_aligned_error_v1.json";
+ + "-predicted_aligned_error_v" + vnum + ".json";
}
/*
stopQuery();
return null;
}
- String alphaFoldCif = getAlphaFoldCifDownloadUrl(id);
+ String alphaFoldCif = getAlphaFoldCifDownloadUrl(id, AF_VERSION);
if (retrievalUrl != null)
{
alphaFoldCif = retrievalUrl;
// import PAE as contact matrix - assume this will work if there was a
// model
File pae = File.createTempFile(id, "pae_json");
- String paeURL = getAlphaFoldPaeDownloadUrl(id);
-
- if (retrievalUrl!=null) {
+ String paeURL = getAlphaFoldPaeDownloadUrl(id, AF_VERSION);
+
+ if (retrievalUrl != null)
+ {
// manufacture the PAE url from a url like ...-model-vN.cif
paeURL = retrievalUrl.replace("model","predicted_aligned_error").replace(".cif",".json");
}