Skip to content

About

Typed GFF3 and GTF validation, selection, conversion, and sequence extraction

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

rsomics-annotation

rsomics-annotation is one GFF3/GTF product for validation, record selection, coordinate conversion, and annotation-aware sequence extraction.

The command set is:

  • validate: strict record, coordinate, phase, and identifier checks;
  • view: combined type, attribute, region, containment, and head selection;
  • to-bed: checked 1-based inclusive to 0-based half-open BED6 conversion;
  • extract: spliced transcript, CDS nucleotide, and protein FASTA.

Every command requires --format gff3 or --format gtf; the dialect is never guessed from a file extension. Input and output use - for standard streams. Named outputs are written transactionally.

rsomics-annotation extract --format gff3 genes.gff3 \
  --genome genome.fa \
  --transcripts transcripts.fa \
  --cds coding.fa \
  --protein proteins.fa

Extraction accepts any combination of the three named outputs in one pass. Plain genome FASTA needs no prebuilt index; an existing .fai is reused, or an index is built in memory without modifying the input directory. Compressed genomes require their persistent FAI and BGZF indexes. GFF3 CDS phase is required even where gffread would permissively assume zero.

view --region uses GFF/GTF's 1-based inclusive coordinates. to-bed performs the only conversion to the shared half-open interval model: 1..=1 becomes [0, 1). BED names prefer ID, then Name, then the feature type. BED score is currently 0; GFF scores are not silently coerced into BED's integer score domain.

The format authority is the Sequence Ontology GFF3 1.26 specification and the Ensembl GTF2 documentation. gffread 0.12.9 is the compatibility oracle for region selection and transcript/CDS/protein extraction. Golden cases cover both strands, multiple exons and transcripts, GFF3 and GTF, phase offsets, split GTF stop codons, multi-parent features, partial codons, and internal stops.

Embedded GFF3 FASTA and annotation repair are not supported.

The extraction behavior was reconstructed against gffread 0.12.9 (gpertea/gffread, MIT) and its gclib dependency (Artistic License 2.0).

License: MIT OR Apache-2.0.

About

Typed GFF3 and GTF validation, selection, conversion, and sequence extraction

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages