Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

GenBankWriter does not use information in the original header #942 - #1042

Merged
josemduarte merged 31 commits into
biojava:masterfrom
jamesmorris:master
Oct 26, 2022
Merged

josemduarte merged 31 commits into
biojava:masterfrom
jamesmorris:master

Conversation

@jamesmorris

Copy link
Copy Markdown
Contributor

Hello,
I have been working on the issue that a GenBank file read in through the parser and then written back out will result in loss of information from the original file. While looking into this I have also fixed a few other issues with the parser and writer for Genbank files. The highlights of this work includes:

  • added a new writer helper method that will retain the information in the original locus line
  • fixed writing out db_xref feature qualifiers which was not working
  • fixed writing out the accession version and GI ID
  • allow locus ids that contain spaces
  • allow the locus id to be empty
  • fixed writing out feature locations containing joins and partial locations
  • fixed reading and writing locations on multiple lines
  • Maintained quotes around feature qualifier values in files that are written out
  • Added a test and test file for feature locations containing joins
  • Added a test to check for differences between an original file and one that had been written out by the writer

jamesmorris and others added 28 commits October 3, 2022 13:37
from dbxref -> db_xref as the second form is most commonly used and
appears in reference material for GenBank files
this differently because they don't have a value. Rather we need to use
the database and ID values to create the output

@josemduarte josemduarte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thank you! A few minor comments

*
* @param sequence
*/
private String _write_original_first_line(S sequence) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: could you keep the method name as per usual camel case convention?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure happy to change, I would normally but I was just following the convention already used in the class
e.g. _write_single_line, _write_multi_line etc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I didn't realise that was the style already for that file. Well I guess we can live with that a bit longer...

@emckee2006

emckee2006 commented Oct 19, 2022 via email

Copy link
Copy Markdown
Contributor

@josemduarte josemduarte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@josemduarte

Copy link
Copy Markdown
Contributor

@jamesmorris could I also ask you to update the CHANGELOG.md file describing what's changed here?
You can create a new 6.1.0 (future release) section there. That will be our next release, which is a bump in minor because of the changes here. I will try to get it out as soon as possible.

After that, we should try to finally push the first java 11 release, see #1035

jamesmorris added a commit to jamesmorris/biojava-942 that referenced this pull request Oct 26, 2022
Updated changelog with a new release and details from pull request biojava#1042
@jamesmorris jamesmorris mentioned this pull request Oct 26, 2022
@josemduarte
josemduarte merged commit 3cece28 into biojava:master Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants