{\r
public void run()\r
{\r
- new DBRefFetcher(\r
- af.getViewport().getAlignment(), af).fetchDBRefs(true);\r
+ new DBRefFetcher(sequences, af).fetchDBRefs(true);\r
startFetching();\r
}\r
}\r
{\r
System.out.println("No DAS Sources active");\r
af.setProgressBar("No DAS Sources Active", startTime);\r
+ cancelled = true;\r
+ fsettings.noDasSourceActive();\r
return;\r
}\r
\r
\r
void nextSequence(DasSource dasSource, SequenceI seq)\r
{\r
- DBRefEntry[] uprefs = jalview.util.DBRefUtils.selectRefs(seq.getDBRef(),\r
+ if (cancelled)\r
+ return;\r
+ DBRefEntry[] uprefs = jalview.util.DBRefUtils.selectRefs(seq.getDBRef(),\r
new String[]\r
{\r
// jalview.datamodel.DBRefSource.PDB,\r
if (uprefs != null)\r
{\r
// do any of these ids match the source's coordinate system ?\r
- for (int j = 0; j < uprefs.length; j++)\r
+ for (int j = 0; !dasCoordSysFound && j < uprefs.length; j++)\r
{\r
DasCoordinateSystem cs[] = dasSource.getCoordinateSystem();\r
\r
- for(int csIndex=0; csIndex<cs.length; csIndex++)\r
+ for(int csIndex=0; csIndex<cs.length && !dasCoordSysFound; csIndex++)\r
{\r
if (cs.length > 0 && jalview.util.DBRefUtils\r
.isDasCoordinateSystem(cs[csIndex].getName(), uprefs[j]))\r
System.out.println(seq.getName() + " " + (seq.getDatasetSequence() == null)\r
+ " " + dasSource.getUrl());\r
\r
- dasCoordSysFound = false;\r
+ dasCoordSysFound = true; // break's out of the loop\r
createFeatureFetcher(seq,\r
dasSource,\r
uprefs[j]);\r
- break; // only do this for one reference - assume same source will send same features for all IDs\r
}\r
else\r
System.out.println("IGNORE " + cs[csIndex].getName());\r
source.getNickname());\r
if (dbref.getMap()!=null && f.getBegin()>0 && f.getEnd()>0) {\r
Cache.log.debug("mapping from "+f.getBegin()+" - "+f.getEnd());\r
- SequenceFeature vf[] = dbref.getMap().locateFeature(f);\r
+ SequenceFeature vf[]=null;\r
+ \r
+ try {\r
+ vf = dbref.getMap().locateFeature(f);\r
+ }\r
+ catch (Exception ex)\r
+ {\r
+ Cache.log.info("Error in 'experimental' mapping of features. Please try to reproduce and then report info to help@jalview.org.");\r
+ Cache.log.info("Mapping feature from "+f.getBegin()+" to "+f.getEnd()+" in dbref "+dbref.getAccessionId()+" in "+dbref.getSource());\r
+ Cache.log.info("using das Source "+ds.getUrl());\r
+ Cache.log.info(ex);\r
+ }\r
+ \r
if (vf!=null) {\r
for (int v=0;v<vf.length;v++)\r
{\r
*/\r
SequenceFeature newSequenceFeature(Map dasfeature, String nickname)\r
{\r
+ if (dasfeature==null)\r
+ {\r
+ return null;\r
+ }\r
try\r
{\r
/**\r