X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fdbsources%2FEmblXmlSource.java;h=7bb1977d73418df228eaa0f74454832f88d11d76;hb=304e64fb34b32659be1bbfd39fb4e15b2f79586e;hp=c2d661baa77e06c6110c523f5b65dd7a79e44548;hpb=61ff8fb4efa315c35149c9d11850d99e3d00c441;p=jalview.git diff --git a/src/jalview/ws/dbsources/EmblXmlSource.java b/src/jalview/ws/dbsources/EmblXmlSource.java index c2d661b..7bb1977 100644 --- a/src/jalview/ws/dbsources/EmblXmlSource.java +++ b/src/jalview/ws/dbsources/EmblXmlSource.java @@ -41,8 +41,6 @@ import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; -import com.stevesoft.pat.Regex; - import jalview.analysis.SequenceIdMatcher; import jalview.bin.Cache; import jalview.datamodel.Alignment; @@ -58,6 +56,7 @@ import jalview.util.DBRefUtils; import jalview.util.DnaUtils; import jalview.util.MapList; import jalview.util.MappingUtils; +import jalview.util.MessageManager; import jalview.ws.ebi.EBIFetchClient; import jalview.xml.binding.embl.EntryType; import jalview.xml.binding.embl.EntryType.Feature; @@ -71,10 +70,11 @@ import jalview.xml.binding.embl.XrefType; * * @deprecated endpoint withdrawn August 2020 (JAL-3692), use EmblFlatfileSource */ + public abstract class EmblXmlSource extends EbiFileRetrievedProxy { + // TODO: delete class or update tyhis validator for 2.12 style Platform.regex private static final Regex ACCESSION_REGEX = new Regex("^[A-Z]+[0-9]+"); - /* * JAL-1856 Embl returns this text for query not found */ @@ -659,7 +659,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy { return new int[] {}; } - try { List ranges = DnaUtils.parseLocation(location); @@ -756,7 +755,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy } return getAccessionValidator().search(accession); } - /** * Truncates (if necessary) the exon intervals to match 3 times the length of * the protein; also accepts 3 bases longer (for stop codon not included in @@ -775,7 +773,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy } int expectedCdsLength = proteinLength * 3; int exonLength = MappingUtils.getLength(Arrays.asList(exon)); - /* * if exon length matches protein, or is shorter, or longer by the * length of a stop codon (3 bases), then leave it unchanged @@ -785,7 +782,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy { return exon; } - int origxon[]; int sxpos = -1; int endxon = 0; @@ -805,7 +801,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy // .println("Truncating final exon interval on region by " // + (cdspos - cdslength)); } - /* * shrink the final exon - reduce end position if forward * strand, increase it if reverse @@ -821,7 +816,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy break; } } - if (sxpos != -1) { // and trim the exon interval set if necessary