JAL-3829 JAL-3855 ignore case when detecting alphafold ID
authorJim Procter <j.procter@dundee.ac.uk>
Tue, 14 Sep 2021 16:01:57 +0000 (17:01 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Tue, 14 Sep 2021 16:02:04 +0000 (17:02 +0100)
src/jalview/ws/dbsources/EBIAlfaFold.java

index b4cb614..a93f233 100644 (file)
@@ -82,7 +82,9 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy
   @Override
   public Regex getAccessionValidator()
   {
-    return new Regex("(AF-[A-Z]+[0-9]+[A-Z0-9]+-F1)");
+    Regex validator =  new Regex("(AF-[A-Z]+[0-9]+[A-Z0-9]+-F1)");
+    validator.setIgnoreCase(true);
+    return validator;
   }
 
   /*
@@ -144,7 +146,7 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy
 
     try
     {
-      File tmpFile = File.createTempFile(id, "cif");
+      File tmpFile = File.createTempFile(id, ".cif");
       UrlDownloadClient.download(alphaFoldCif, tmpFile);
       
       // may not need this check ?