Package org.snpeff.interval
Class Genes
- java.lang.Object
-
- org.snpeff.interval.Genes
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<Gene>
public class Genes extends java.lang.Object implements java.lang.Iterable<Gene>, java.io.Serializable
A collection of genes (marker intervals) Note: It is assumed that all genes belong to the same genome- Author:
- pcingola
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description boolean
debug
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Gene gene)
Add a gene interval to this collectionvoid
createCircularGenes()
In a circular genome, a gene can have negative coordinates or crosses over chromosome end.java.util.List<Intergenic>
createIntergenic()
Creates a list of Intergenic regionsvoid
createSpliceSites(int spliceSiteSize, int spliceRegionExonSize, int spliceRegionIntronMin, int spliceRegionIntronMax)
Create splice sites.java.util.List<Marker>
createUpDownStream(int upDownLength)
Creates a list of UP/DOWN stream regions (for each transcript) Upstream (downstream) stream is defined as upDownLength before (after) transcript Note: If upDownLength <=0 no interval is createdTranscript
findTranscript(java.lang.String trId)
Find a transcript by IDGene
get(java.lang.String geneId)
Obtain a gene intervalGene
getGeneByName(java.lang.String geneName)
Obtain a gene by GeneName WARNING: The first match is returned.java.util.Iterator<Gene>
iterator()
int
size()
java.util.Collection<Gene>
sorted()
java.lang.String
toString()
java.util.Collection<Gene>
values()
-
-
-
Constructor Detail
-
Genes
public Genes(Genome genome)
-
-
Method Detail
-
add
public void add(Gene gene)
Add a gene interval to this collection
-
createCircularGenes
public void createCircularGenes()
In a circular genome, a gene can have negative coordinates or crosses over chromosome end. These genes are mirrored to the opposite end of the chromosome so that they can be referenced by both circular coordinates.
-
createIntergenic
public java.util.List<Intergenic> createIntergenic()
Creates a list of Intergenic regions
-
createSpliceSites
public void createSpliceSites(int spliceSiteSize, int spliceRegionExonSize, int spliceRegionIntronMin, int spliceRegionIntronMax)
Create splice sites.- Parameters:
createIfMissing
- : If true, create canonical splice sites if they are missing. For a definition of splice site, see comments at the beginning of SpliceSite.java
-
createUpDownStream
public java.util.List<Marker> createUpDownStream(int upDownLength)
Creates a list of UP/DOWN stream regions (for each transcript) Upstream (downstream) stream is defined as upDownLength before (after) transcript Note: If upDownLength <=0 no interval is created
-
findTranscript
public Transcript findTranscript(java.lang.String trId)
Find a transcript by ID
-
get
public Gene get(java.lang.String geneId)
Obtain a gene interval
-
getGeneByName
public Gene getGeneByName(java.lang.String geneName)
Obtain a gene by GeneName WARNING: The first match is returned. If multiple genes share the same gene name, no order can be expected for this method.
-
iterator
public java.util.Iterator<Gene> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<Gene>
-
size
public int size()
-
sorted
public java.util.Collection<Gene> sorted()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
values
public java.util.Collection<Gene> values()
-
-