Package org.snpeff.snpEffect
Class SnpEffectPredictor
java.lang.Object
org.snpeff.snpEffect.SnpEffectPredictor
- All Implemented Interfaces:
Serializable
Predicts effects of SNPs
Note: Actually tries to predict any kind of SeqChange, not only SNPs . It is called SnpEffectPredictor for 'historical reasons'.
- Author:
- pcingola
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a gene intervalvoid
Add a markervoid
Add a set of markersvoid
Create interval trees (forest)int
Count number of transcriptsCreate (and add) up-down stream, splice sites, intergenic, etcvoid
filterTags
(Set<String> tags, Set<String> tagsNo) Filter transcripts by tagsvoid
Filter transcripts by TSLObtain a gene by geneIdint
int
int
getTranscript
(String trId) int
int
Remove all transcripts that are NOT in the liststatic SnpEffectPredictor
Load predictor from a binary filevoid
print()
Dump to sdtoutReturn a collection of intervals that intersect 'marker'queryClosestGene
(Marker inputInterval) Find closest gene to this markerReturn a collection of intervals that intersect 'marker' Query resulting genes, transcripts and exons to get ALL types of intervals possibleName of the regions hit by a markerName of the regions hit by a markervoid
removeNonCanonical
(String canonFile) Remove all non-canonical transcripts If a file is provided, read "Gene => canonical_transcript" mapping from fileboolean
Remove all unverified transcriptsint
retainAllTranscripts
(Set<String> trIds) Remove all transcripts that are NOT in the listvoid
Save predictor to a binary filevoid
Save predictor to a binary file (specified by the configuration)void
setDebug
(boolean debug) void
setSpliceRegionExonSize
(int spliceRegionExonSize) void
setSpliceRegionIntronMax
(int spliceRegionIntronMax) void
setSpliceRegionIntronMin
(int spliceRegionIntronMin) void
setSpliceSiteSize
(int spliceSiteSize) void
setUpDownStreamLength
(int upDownStreamLength) void
setUseChromosomes
(boolean useChromosomes) int
size()
toString()
variantEffect
(Variant variant) Predict the effect of a variantprotected void
variantEffect
(Variant variant, VariantEffects variantEffects, Markers intersects) Calculate variant effect for each marker in 'intersect'
-
Field Details
-
DEFAULT_UP_DOWN_LENGTH
public static final int DEFAULT_UP_DOWN_LENGTH- See Also:
-
SMALL_VARIANT_SIZE_THRESHOLD
public static final int SMALL_VARIANT_SIZE_THRESHOLD- See Also:
-
-
Constructor Details
-
SnpEffectPredictor
-
-
Method Details
-
load
Load predictor from a binary file -
add
Add a gene interval -
add
Add a markerNote: Markers have to be added BEFORE building the interval trees. Interval trees are built the first time you call snpEffect(snp) method.
-
addAll
Add a set of markers -
buildForest
public void buildForest()Create interval trees (forest) -
countTranscripts
public int countTranscripts()Count number of transcripts -
createGenomicRegions
Create (and add) up-down stream, splice sites, intergenic, etc -
filterTags
Filter transcripts by tags -
filterTranscriptSupportLevel
Filter transcripts by TSL -
getGene
Obtain a gene by geneId -
getGenome
-
getIntervalForest
-
getMarkers
-
getSpliceRegionExonSize
public int getSpliceRegionExonSize() -
setSpliceRegionExonSize
public void setSpliceRegionExonSize(int spliceRegionExonSize) -
getSpliceRegionIntronMax
public int getSpliceRegionIntronMax() -
setSpliceRegionIntronMax
public void setSpliceRegionIntronMax(int spliceRegionIntronMax) -
getSpliceRegionIntronMin
public int getSpliceRegionIntronMin() -
setSpliceRegionIntronMin
public void setSpliceRegionIntronMin(int spliceRegionIntronMin) -
getTranscript
-
getUpDownStreamLength
public int getUpDownStreamLength() -
setUpDownStreamLength
public void setUpDownStreamLength(int upDownStreamLength) -
keepTranscriptsProteinCoding
public int keepTranscriptsProteinCoding()Remove all transcripts that are NOT in the list- Returns:
- : Number of transcripts removed
-
print
public void print()Dump to sdtout -
query
Return a collection of intervals that intersect 'marker' -
queryClosestGene
Find closest gene to this markerIn case more than one 'closest' gene is found (e.g. two or more genes at the same distance). The following rules apply:
i) If many genes have the same 'closest distance', coding genes are preferred.
ii) If more than one coding gene has the same 'closet distance', a random gene is returned.
-
queryDeep
Return a collection of intervals that intersect 'marker' Query resulting genes, transcripts and exons to get ALL types of intervals possible -
regions
Name of the regions hit by a marker- Returns:
- A set of region names
-
regions
public Set<String> regions(Marker marker, boolean showGeneDetails, boolean compareTemplate, String id) Name of the regions hit by a marker- Parameters:
id
- : Only use genes or transcripts matching this ID (null for any)
-
removeNonCanonical
Remove all non-canonical transcripts If a file is provided, read "Gene => canonical_transcript" mapping from file -
removeUnverified
public boolean removeUnverified()Remove all unverified transcripts- Returns:
- true if ALL genes had ALL transcripts removed (i.e. something went wrong, like in cases where no transcript was checked during the building process)
-
retainAllTranscripts
Remove all transcripts that are NOT in the list- Returns:
- : Number of transcripts removed
-
save
Save predictor to a binary file (specified by the configuration) -
save
Save predictor to a binary file -
setDebug
public void setDebug(boolean debug) -
setSpliceSiteSize
public void setSpliceSiteSize(int spliceSiteSize) -
setUseChromosomes
public void setUseChromosomes(boolean useChromosomes) -
size
public int size() -
toString
-
variantEffect
Predict the effect of a variant -
variantEffect
Calculate variant effect for each marker in 'intersect'
-