-
- All Implemented Interfaces:
-
net.maizegenetics.dna.map.GenomeSequence
public class GVCFSequence implements GenomeSequence
GVCFSequence.java
Simple class to read in a GVCF then get the FASTA encoded sequence taking into account the variants in the GVCF file Uses a RangeMapto hold the GVCF variant calls for a given position range. Will coalesce any overlapping regions by concatenating the calls together in order of gvcf.
Created by zrm22 on 7/17/17.
-
-
Constructor Summary
Constructors Constructor Description GVCFSequence()
-
Method Summary
Modifier and Type Method Description static GenomeSequence
instance(String refFileName, String gvcfFileName)
Returns an initialized GVCFSequence given the input Reference and GVCF Files. static GenomeSequence
instance(GenomeSequence referenceSequence, String gvcfFileName)
Returns an initialized GVCFSequence given the input Reference and GVCF Files. static GenomeSequence
instance(GenomeSequence referenceSequence, String gvcfFileName, boolean missingAsRef)
Instance method to add in missing as Ref from a file static GenomeSequence
instance(GenomeSequence referenceSequence, List<VariantContext> variantContexts, boolean missingAsRef, String taxonName)
Instance method to create a GenomeSequenc from a List of VariantContexts static GenomeSequence
instance(GenomeSequence referenceSequence, List<HaplotypeNode.VariantInfo> variantContexts, boolean missingAsRef)
static Map<String, GenomeSequence>
allTaxonInstance(GenomeSequence referenceSequence, String vcfFileName, boolean missingAsRef)
Method to get a map of taxon to its genome sequence for all the taxon in the vcf file Set<Chromosome>
chromosomes()
Array<byte>
chromosomeSequence(Chromosome chrom)
Array<byte>
chromosomeSequence(Chromosome chrom, int startSite, int endSite)
Array<byte>
genomeSequence(long startSite, long lastSite)
String
genomeSequenceAsString(long startSite, long lastSite)
Map<Long, Tuple<Chromosome, Integer>>
fullRefCoordinateToChromCoordinate(ArrayList<Long> coordinates)
int
chromosomeSize(Chromosome chromosome)
long
genomeSize()
int
numberOfChromosomes()
byte
genotype(Chromosome chrom, int position)
byte
genotype(Chromosome chrom, Position positionObject)
String
genotypeAsString(Chromosome chrom, int position)
String
genotypeAsString(Chromosome chrom, Position positionObject)
String
genotypeAsString(Chromosome chrom, int startSite, int endSite)
-
-
Method Detail
-
instance
static GenomeSequence instance(String refFileName, String gvcfFileName)
Returns an initialized GVCFSequence given the input Reference and GVCF Files.
- Parameters:
refFileName
- File name of the Reference file used in creating the GVCF.gvcfFileName
- File name of the GVCF file which defines the variants of the taxon to the reference
-
instance
static GenomeSequence instance(GenomeSequence referenceSequence, String gvcfFileName)
Returns an initialized GVCFSequence given the input Reference and GVCF Files. This should be used if you are running multiple GVCFs through using the same Reference File. Currently will speed up processing each GVCF by about a minute.
- Parameters:
referenceSequence
- GenomeSequence object already read into memory.gvcfFileName
- File name of the GVCF file which defines the variants of the taxon to the reference
-
instance
static GenomeSequence instance(GenomeSequence referenceSequence, String gvcfFileName, boolean missingAsRef)
Instance method to add in missing as Ref from a file
-
instance
static GenomeSequence instance(GenomeSequence referenceSequence, List<VariantContext> variantContexts, boolean missingAsRef, String taxonName)
Instance method to create a GenomeSequenc from a List of VariantContexts
-
instance
static GenomeSequence instance(GenomeSequence referenceSequence, List<HaplotypeNode.VariantInfo> variantContexts, boolean missingAsRef)
-
allTaxonInstance
static Map<String, GenomeSequence> allTaxonInstance(GenomeSequence referenceSequence, String vcfFileName, boolean missingAsRef)
Method to get a map of taxon to its genome sequence for all the taxon in the vcf file
-
chromosomes
Set<Chromosome> chromosomes()
-
chromosomeSequence
Array<byte> chromosomeSequence(Chromosome chrom)
-
chromosomeSequence
Array<byte> chromosomeSequence(Chromosome chrom, int startSite, int endSite)
-
genomeSequence
Array<byte> genomeSequence(long startSite, long lastSite)
-
genomeSequenceAsString
String genomeSequenceAsString(long startSite, long lastSite)
-
fullRefCoordinateToChromCoordinate
Map<Long, Tuple<Chromosome, Integer>> fullRefCoordinateToChromCoordinate(ArrayList<Long> coordinates)
-
chromosomeSize
int chromosomeSize(Chromosome chromosome)
-
genomeSize
long genomeSize()
-
numberOfChromosomes
int numberOfChromosomes()
-
genotype
byte genotype(Chromosome chrom, int position)
-
genotype
byte genotype(Chromosome chrom, Position positionObject)
-
genotypeAsString
String genotypeAsString(Chromosome chrom, int position)
-
genotypeAsString
String genotypeAsString(Chromosome chrom, Position positionObject)
-
genotypeAsString
String genotypeAsString(Chromosome chrom, int startSite, int endSite)
-
-
-
-