# Class SnpEffPredictorFactoryGff

java.lang.Object
org.snpeff.snpEffect.factory.SnpEffPredictorFactory
org.snpeff.snpEffect.factory.SnpEffPredictorFactoryGff

Direct Known Subclasses:
  `SnpEffPredictorFactoryGff2, SnpEffPredictorFactoryGff3, SnpEffPredictorFactoryGtf22, SnpEffPredictorFactoryRand`

public abstract class SnpEffPredictorFactoryGff extends SnpEffPredictorFactory
This class creates a SnpEffectPredictor from a GFF file. This includes derived formats as GTF.

References: http://gmod.org/wiki/GFF3

Author:
  pcingola

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`FASTA_DELIMITER`

### Fields inherited from class SnpEffPredictorFactory

`MARK, MIN_TOTAL_FRAME_COUNT`

## Constructor Summary

Constructors
Constructor
Description
`SnpEffPredictorFactoryGff(Config config)`

## Method Summary

Modifier and Type
Method
Description
`protected Exon`
`addExon(Transcript tr, GffMarker gffMarker, String exonId)`
Create a new exon
`protected List<Exon>`
`addExons(GffMarker gffMarker)`
Create and add a new exon
`protected Gene`
`addGene(GffMarker gffMarker)`
`protected Gene`
`addGene(GffMarker gffMarker, boolean findNextGeneId)`
Create and add a gene based on GffMarker
`protected IntergenicConserved`
`addIntergenicConserved(GffMarker gffMarker)`
Add an intergenic conserved region
`protected boolean`
`addInterval(GffMarker gffMarker)`
Add interval based on GffMarker data
`protected IntronConserved`
`addIntronConserved(GffMarker gffMarker)`
Add an intron conserved region
`protected List<Utr3prime>`
`addUtr3(GffMarker gffMarker)`
Create new UTR3primes
`protected List<Utr5prime>`
`addUtr5(GffMarker gffMarker)`
Create UTR5primes
`SnpEffectPredictor`
`create()`
`protected Exon`
`findOrCreateExon(String parentId, GffMarker gffMarker)`
Find an exon for a given parentId
`protected Gene`
`findOrCreateGene(GffMarker gffMarker)`
Find or create a gene based on GffMarker
`protected Transcript`
`findOrCreateTranscript(GffMarker gffMarker)`
Create and add a transcript based on GffMarker
`protected boolean`
`parse(String line)`
Parse a line
`protected void`
`readExonSequences()`
Read exon sequences from a FASTA file
`protected void`
`readExonSequencesGff(String gffFileName)`
Read chromosome sequence from GFF3 file and extract exons' sequences
`protected void`
`readGff()`
Read GFF file from the beginning looking for 'typeToRead' elements

### Methods inherited from class SnpEffPredictorFactory

`add, add, add, add, add, add, addMarker, addSequences, adjustChromosomes, adjustTranscripts, beforeExonSequences, codingFromCds, collapseZeroLenIntrons, createRandSequences, deleteRedundant, exonsFromCds, exonsFromCds, findGene, findGene, findMarker, findTranscript, findTranscript, getOrCreateChromosome, getProteinByTrId, parsePosition, replaceTranscript, setCircularCorrectLargeGap, setCreateRandSequences, setDebug, setFastaFile, setFileName, setRandom, setReadSequences, setStoreSequences, setVerbose, showChromoNamesDifferences`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### FASTA_DELIMITER

public static final String FASTA_DELIMITER

See Also:
  - Constant Field Values

## Constructor Details

### SnpEffPredictorFactoryGff

public SnpEffPredictorFactoryGff(Config config)

## Method Details

### addExon

protected Exon addExon(Transcript tr, GffMarker gffMarker, String exonId)
Create a new exon

### addExons

protected List<Exon> addExons(GffMarker gffMarker)
Create and add a new exon

### addGene

protected Gene addGene(GffMarker gffMarker)

### addGene

protected Gene addGene(GffMarker gffMarker, boolean findNextGeneId)
Create and add a gene based on GffMarker

### addIntergenicConserved

protected IntergenicConserved addIntergenicConserved(GffMarker gffMarker)
Add an intergenic conserved region

### addInterval

protected boolean addInterval(GffMarker gffMarker)
Add interval based on GffMarker data

Returns:
  true if on success

### addIntronConserved

protected IntronConserved addIntronConserved(GffMarker gffMarker)
Add an intron conserved region

### addUtr3

protected List<Utr3prime> addUtr3(GffMarker gffMarker)
Create new UTR3primes

### addUtr5

protected List<Utr5prime> addUtr5(GffMarker gffMarker)
Create UTR5primes

### create

public SnpEffectPredictor create()

Specified by:
  `create` in class `SnpEffPredictorFactory`

### findOrCreateExon

protected Exon findOrCreateExon(String parentId, GffMarker gffMarker)
Find an exon for a given parentId

### findOrCreateGene

protected Gene findOrCreateGene(GffMarker gffMarker)
Find or create a gene based on GffMarker

### findOrCreateTranscript

protected Transcript findOrCreateTranscript(GffMarker gffMarker)
Create and add a transcript based on GffMarker

### parse

protected boolean parse(String line)
Parse a line

Returns:
  true if a line was parsed

### readExonSequences

protected void readExonSequences()
Description copied from class: `SnpEffPredictorFactory`
Read exon sequences from a FASTA file

Overrides:
  `readExonSequences` in class `SnpEffPredictorFactory`

### readExonSequencesGff

protected void readExonSequencesGff(String gffFileName)
Read chromosome sequence from GFF3 file and extract exons' sequences

### readGff

protected void readGff() throws Exception
Read GFF file from the beginning looking for 'typeToRead' elements

Throws:
  `Exception`