git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1720 JAL-2002 improvement for 'uniprot coverage' filter using facet pivot query
[jalview.git]
/
src
/
jalview
/
ws
/
DasSequenceFeatureFetcher.java
diff --git
a/src/jalview/ws/DasSequenceFeatureFetcher.java
b/src/jalview/ws/DasSequenceFeatureFetcher.java
index
8a7bcbc
..
d7ba24d
100644
(file)
--- a/
src/jalview/ws/DasSequenceFeatureFetcher.java
+++ b/
src/jalview/ws/DasSequenceFeatureFetcher.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-181,7
+181,7
@@
public class DasSequenceFeatureFetcher
int refCount = 0;
for (int i = 0; i < sequences.length; i++)
{
int refCount = 0;
for (int i = 0; i < sequences.length; i++)
{
- DBRefEntry[] dbref = sequences[i].getDBRef();
+ DBRefEntry[] dbref = sequences[i].getDBRefs();
if (dbref != null)
{
for (int j = 0; j < dbref.length; j++)
if (dbref != null)
{
for (int j = 0; j < dbref.length; j++)
@@
-205,8
+205,10
@@
public class DasSequenceFeatureFetcher
reply = JOptionPane
.showInternalConfirmDialog(
Desktop.desktop,
reply = JOptionPane
.showInternalConfirmDialog(
Desktop.desktop,
- MessageManager.getString("info.you_want_jalview_to_find_uniprot_accessions"),
- MessageManager.getString("label.find_uniprot_accession_ids"),
+ MessageManager
+ .getString("info.you_want_jalview_to_find_uniprot_accessions"),
+ MessageManager
+ .getString("label.find_uniprot_accession_ids"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
}
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
}
@@
-236,6
+238,7
@@
public class DasSequenceFeatureFetcher
class FetchSeqFeatures implements Runnable
{
class FetchSeqFeatures implements Runnable
{
+ @Override
public void run()
{
startFetching();
public void run()
{
startFetching();
@@
-245,10
+248,15
@@
public class DasSequenceFeatureFetcher
class FetchDBRefs implements Runnable
{
class FetchDBRefs implements Runnable
{
+ @Override
public void run()
{
running = true;
public void run()
{
running = true;
- new DBRefFetcher(sequences, af).fetchDBRefs(true);
+ boolean isNuclueotide = af.getViewport().getAlignment()
+ .isNucleotide();
+ new jalview.ws.DBRefFetcher(sequences, af, null, af.featureSettings,
+ isNuclueotide).fetchDBRefs(true);
+
startFetching();
setGuiFetchComplete();
}
startFetching();
setGuiFetchComplete();
}
@@
-264,7
+272,9
@@
public class DasSequenceFeatureFetcher
startTime = System.currentTimeMillis();
if (af != null)
{
startTime = System.currentTimeMillis();
if (af != null)
{
- af.setProgressBar(MessageManager.getString("status.fetching_das_sequence_features"), startTime);
+ af.setProgressBar(MessageManager
+ .getString("status.fetching_das_sequence_features"),
+ startTime);
}
if (sourceRegistry == null)
{
}
if (sourceRegistry == null)
{
@@
-378,8
+388,7
@@
public class DasSequenceFeatureFetcher
source));
for (String id : idl)
{
source));
for (String id : idl)
{
- List<String> qid = Arrays.asList(new String[]
- { id });
+ List<String> qid = Arrays.asList(new String[] { id });
try
{
DasGFFAdapter dga = featuresc.fetchData(source, qid);
try
{
DasGFFAdapter dga = featuresc.fetchData(source, qid);
@@
-496,13
+505,13
@@
public class DasSequenceFeatureFetcher
} catch (Exception ex)
{
Cache.log
} catch (Exception ex)
{
Cache.log
- .info("Error in 'experimental' mapping of features. Please try to reproduce and then report info to jalview-discuss@jalview.org.");
- Cache.log.info("Mapping feature from " + f.getBegin()
+ .warn("Error in 'experimental' mapping of features. Please try to reproduce and then report info to jalview-discuss@jalview.org.");
+ Cache.log.warn("Mapping feature from " + f.getBegin()
+ " to " + f.getEnd() + " in dbref "
+ dbref.getAccessionId() + " in "
+ dbref.getSource());
+ " to " + f.getEnd() + " in dbref "
+ dbref.getAccessionId() + " in "
+ dbref.getSource());
- Cache.log.info("using das Source " + source);
- Cache.log.info("Exception", ex);
+ Cache.log.warn("using das Source " + source);
+ Cache.log.warn("Exception", ex);
}
if (vf != null)
}
if (vf != null)
@@
-537,7
+546,9
@@
public class DasSequenceFeatureFetcher
if (af != null)
{
if (af != null)
{
- af.setProgressBar(MessageManager.getString("status.no_das_sources_active"), startTime);
+ af.setProgressBar(
+ MessageManager.getString("status.no_das_sources_active"),
+ startTime);
}
if (getFeatSettings() != null)
{
}
if (getFeatSettings() != null)
{
@@
-567,7
+578,9
@@
public class DasSequenceFeatureFetcher
{
if (af != null)
{
{
if (af != null)
{
- af.setProgressBar(MessageManager.getString("status.das_feature_fetching_cancelled"), startTime);
+ af.setProgressBar(MessageManager
+ .getString("status.das_feature_fetching_cancelled"),
+ startTime);
}
cancelled = true;
}
}
cancelled = true;
}
@@
-582,12
+595,13
@@
public class DasSequenceFeatureFetcher
if (!cancelled && af != null)
{
// only update the progress bar if we've completed the fetch normally
if (!cancelled && af != null)
{
// only update the progress bar if we've completed the fetch normally
- af.setProgressBar(MessageManager.getString("status.das_feature_fetching_complete"), startTime);
+ af.setProgressBar(MessageManager
+ .getString("status.das_feature_fetching_complete"), startTime);
}
if (af != null && af.featureSettings != null)
{
}
if (af != null && af.featureSettings != null)
{
- af.featureSettings.setTableData();
+ af.featureSettings.discoverAllFeatureData();
}
if (getFeatSettings() != null)
}
if (getFeatSettings() != null)
@@
-626,10
+640,11
@@
public class DasSequenceFeatureFetcher
Object[] nextSequence(jalviewSourceI dasSource, SequenceI seq)
{
if (cancelled)
Object[] nextSequence(jalviewSourceI dasSource, SequenceI seq)
{
if (cancelled)
+ {
return null;
return null;
+ }
DBRefEntry[] uprefs = jalview.util.DBRefUtils.selectRefs(
DBRefEntry[] uprefs = jalview.util.DBRefUtils.selectRefs(
- seq.getDBRef(), new String[]
- {
+ seq.getDBRefs(), new String[] {
// jalview.datamodel.DBRefSource.PDB,
jalview.datamodel.DBRefSource.UNIPROT,
// jalview.datamodel.DBRefSource.EMBL - not tested on any EMBL coord
// jalview.datamodel.DBRefSource.PDB,
jalview.datamodel.DBRefSource.UNIPROT,
// jalview.datamodel.DBRefSource.EMBL - not tested on any EMBL coord
@@
-668,7
+683,9
@@
public class DasSequenceFeatureFetcher
qstring.add(uprefs[j].getAccessionId());
}
else
qstring.add(uprefs[j].getAccessionId());
}
else
+ {
System.out.println("IGNORE " + csys.getAuthority());
System.out.println("IGNORE " + csys.getAuthority());
+ }
}
}
}
}
}
}
@@
-706,8
+723,7
@@
public class DasSequenceFeatureFetcher
}
}
}
}
- return new Object[]
- { ids, qstring };
+ return new Object[] { ids, qstring };
}
/**
}
/**
@@
-839,7
+855,7
@@
public class DasSequenceFeatureFetcher
{
for (String note : feat.getNOTE())
{
{
for (String note : feat.getNOTE())
{
- desc += (String) note;
+ desc += note;
}
}
}
}