From: jprocter Date: Sat, 29 Sep 2007 13:50:38 +0000 (+0000) Subject: friendlier sequence names for protein products X-Git-Tag: Release_2_4~261 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=ae9d8eab907d3f49a529cc86f6dfa6689b50e3d3 friendlier sequence names for protein products --- diff --git a/src/jalview/datamodel/xdb/embl/EmblEntry.java b/src/jalview/datamodel/xdb/embl/EmblEntry.java index 350c44e..9d12ccf 100644 --- a/src/jalview/datamodel/xdb/embl/EmblEntry.java +++ b/src/jalview/datamodel/xdb/embl/EmblEntry.java @@ -542,10 +542,10 @@ public class EmblEntry if (prseq != null && prname != null && prid != null) { // extract proteins. - product = new Sequence(sourceDb + "|" + "EMBLCDS|" + prid - +((prname.length()==0) ? "" : " " + prname), prseq, prstart, prstart + product = new Sequence(prid + , prseq, prstart, prstart + prseq.length() - 1); - product.setDescription("Protein Product from " + sourceDb); + product.setDescription(((prname.length()==0) ? "Protein Product from " + sourceDb : prname)); if (!noPeptide) { @@ -584,7 +584,7 @@ public class EmblEntry { // TODO: Add a DbRef back to the parent EMBL sequence with the exon // map - + // if given a dataset reference, search dataset for parent EMBL sequence if it exists and set its map // make a new feature annotating the coding contig } else @@ -646,6 +646,10 @@ public class EmblEntry if (map!=null && map.getTo()!=null) { map.getTo().addDBRef(new DBRefEntry(ref.getSource(), ref.getVersion(), ref.getAccessionId())); // don't copy map over. + if (map.getTo().getName().indexOf(prid)==0) + { + map.getTo().setName(jalview.datamodel.DBRefSource.UNIPROT+"|"+ref.getAccessionId()); + } } } if (product != null)