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:
d68c7e0
)
remove null pointer exception when embl file is not retrieved and comment about selec...
author
jprocter
<Jim Procter>
Fri, 24 Aug 2007 15:37:12 +0000
(15:37 +0000)
committer
jprocter
<Jim Procter>
Fri, 24 Aug 2007 15:37:12 +0000
(15:37 +0000)
src/jalview/ws/dbsources/EmblXmlSource.java
patch
|
blob
|
history
diff --git
a/src/jalview/ws/dbsources/EmblXmlSource.java
b/src/jalview/ws/dbsources/EmblXmlSource.java
index
1300c65
..
3179110
100644
(file)
--- a/
src/jalview/ws/dbsources/EmblXmlSource.java
+++ b/
src/jalview/ws/dbsources/EmblXmlSource.java
@@
-23,10
+23,6
@@
public abstract class EmblXmlSource extends EbiFileRetrievedProxy
super();
\r
}
\r
/**
\r
super();
\r
}
\r
/**
\r
- * set this to false to *not* add protein products to alignment dataset.
\r
- */
\r
- public boolean getProteinProducts=false;
\r
- /**
\r
* retrieve and parse an emblxml file
\r
* @param emprefx either EMBL or EMBLCDS strings are allowed - anything else will not retrieve emblxml
\r
* @param query
\r
* retrieve and parse an emblxml file
\r
* @param emprefx either EMBL or EMBLCDS strings are allowed - anything else will not retrieve emblxml
\r
* @param query
\r
@@
-53,13
+49,19
@@
public abstract class EmblXmlSource extends EbiFileRetrievedProxy
}
\r
if (reply != null && reply.exists())
\r
{
\r
}
\r
if (reply != null && reply.exists())
\r
{
\r
+ efile=null;
\r
file = reply.getAbsolutePath();
\r
file = reply.getAbsolutePath();
\r
- efile = jalview.datamodel.xdb.embl.EmblFile.getEmblFile(reply);
\r
+ if (reply.length()>25)
\r
+ {
\r
+ efile = jalview.datamodel.xdb.embl.EmblFile.getEmblFile(reply);
\r
+ } else {
\r
+ result.append("# No EMBL record retrieved for "+emprefx.toLowerCase()+":"+query.trim());
\r
+ }
\r
}
\r
if (efile!=null) {
\r
for (Iterator i=efile.getEntries().iterator(); i.hasNext(); ) {
\r
EmblEntry entry = (EmblEntry) i.next();
\r
}
\r
if (efile!=null) {
\r
for (Iterator i=efile.getEntries().iterator(); i.hasNext(); ) {
\r
EmblEntry entry = (EmblEntry) i.next();
\r
- SequenceI[] seqparts = entry.getSequences(false,!getProteinProducts, emprefx);
\r
+ SequenceI[] seqparts = entry.getSequences(false, true, emprefx); // TODO: use !fetchNa,!fetchPeptide here instead - see todo in emblEntry
\r
if (seqparts!=null) {
\r
SequenceI[] newseqs = null;
\r
int si=0;
\r
if (seqparts!=null) {
\r
SequenceI[] newseqs = null;
\r
int si=0;
\r