[Biojava-dev] [Bug 2234] Error during "rich" conversion of genbank to EMBL format
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Thu Mar 15 10:11:58 UTC 2007
http://bugzilla.open-bio.org/show_bug.cgi?id=2234
------- Comment #4 from holland at ebi.ac.uk 2007-03-15 06:11 EST -------
I've identified the problem areas in the EMBLFormat code. I will fix them
tomorrow.
Note to self:
if (format.equals(EMBL_FORMAT)) {
// accession; SV version; circular/linear; moltype; dataclass;
division; length BP.
locusLine.append(rs.getAccession());
locusLine.append("; ");
--- INSERT "SV versionLine;" here
locusLine.append(rs.getCircular()?"circular; ":"linear; ");
locusLine.append(moltype);
// version line
--- WRAP in test - only execute if EMBL_PRE87_FORMAT
if (versionLine!=null) StringTools.writeKeyValueLine(VERSION_TAG,
versionLine, 5, this.getLineWidth(), null, VERSION_TAG, this.getPrintStream());
else StringTools.writeKeyValueLine(VERSION_TAG,
accession+"."+rs.getVersion(), 5, this.getLineWidth(), null, VERSION_TAG,
this.getPrintStream());
this.getPrintStream().println(DELIMITER_TAG+" ");
// date line
-- INSERT commaa before space before Created
StringTools.writeKeyValueLine(DATE_TAG, (cdat==null?udat:cdat)+" (Rel.
"+(crel==null?"0":crel)+" Created)", 5, this.getLineWidth(), null, DATE_TAG,
this.getPrintStream());
--- CHECK that leading space chomped first - does this record start in space
then "? It ends in "; on last line but does not start on same line
if (key.equals(TITLE_TAG)) {
if (val.length()>1) {
if (val.endsWith(";")) val =
val.substring(0,val.length()-1); // chomp semicolon
if (val.endsWith("\"")) val =
val.substring(1,val.length()-2); // chomp quotes
title = val;
} else title=null; // single semi-colon indicates no
title
}
// add-in other dbxrefs where present
for (Iterator j = f.getRankedCrossRefs().iterator(); j.hasNext(); )
{
RankedCrossRef rcr = (RankedCrossRef)j.next();
CrossRef cr = rcr.getCrossRef();
--- REMOVE taxon: prefix - shouldn't be there...
StringTools.writeKeyValueLine(FEATURE_TAG,
"/db_xref=\"taxon:"+cr.getDbname()+":"+cr.getAccession()+"\"", 21,
this.getLineWidth(), null, FEATURE_TAG, this.getPrintStream());
}
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the biojava-dev
mailing list