Package org.snpeff.interval
Class Genome
java.lang.Object
org.snpeff.interval.Interval
org.snpeff.interval.Marker
org.snpeff.interval.Genome
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Interval>
,Iterable<Chromosome>
,TxtSerializable
This is just used for the Interval class.
It is NOT a representation of an entire genome.
- Author:
- pcingola
- See Also:
-
Field Summary
Fields inherited from class org.snpeff.interval.Interval
chromosomeNameOri, end, id, parent, start, strandMinus
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Chromosome chromo) Add a chromosomeGet a sorted list of chromosomesstatic Genome
createFromFaidx
(String genomeName, String faidxFile) Create a genome from a faidx file.String[]
getChromosome
(String chromoName) Find chromosome 'chromoName'int
Return chromosomes sorted by size (largest chromosomes first)getGenes()
Create a sorted list of genes (sorted by gene Id)Create a sorted list of genes (sorted by genomic position)getOrCreateChromosome
(String chromoName) Get or create a chromosomeboolean
hasChromosome
(String chromo) Is this chromosome in this genome?boolean
boolean
Do we have coding info from genes?boolean
Do most exons have sequence? This is an indicator that something went really bad building the database.iterator()
long
length()
Total genome length: add all chromosomesboolean
readGenomeSequence
(String fastaFile) Read the whole genome sequence into memoryvoid
remove
(Chromosome chromo) Remove a chromosome WARINIG: Doesn't check any dependencies!void
Save genome to filevoid
serializeParse
(MarkerSerializer markerSerializer) Parse a line from a serialized fileserializeSave
(MarkerSerializer markerSerializer) Create a string to serialize to a filetoString()
Show number of genes, transcripts & exonstoString
(StringBuilder errors) Show number of genes, transcripts & exons Arr all errors to bufferMethods inherited from class org.snpeff.interval.Marker
adjust, apply, applyDel, applyDup, applyIns, applyMixed, clone, cloneShallow, codonTable, compareTo, compareToPos, distance, distanceBases, getParent, getType, idChain, idChain, idChain, includes, intersect, isAdjustIfParentDoesNotInclude, isDeferredAnalysis, isShowWarningIfParentDoesNotInclude, minus, query, query, readTxt, shouldApply, union, variantEffect, variantEffectNonRef
Methods 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, setStrandMinus, shiftCoordinates, size, toStr, toStringAsciiArt, toStrPos
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Genome
public Genome() -
Genome
-
Genome
-
-
Method Details
-
createFromFaidx
Create a genome from a faidx file. See "samtools faidx" command (reference http://samtools.sourceforge.net/samtools.shtml)- Parameters:
genomeName
- : Genome's name (version)faidxFile
- : FAI file used to create all chromosomes- Returns:
-
add
Add a chromosome -
chromosomeNamesSorted
Get a sorted list of chromosomes -
getChromoFastaFiles
-
getChromosome
Find chromosome 'chromoName' -
getChromosomeCount
public int getChromosomeCount() -
getChromosomes
-
getChromosomesSortedSize
Return chromosomes sorted by size (largest chromosomes first) -
getCytoBands
-
getGenes
-
getGenesSorted
Create a sorted list of genes (sorted by gene Id) -
getGenesSortedPos
Create a sorted list of genes (sorted by genomic position) -
getGenomeId
-
getGenomicSequences
-
getOrCreateChromosome
Get or create a chromosome -
getSpecies
-
getVersion
-
hasChromosome
Is this chromosome in this genome? -
hasCodingInfo
public boolean hasCodingInfo() -
hasTranscriptSupportLevelInfo
public boolean hasTranscriptSupportLevelInfo()Do we have coding info from genes? -
isMostExonsHaveSequence
public boolean isMostExonsHaveSequence()Do most exons have sequence? This is an indicator that something went really bad building the database.- Returns:
- Check if most exons have sequence assigned.
-
iterator
- Specified by:
iterator
in interfaceIterable<Chromosome>
-
length
public long length()Total genome length: add all chromosomes -
readGenomeSequence
Read the whole genome sequence into memory- Parameters:
fastaFile
- : Path to a Fasta file- Returns:
- true if it was successful
-
remove
Remove a chromosome WARINIG: Doesn't check any dependencies! -
save
Save genome to file -
serializeParse
Parse a line from a serialized file- Specified by:
serializeParse
in interfaceTxtSerializable
- Overrides:
serializeParse
in classMarker
-
serializeSave
Create a string to serialize to a file- Specified by:
serializeSave
in interfaceTxtSerializable
- Overrides:
serializeSave
in classMarker
-
toString
Show number of genes, transcripts & exons -
toString
Show number of genes, transcripts & exons Arr all errors to buffer
-