fromFile

fun fromFile(path: String, textCorrecter: (String) -> String? = null, parentResolver: ParentResolver? = null, multipleParentage: Boolean = false, modifySchema: TypeSchema.() -> Unit? = null): Genome

Creates immutable representation of a GFF file. Note that discontinuous features (those that have the same ID but are represented on different rows) will be merged into a single Feature object with several ranges. The discontinuous features must agree on all fields except start, end, phase, and attributes (only the attributes of the first occurrence of the ID will be preserved).

Parameters

path

The location of the GFF file.

textCorrecter

A function that reads in a line of the GFF file and applies a correction to it prior to any step of parsing. Use this to correct errors in the file! If null, nothing is done.

parentResolver

Will be used to select one parent out of multiple. A parent resolver takes the line being parsed, all potential parents that the line lists, and returns the index of the parent that you wish to maintain. If null, no parent resolution is performed.

multipleParentage

If true, features in the genome can contain multiple parents. If false and instances of multiple parentage exist after a non-null parentResolver is applied, throws ParseException.

modifySchema

If non-null, will modify the type schema in the manner defined prior to parsing. Use this to enable the parsing of non-standard GFF files.

Throws

if there are multiple parents for a feature parentResolver is null and multipleParentage is false.

PLANNED: data corrector