} else {
if (processingEntry.hasRetrievalUrl())
{
+ String safePDBId = java.net.URLEncoder.encode(pdbid,"UTF-8");
+
// retrieve from URL to new local tmpfile
- File tmpFile = File.createTempFile(pdbid,
+ File tmpFile = File.createTempFile(safePDBId,
"." + (PDBEntry.Type.MMCIF.toString().equals(
processingEntry.getType().toString()) ? "cif"
: "pdb"));
import jalview.datamodel.DBRefSource;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.PDBEntry.Type;
+import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
+import jalview.datamodel.features.SequenceFeaturesI;
import jalview.io.DataSourceType;
import jalview.io.FileFormat;
import jalview.io.FileFormatI;
dbVersion, (chid == null ? id : id + chid));
// dbentry.setMap()
pdbcs.addDBRef(dbentry);
+ // update any feature groups
+ List<SequenceFeature> allsf = pdbcs.getFeatures().getAllFeatures();
+ List<SequenceFeature> newsf = new ArrayList<SequenceFeature>();
+ if (allsf!=null && allsf.size()>0)
+ {
+ for (SequenceFeature f:allsf)
+ {
+ if (file.equals(f.getFeatureGroup()))
+ {
+ f = new SequenceFeature(f, f.type, f.begin, f.end, id, f.score);
+ }
+ newsf.add(f);
+ }
+ pdbcs.setSequenceFeatures(newsf);
+ }
}
}
else
* @param seq
* @param status
* The Status of the transferred annotation
+ * @param actualGroupId the group id for the features on the destination sequence (e.g. the official accession ID)
*/
public void transferRESNUMFeatures(SequenceI seq,
String status)
int newEnd = 1 + residues.elementAt(feature.getEnd() - offset).atoms
.elementAt(0).alignmentMapping;
SequenceFeature tx = new SequenceFeature(feature, newBegin, newEnd,
- feature.getFeatureGroup(), feature.getScore());
+ pdbid, feature.getScore());
tx.setStatus(status
+ ((tx.getStatus() == null || tx.getStatus().length() == 0)
? ""