- // TODO: merge conflicts from JAL-2154 branch and use PrimaryDBRefs()
- // for (DBRefEntry primRef:dnaDss.getPrimaryDBRefs())
- // {
- // creates a complementary cross-reference to the source sequence's
- // primary reference.
-
- // // problem here is that the cross-reference is synthesized -
- // cdsSeq.getName() may be like 'CDS|dnaaccession' or 'CDS|emblcdsacc'
- // // assuming cds version same as dna ?!?
- // DBRefEntry proteinToCdsRef = new DBRefEntry(dnaRef.getSource(),
- // dnaRef.getVersion(), cdsSeq.getName());
- // proteinToCdsRef.setMap(new Mapping(cdsSeqDss, cdsToProteinMap
- // .getInverse()));
- // proteinProduct.addDBRef(proteinToCdsRef);
- // }
+
+ for (DBRefEntry primRef : dnaDss.getPrimaryDBRefs())
+ {
+ // creates a complementary cross-reference to the source sequence's
+ // primary reference.
+
+ DBRefEntry cdsCrossRef = new DBRefEntry(primRef.getSource(),
+ primRef.getSource() + ":" + primRef.getVersion(),
+ primRef.getAccessionId());
+ cdsCrossRef
+ .setMap(new Mapping(dnaDss, new MapList(dnaToCdsMap)));
+ cdsSeqDss.addDBRef(cdsCrossRef);
+
+ // problem here is that the cross-reference is synthesized -
+ // cdsSeq.getName() may be like 'CDS|dnaaccession' or
+ // 'CDS|emblcdsacc'
+ // assuming cds version same as dna ?!?
+
+ DBRefEntry proteinToCdsRef = new DBRefEntry(
+ primRef.getSource(), primRef.getVersion(),
+ cdsSeq.getName());
+ //
+ proteinToCdsRef.setMap(new Mapping(cdsSeqDss, cdsToProteinMap
+ .getInverse()));
+ proteinProduct.addDBRef(proteinToCdsRef);
+ }