GenomicFeatures

class GenomicFeatures(val gffFile: String, val refFasta: String? = null)

The GenomicFeatures class processes data from a GFF formatted file. Internally it stores the GFF features in Kotlin dataframes. THis allows quicker access than using an internal database. The Kotlin dataframe object also allows for filtering based on columns, metrics for columns and rows.

This class also provides functions that can filter and combine data from different feature groups into a single dataframe for user perusal.

TO create the dataframes, this code uses a bufferedReader rather than DataFrame.read(). THis is because: a. we must strip off the ## headers lines at the beginning, whose count we don't know b. THere is no column header line in the gff file, so DataFrame.read() would assume the first line is the column headers. Based on above, we create the data frames programmatically, the add the "getter" lines necessary to allow the DataFrame code to access the columns by name vs it""

The refFasta is optional. IF it exists, it will be used to link gff ranges with reference sequence. See examples of how this in GenomicFeatureTest:"test GenomicFeatures with fasta" Work needs to be done here to create functions for combining them based on user requests.

Constructors

Link copied to clipboard
constructor(gffFile: String, refFasta: String? = null)

Types

Link copied to clipboard
data class cdsDataRow(val name: String, val seqid: String, val start: Int, val end: Int, val strand: String, val phase: Int, val transcript: String)
Link copied to clipboard
data class chromDataRow(val seqid: String, val length: Int)
Link copied to clipboard
data class exonDataRow(val name: String, val seqid: String, val start: Int, val end: Int, val strand: String, val rank: Int, val transcript: String)
Link copied to clipboard
Link copied to clipboard
data class featureRangeDataRow(val seqid: String, val start: Int, val end: Int, val strand: String, val type: String, val data: String)
Link copied to clipboard
data class fivePrimeDataRow(val seqid: String, val start: Int, val end: Int, val strand: String, val transcript: String)
Link copied to clipboard
data class geneDataRow(val name: String, val seqid: String, val start: Int, val end: Int, val strand: String, val biotype: String, val logic_name: String)
Link copied to clipboard
data class gffDataRow(val seqId: String, val source: String, val type: String, val start: Int, val end: Int, val score: Float, val strand: String, val phase: Int, val attributes: String)
Link copied to clipboard
data class threePrimeDataRow(val seqid: String, val start: Int, val end: Int, val strand: String, val transcript: String)
Link copied to clipboard
data class transcriptDataRow(val name: String, val seqid: String, val start: Int, val end: Int, val strand: String, val biotype: String)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val refFasta: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun featuresByRange(chr: String, range: IntRange, features: String = "ALL"): DataFrame<GenomicFeatures.featureRangeDataRow>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun help()
Link copied to clipboard
Link copied to clipboard
fun readGffToDFs(gffFile: String)
Link copied to clipboard
fun sequenceForChrRange(chr: String, positions: IntRange): String?
Link copied to clipboard
Link copied to clipboard