SequenceI uniprotEntryToSequence(Entry entry)
{
String id = getUniprotEntryId(entry);
- String seqString = entry.getSequence().getValue();
-
/*
- * for backwards compatibility with Castor processing,
- * remove any internal spaces
+ * Sequence should not include any whitespace, but JAXB leaves these in
*/
- if (seqString.indexOf(' ') > -1)
- {
- seqString = seqString.replace(" ", "");
- }
+ String seqString = entry.getSequence().getValue().replaceAll("\\s*",
+ "");
+
SequenceI sequence = new Sequence(id,
seqString);
sequence.setDescription(getUniprotEntryDescription(entry));
*/
final String dbVersion = getDbVersion();
List<DBRefEntry> dbRefs = new ArrayList<>();
+ boolean canonical=true;
for (String accessionId : entry.getAccession())
{
DBRefEntry dbRef = new DBRefEntry(DBRefSource.UNIPROT, dbVersion,
- accessionId);
+ accessionId,null,canonical);
+ canonical=false;
dbRefs.add(dbRef);
}