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 TypeMethodDescriptionvoidadd(Chromosome chromo) Add a chromosomeGet a sorted list of chromosomesstatic GenomecreateFromFaidx(String genomeName, String faidxFile) Create a genome from a faidx file.String[]getChromosome(String chromoName) Find chromosome 'chromoName'intReturn 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 chromosomebooleanhasChromosome(String chromo) Is this chromosome in this genome?booleanbooleanDo we have coding info from genes?booleanDo most exons have sequence? This is an indicator that something went really bad building the database.iterator()longlength()Total genome length: add all chromosomesbooleanreadGenomeSequence(String fastaFile) Read the whole genome sequence into memoryvoidremove(Chromosome chromo) Remove a chromosome WARINIG: Doesn't check any dependencies!voidSave genome to filevoidserializeParse(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, 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, setStrandMinus, shiftCoordinates, 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
-
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:
iteratorin 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:
serializeParsein interfaceTxtSerializable- Overrides:
serializeParsein classMarker
-
serializeSave
Create a string to serialize to a file- Specified by:
serializeSavein interfaceTxtSerializable- Overrides:
serializeSavein classMarker
-
toString
Show number of genes, transcripts & exons -
toString
Show number of genes, transcripts & exons Arr all errors to buffer
-