here is a proposal for a new package htsjdk.tribble.gtf
Description
htsjdk contains a gff3 codec but is still missing a GTF codec. I wrote a few classes parsing the a GTF. Some parts were copied from the gff3 package.
# constants
src/main/java/htsjdk/tribble/gtf/GtfConstants.java
# an interface describing a GTF record
# it comes with default methods to get the gene_id, gene_name, transcript_id, etc...
src/main/java/htsjdk/tribble/gtf/GtfFeature.java
# an implementation of GtfFeature
src/main/java/htsjdk/tribble/gtf/GtfFeatureImpl.java
# the GTF parser
src/main/java/htsjdk/tribble/gtf/GtfCodec.java
some tests have been added:
# test the properties of GtfFeature
src/test/java/htsjdk/tribble/gtf/GtfFeatureTest.java
# test the Codec
src/test/java/htsjdk/tribble/gtf/GtfCodecTest.java
for now I want to keep this simple for a first PR, so there is no implementation of the 'tree' building ( chromosme > gene > transcript > exon > etc... )
I didn't implemented the writer, I didn't fully implemented the UTF-8 escaping...
Things to think about before submitting:
[X] Make sure your changes compile and new tests pass locally.
[X] Add new tests or update existing ones:
A bug fix should include a test that previously would have failed and passes now.
New features should come with new tests that exercise and validate the new functionality.
[X] Extended the README / documentation, if necessary
[X] Check your code style.
[X] Write a clear commit title and message
The commit message should describe what changed and is targeted at htsjdk developers
Breaking changes should be mentioned in the commit message.
Hi all,
here is a proposal for a new package
htsjdk.tribble.gtf
Description
htsjdk contains a gff3 codec but is still missing a GTF codec. I wrote a few classes parsing the a GTF. Some parts were copied from the gff3 package.
some tests have been added:
and some files for the tests were added too:
Comparaison with the gff3 package:
Things to think about before submitting: