Package org.snpeff.interval
Class Gene
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Interval>,Iterable<Transcript>,TxtSerializable
Interval for a gene, as well as transcripts
- Author:
- pcingola
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.snpeff.interval.Interval
chromosomeNameOri, end, id, parent, start, strandMinus -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPerGene(Marker marker) Add a gene dependent markerbooleanadjust()Adjust start, end and strand valuesvoidBuild gene dependent interval treeGet canonical transcript Canonical transcripts are defined as the longest CDS of amongst the protein coding transcripts.In a circular genome, a gene can have negative coordinates or crosses over chromosome end.Perform a shallow clonedoubleCalculate CpG bias: number of CpG / expected[CpG]voidFilter transcripts by TSLgeneType()booleanIs any of the transcripts protein coding?protected booleanShow an error if parent does not include child?intkeepTranscripts(Set<String> trIds) Remove all transcripts in trIdsintKeep only protein coding transcriptsmarkers()A list of all markers in this transcriptvoidremoveNonCanonical(String trId) Remove all non-canonical transcriptsbooleanRemove unverified or corrected transcriptsvoidserializeParse(MarkerSerializer markerSerializer) Parse a line from a serialized fileserializeSave(MarkerSerializer markerSerializer) Create a string to serialize to a filevoidsetBioType(BioType bioType) intSize of a genetic region for a given genetoString()toString(boolean showTr) booleanvariantEffect(Variant variant, VariantEffects variantEffects) Get some details about the effect on this geneprotected voidvariantEffectGene(Variant variant, VariantEffects variantEffects) Add gene-specific annotationsMethods inherited from class org.snpeff.interval.IntervalAndSubIntervals
add, addAll, addAll, apply, clone, containsId, get, invalidateSorted, iterator, numChilds, query, remove, reset, setStrandMinus, shiftCoordinates, sorted, sortedStrand, subIntervalsMethods inherited from class org.snpeff.interval.Marker
adjust, applyDel, applyDup, applyIns, applyMixed, codonTable, compareTo, compareToPos, distance, distanceBases, getParent, getType, idChain, idChain, idChain, includes, intersect, isAdjustIfParentDoesNotInclude, isDeferredAnalysis, minus, query, readTxt, shouldApply, union, variantEffectNonRefMethods inherited from class org.snpeff.interval.Interval
equals, findParent, getChromosome, getChromosomeName, getChromosomeNameOri, getChromosomeNum, getEnd, getGenome, getGenomeName, getId, getStart, getStrand, hashCode, intersects, intersects, intersects, intersects, intersectSize, isCircular, isSameChromo, isStrandMinus, isStrandPlus, isValid, setChromosomeNameOri, setEnd, setId, setParent, setStart, size, toStr, toStringAsciiArt, toStrPosMethods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
CIRCULAR_GENE_ID
- See Also:
-
-
Constructor Details
-
Gene
public Gene() -
Gene
-
-
Method Details
-
addPerGene
Add a gene dependent marker -
adjust
public boolean adjust()Adjust start, end and strand values- Returns:
- true if any adjustment was done
-
buildPerGene
public void buildPerGene()Build gene dependent interval tree -
canonical
Get canonical transcript Canonical transcripts are defined as the longest CDS of amongst the protein coding transcripts. If none of the transcripts is protein coding, then it is the longest cDNA. -
circularClone
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. -
cloneShallow
Description copied from class:MarkerPerform a shallow clone- Overrides:
cloneShallowin classIntervalAndSubIntervals<Transcript>
-
cpgExonBias
public double cpgExonBias()Calculate CpG bias: number of CpG / expected[CpG] -
filterTranscriptSupportLevel
Filter transcripts by TSL -
geneType
-
getBioType
-
getGeneName
-
isProteinCoding
public boolean isProteinCoding()Is any of the transcripts protein coding? -
isShowWarningIfParentDoesNotInclude
protected boolean isShowWarningIfParentDoesNotInclude()Description copied from class:MarkerShow an error if parent does not include child?- Overrides:
isShowWarningIfParentDoesNotIncludein classMarker
-
keepTranscripts
Remove all transcripts in trIds- Returns:
- : Number of transcripts removed
-
keepTranscriptsProteinCoding
public int keepTranscriptsProteinCoding()Keep only protein coding transcripts- Returns:
- : Number of transcripts removed
-
markers
Description copied from class:IntervalAndSubIntervalsA list of all markers in this transcript- Overrides:
markersin classIntervalAndSubIntervals<Transcript>
-
removeNonCanonical
Remove all non-canonical transcripts -
removeUnverified
public boolean removeUnverified()Remove unverified or corrected transcripts- Returns:
- : True if ALL transcripts have been removed
-
serializeParse
Parse a line from a serialized file- Specified by:
serializeParsein interfaceTxtSerializable- Overrides:
serializeParsein classIntervalAndSubIntervals<Transcript>
-
serializeSave
Create a string to serialize to a file- Specified by:
serializeSavein interfaceTxtSerializable- Overrides:
serializeSavein classIntervalAndSubIntervals<Transcript>
-
setBioType
-
sizeof
Size of a genetic region for a given gene -
toString
-
toString
-
variantEffect
Get some details about the effect on this gene- Overrides:
variantEffectin classMarker
-
variantEffectGene
Add gene-specific annotations
-