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 (from parent 1:
37564f3
)
fix null pointer when new view created on alignment with existing sequence mappings...
author
jprocter
<Jim Procter>
Tue, 9 Jun 2009 15:14:59 +0000
(15:14 +0000)
committer
jprocter
<Jim Procter>
Tue, 9 Jun 2009 15:14:59 +0000
(15:14 +0000)
src/jalview/io/VamsasAppDatastore.java
patch
|
blob
|
history
diff --git
a/src/jalview/io/VamsasAppDatastore.java
b/src/jalview/io/VamsasAppDatastore.java
index
fe971d9
..
886f515
100644
(file)
--- a/
src/jalview/io/VamsasAppDatastore.java
+++ b/
src/jalview/io/VamsasAppDatastore.java
@@
-2048,7
+2048,7
@@
public class VamsasAppDatastore
{
Cache.log.warn("ignoring additional "
+ (ae[aa].getValueCount() - 1)
{
Cache.log.warn("ignoring additional "
+ (ae[aa].getValueCount() - 1)
- + "values in annotation element.");
+ + " values in annotation element.");
}
val = ae[aa].getValue(0);
}
}
val = ae[aa].getValue(0);
}
@@
-2646,7
+2646,13
@@
public class VamsasAppDatastore
Cache.log.warn("Creating new dataset for an alignment.");
jal.setDataset(null);
}
Cache.log.warn("Creating new dataset for an alignment.");
jal.setDataset(null);
}
- dataset = (DataSet) getjv2vObj(jal.getDataset());
+ dataset = (DataSet) ((Alignment) getjv2vObj(viewport.getSequenceSetId())).getV_parent(); // jal.getDataset());
+ if (dataset==null)
+ {
+ dataset = (DataSet) getjv2vObj(jal.getDataset());
+ Cache.log.error("Can't find the correct dataset for the alignment in this view. Creating new one.");
+
+ }
// Store any sequence mappings.
if (av.getAlignment().getCodonFrames() != null
&& av.getAlignment().getCodonFrames().length > 0)
// Store any sequence mappings.
if (av.getAlignment().getCodonFrames() != null
&& av.getAlignment().getCodonFrames().length > 0)
@@
-2655,7
+2661,7
@@
public class VamsasAppDatastore
.getCodonFrames();
for (int cf = 0; cf < cframes.length; cf++)
{
.getCodonFrames();
for (int cf = 0; cf < cframes.length; cf++)
{
- if (cframes[cf].getdnaSeqs().length > 0)
+ if (cframes[cf].getdnaSeqs()!=null && cframes[cf].getdnaSeqs().length > 0)
{
jalview.datamodel.SequenceI[] dmps = cframes[cf].getdnaSeqs();
jalview.datamodel.Mapping[] mps = cframes[cf].getProtMappings();
{
jalview.datamodel.SequenceI[] dmps = cframes[cf].getdnaSeqs();
jalview.datamodel.Mapping[] mps = cframes[cf].getProtMappings();