* @return
* @throws Exception
*/
- public AlignmentI getEmblSequenceRecords(String emprefx, String query)
+ protected AlignmentI getEmblSequenceRecords(String emprefx, String query)
throws Exception
{
startQuery();
* @return
* @throws Exception
*/
- public AlignmentI getEmblSequenceRecords(String emprefx, String query,
+ protected AlignmentI getEmblSequenceRecords(String emprefx, String query,
File reply) throws Exception
{
List<EntryType> entries = null;
/*
* add db references
*/
- List<XrefType> dbRefs = entry.getXref();
- if (dbRefs != null)
+ List<XrefType> xrefs = entry.getXref();
+ if (xrefs != null)
{
- for (XrefType dbref : dbRefs)
+ for (XrefType xref : xrefs)
{
- String acc = dbref.getId();
- String source = DBRefUtils.getCanonicalName(dbref.getDb());
- String version = dbref.getSecondaryId();
+ String acc = xref.getId();
+ String source = DBRefUtils.getCanonicalName(xref.getDb());
+ String version = xref.getSecondaryId();
+ if (version == null || "".equals(version))
+ {
+ version = "0";
+ }
dna.addDBRef(new DBRefEntry(source, version, acc));
}
}
* ensure UniProtKB/Swiss-Prot converted to UNIPROT
*/
String source = DBRefUtils.getCanonicalName(xref.getDb());
- DBRefEntry dbref = new DBRefEntry(source, xref.getSecondaryId(),
- xref.getId());
- DBRefEntry proteinDbRef = new DBRefEntry(dbref.getSource(),
- dbref.getVersion(), dbref.getAccessionId());
+ String version = xref.getSecondaryId();
+ if (version == null || "".equals(version))
+ {
+ version = "0";
+ }
+ DBRefEntry dbref = new DBRefEntry(source, version, xref.getId());
+ DBRefEntry proteinDbRef = new DBRefEntry(source, version,
+ dbref.getAccessionId());
if (source.equals(DBRefSource.UNIPROT))
{
String proteinSeqName = DBRefSource.UNIPROT + "|"