git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a8dc695
)
Takes AlignFrame as arg, to update progressbar
author
amwaterhouse
<Andrew Waterhouse>
Thu, 22 Jun 2006 08:52:25 +0000
(08:52 +0000)
committer
amwaterhouse
<Andrew Waterhouse>
Thu, 22 Jun 2006 08:52:25 +0000
(08:52 +0000)
src/jalview/io/DasSequenceFeatureFetcher.java
patch
|
blob
|
history
diff --git
a/src/jalview/io/DasSequenceFeatureFetcher.java
b/src/jalview/io/DasSequenceFeatureFetcher.java
index
5bfb861
..
d0bc92d
100755
(executable)
--- a/
src/jalview/io/DasSequenceFeatureFetcher.java
+++ b/
src/jalview/io/DasSequenceFeatureFetcher.java
@@
-51,7
+51,7
@@
import jalview.bin.Cache;
public class DasSequenceFeatureFetcher implements Runnable
\r
{
\r
final AlignmentI dataset;
\r
public class DasSequenceFeatureFetcher implements Runnable
\r
{
\r
final AlignmentI dataset;
\r
- final AlignmentPanel ap;
\r
+ final AlignFrame af;
\r
StringBuffer sbuffer = new StringBuffer();
\r
\r
\r
StringBuffer sbuffer = new StringBuffer();
\r
\r
\r
@@
-62,10
+62,11
@@
public class DasSequenceFeatureFetcher implements Runnable
* @param align DOCUMENT ME!
\r
* @param ap DOCUMENT ME!
\r
*/
\r
* @param align DOCUMENT ME!
\r
* @param ap DOCUMENT ME!
\r
*/
\r
- public DasSequenceFeatureFetcher(AlignmentI align, AlignmentPanel ap)
\r
+ public DasSequenceFeatureFetcher(AlignmentI align,
\r
+ AlignFrame af)
\r
{
\r
this.dataset = align.getDataset();
\r
{
\r
this.dataset = align.getDataset();
\r
- this.ap = ap;
\r
+ this.af = af;
\r
\r
Thread thread = new Thread(this);
\r
thread.start();
\r
\r
Thread thread = new Thread(this);
\r
thread.start();
\r
@@
-154,7
+155,7
@@
public class DasSequenceFeatureFetcher implements Runnable
if (id != null && id.length() > 0)
\r
{
\r
FeatureThread fetcher = new FeatureThread(id
\r
if (id != null && id.length() > 0)
\r
{
\r
FeatureThread fetcher = new FeatureThread(id
\r
- + ":" + seq.getStart() + "," +seq.getEnd()
\r
+ // + ":" + seq.getStart() + "," +seq.getEnd()
\r
, source);
\r
\r
fetcher.addFeatureListener(new FeatureListener()
\r
, source);
\r
\r
fetcher.addFeatureListener(new FeatureListener()
\r
@@
-186,14
+187,13
@@
public class DasSequenceFeatureFetcher implements Runnable
}
\r
}
\r
}
\r
}
\r
}
\r
}
\r
-
\r
}
\r
\r
);
\r
\r
//NOTE alignPanel listener will be called after the previous
\r
//anonymous listener!!!
\r
}
\r
\r
);
\r
\r
//NOTE alignPanel listener will be called after the previous
\r
//anonymous listener!!!
\r
- fetcher.addFeatureListener(ap);
\r
+ fetcher.addFeatureListener(af);
\r
\r
fetcher.start();
\r
}
\r
\r
fetcher.start();
\r
}
\r
@@
-203,6
+203,9
@@
public class DasSequenceFeatureFetcher implements Runnable
*/
\r
public void run()
\r
{
\r
*/
\r
public void run()
\r
{
\r
+ long startTime = System.currentTimeMillis();
\r
+ af.setProgressBar("Fetching DAS Sequence Features", startTime);
\r
+
\r
DasSource [] sources = new jalview.gui.DasSourceBrowser().getDASSource();
\r
\r
String active = jalview.bin.Cache.getDefault("DAS_ACTIVE_SOURCE", "uniprot");
\r
DasSource [] sources = new jalview.gui.DasSourceBrowser().getDASSource();
\r
\r
String active = jalview.bin.Cache.getDefault("DAS_ACTIVE_SOURCE", "uniprot");
\r
@@
-226,6
+229,7
@@
public class DasSequenceFeatureFetcher implements Runnable
if(selectedSources == null || selectedSources.size()==0)
\r
{
\r
System.out.println("No DAS Sources active");
\r
if(selectedSources == null || selectedSources.size()==0)
\r
{
\r
System.out.println("No DAS Sources active");
\r
+ af.setProgressBar("No DAS Sources Active", startTime);
\r
return;
\r
}
\r
\r
return;
\r
}
\r
\r
@@
-248,16
+252,20
@@
public class DasSequenceFeatureFetcher implements Runnable
if (uprefs != null)
\r
{
\r
// we know the id for this entry, so don't note its ID in the unknownSequences list
\r
if (uprefs != null)
\r
{
\r
// we know the id for this entry, so don't note its ID in the unknownSequences list
\r
- for (int j = 0, k = uprefs.size(); j < k; j++)
\r
+ for (int j = 0; j < uprefs.size(); j++)
\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
// 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
- for (int l=0; l<cs.length; l++) {
\r
+ for (int l=0; l<cs.length; l++)
\r
+ {
\r
if (jalview.util.DBRefUtils.isDasCoordinateSystem(cs[l].getName(), (DBRefEntry)
\r
uprefs.get(j)))
\r
{
\r
Cache.log.debug("Launched fetcher for coordinate system " +
\r
cs[l].getName());
\r
if (jalview.util.DBRefUtils.isDasCoordinateSystem(cs[l].getName(), (DBRefEntry)
\r
uprefs.get(j)))
\r
{
\r
Cache.log.debug("Launched fetcher for coordinate system " +
\r
cs[l].getName());
\r
+
\r
+
\r
createFeatureFetcher(sequence,
\r
dasSource.getUrl(),
\r
( (DBRefEntry) uprefs.get(j)).
\r
createFeatureFetcher(sequence,
\r
dasSource.getUrl(),
\r
( (DBRefEntry) uprefs.get(j)).
\r
@@
-298,6
+306,8
@@
public class DasSequenceFeatureFetcher implements Runnable
{
\r
ex.printStackTrace();
\r
}
\r
{
\r
ex.printStackTrace();
\r
}
\r
+
\r
+ af.setProgressBar("DAS Feature Fetching Complete", startTime);
\r
}
\r
\r
\r
}
\r
\r
\r