import java.net.URL;\r
\r
import org.biojava.dasobert.das.FeatureThread;\r
-import org.biojava.dasobert.dasregistry.Das1Source;\r
import org.biojava.dasobert.eventmodel.FeatureEvent;\r
import org.biojava.dasobert.eventmodel.FeatureListener;\r
import org.biojava.dasobert.dasregistry.DasSource;\r
DasCoordinateSystem[] coords = source.getCoordinateSystem();\r
for (int c = 0; c < coords.length; c++)\r
{\r
- System.out.println(coords[c].getName());\r
if (coords[c].getName().indexOf("UniProt")>-1)\r
{\r
uniprotCount++;\r
{\r
for(int j=0; j<dbref.length; j++)\r
{\r
- System.out.println(dbref[j].getSource()\r
- +" "+jalview.datamodel.DBRefSource.UNIPROT);\r
if(dbref[j].getSource()\r
.equals(jalview.datamodel.DBRefSource.UNIPROT))\r
{\r
- System.out.println("got a match");\r
refCount++;\r
break;\r
}\r
}\r
}\r
\r
- System.out.println(refCount+" "+uniprotCount+" "+sequences.length);\r
if(refCount<sequences.length && uniprotCount>0)\r
{\r
\r
\r
if(reply == JOptionPane.YES_OPTION)\r
{\r
- new DBRefFetcher(\r
- af.getViewport().getAlignment(), af).fetchDBRefs(true);\r
-\r
+ Thread thread = new Thread(new FetchDBRefs());\r
+ thread.start();\r
}\r
+ else\r
+ startFetching();\r
}\r
+ else\r
+ startFetching();\r
\r
- System.out.println("User selection is "\r
- +\r
+ /* System.out.println("User selection is " +\r
( ( (float) uniprotCount / (float) selectedSources.size()) * 100)\r
+ " % Uniprot, and "+refCount+" / " +sequences.length+" have uniprot accession");\r
+*/\r
+ }\r
\r
-\r
+ void startFetching()\r
+ {\r
Thread thread = new Thread(this);\r
thread.start();\r
}\r
+\r
+ class FetchDBRefs implements Runnable\r
+ {\r
+ public void run()\r
+ {\r
+ new DBRefFetcher(\r
+ af.getViewport().getAlignment(), af).fetchDBRefs(true);\r
+ startFetching();\r
+ }\r
+ }\r
+\r
+\r
/**\r
* creates a jalview sequence feature from a das feature document\r
* @param dasfeature\r
// null\r
// );\r
\r
- // System.out.println(nickname+" "+f.getType()+" "+f.begin+" "+f.end);\r
return f;\r
}\r
catch (Exception e) {\r
{\r
setThreadsRunning(+1);\r
\r
- int start=seq.getStart(), end = seq.getEnd();\r
-\r
- if(af.getViewport().getSelectionGroup()!=null)\r
+ // int start=seq.getStart(), end = seq.getEnd();\r
+ /* if(af.getViewport().getSelectionGroup()!=null)\r
{\r
SequenceI tmp = af.getViewport().getAlignment().findName(seq.getName());\r
start = tmp.findPosition(\r
end = tmp.findPosition(\r
af.getViewport().getSelectionGroup().getEndRes()\r
);\r
- }\r
+ }*/\r
\r
FeatureThread fetcher = new FeatureThread(id\r
// + ":" + start + "," + end,\r
{\r
threadsRunning += i;\r
if(threadsRunning<1)\r
+ {\r
af.setProgressBar("DAS Feature Fetching Complete", startTime);\r
+\r
+ if(af.featureSettings!=null)\r
+ af.featureSettings.setTableData();\r
+ }\r
}\r
\r
/**\r
{\r
\r
// Will have to pass any mapping information to the fetcher - the start/end for the DBRefEntry may not be the same as the sequence's start/end\r
- org.biojava.dasobert.dasregistry.DasCoordinateSystem cs[] = dasSource.getCoordinateSystem();\r
+ DasCoordinateSystem cs[] = dasSource.getCoordinateSystem();\r
for (int l=0; l<cs.length; l++)\r
{\r
if (jalview.util.DBRefUtils.isDasCoordinateSystem(cs[l].getName(), uprefs[j]))\r