seqloc-datafiles-0.1: Read and write BED and GTF format genome annotations



Utilities for reading and writing GTF format gene annotations



readGtfTranscripts :: FilePath -> IO [Transcript]Source

Read a GTF annotation file. The entire file is read at once, because a single annotated transcript can span many lines in a GTF file that are not required to occur in any specific order. The transcript SpliceSeqLoc transcript location is assembled from exon annotations and any CDS location is then produced from CDS annotations, with an error occurring if the CDS is not a single contiguous location within the transcript.

transcriptToGtf :: ByteString -> Transcript -> ByteStringSource

Convert a Transcript to a string consisting of GTF lines. These lines will contain exon lines for the transcript, as well as CDS lines if the Transcript has a cds.