X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2FDasSequenceFeatureFetcher.java;h=808d9a076c125ad7597cd4ec09e646d42f73986a;hb=2299c6669cfb133cbad69e249669220bca174767;hp=e553b09d5ace577d4016a85790f5bdae06b31a5d;hpb=59d682209891099d46b960509907c79e3fb276fe;p=jalview.git
diff --git a/src/jalview/ws/DasSequenceFeatureFetcher.java b/src/jalview/ws/DasSequenceFeatureFetcher.java
index e553b09..808d9a0 100644
--- a/src/jalview/ws/DasSequenceFeatureFetcher.java
+++ b/src/jalview/ws/DasSequenceFeatureFetcher.java
@@ -1,19 +1,22 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
- * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
* Jalview is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
*
* Jalview is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with Jalview. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.ws;
@@ -24,6 +27,7 @@ import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
import jalview.gui.Desktop;
import jalview.gui.FeatureSettings;
+import jalview.util.MessageManager;
import jalview.util.UrlLink;
import jalview.ws.dbsources.das.api.DasSourceRegistryI;
import jalview.ws.dbsources.das.api.jalviewSourceI;
@@ -201,9 +205,10 @@ public class DasSequenceFeatureFetcher
reply = JOptionPane
.showInternalConfirmDialog(
Desktop.desktop,
- "Do you want Jalview to find\n"
- + "Uniprot Accession ids for given sequence names?",
- "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);
}
@@ -261,7 +266,9 @@ public class DasSequenceFeatureFetcher
startTime = System.currentTimeMillis();
if (af != null)
{
- af.setProgressBar("Fetching DAS Sequence Features", startTime);
+ af.setProgressBar(MessageManager
+ .getString("status.fetching_das_sequence_features"),
+ startTime);
}
if (sourceRegistry == null)
{
@@ -375,8 +382,7 @@ public class DasSequenceFeatureFetcher
source));
for (String id : idl)
{
- List qid = Arrays.asList(new String[]
- { id });
+ List qid = Arrays.asList(new String[] { id });
try
{
DasGFFAdapter dga = featuresc.fetchData(source, qid);
@@ -493,13 +499,13 @@ public class DasSequenceFeatureFetcher
} 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());
- 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)
@@ -534,7 +540,9 @@ public class DasSequenceFeatureFetcher
if (af != null)
{
- af.setProgressBar("No DAS Sources Active", startTime);
+ af.setProgressBar(
+ MessageManager.getString("status.no_das_sources_active"),
+ startTime);
}
if (getFeatSettings() != null)
{
@@ -564,7 +572,9 @@ public class DasSequenceFeatureFetcher
{
if (af != null)
{
- af.setProgressBar("DAS Feature Fetching Cancelled", startTime);
+ af.setProgressBar(MessageManager
+ .getString("status.das_feature_fetching_cancelled"),
+ startTime);
}
cancelled = true;
}
@@ -579,12 +589,13 @@ public class DasSequenceFeatureFetcher
if (!cancelled && af != null)
{
// only update the progress bar if we've completed the fetch normally
- af.setProgressBar("DAS Feature Fetching Complete", startTime);
+ af.setProgressBar(MessageManager
+ .getString("status.das_feature_fetching_complete"), startTime);
}
if (af != null && af.featureSettings != null)
{
- af.featureSettings.setTableData();
+ af.featureSettings.discoverAllFeatureData();
}
if (getFeatSettings() != null)
@@ -623,10 +634,11 @@ public class DasSequenceFeatureFetcher
Object[] nextSequence(jalviewSourceI dasSource, SequenceI seq)
{
if (cancelled)
+ {
return null;
+ }
DBRefEntry[] uprefs = jalview.util.DBRefUtils.selectRefs(
- seq.getDBRef(), new String[]
- {
+ seq.getDBRef(), new String[] {
// jalview.datamodel.DBRefSource.PDB,
jalview.datamodel.DBRefSource.UNIPROT,
// jalview.datamodel.DBRefSource.EMBL - not tested on any EMBL coord
@@ -665,7 +677,9 @@ public class DasSequenceFeatureFetcher
qstring.add(uprefs[j].getAccessionId());
}
else
+ {
System.out.println("IGNORE " + csys.getAuthority());
+ }
}
}
}
@@ -703,8 +717,7 @@ public class DasSequenceFeatureFetcher
}
}
- return new Object[]
- { ids, qstring };
+ return new Object[] { ids, qstring };
}
/**
@@ -836,7 +849,7 @@ public class DasSequenceFeatureFetcher
{
for (String note : feat.getNOTE())
{
- desc += (String) note;
+ desc += note;
}
}