Class TwoBitFacade
- java.lang.Object
-
- org.biojava.nbio.genome.parsers.twobit.TwoBitFacade
-
public class TwoBitFacade extends Object
A facade that makes it easier to work with a 2bit file. Created by yana on 3/27/17.
-
-
Constructor Summary
Constructors Constructor Description TwoBitFacade(File file)
Reads a genome from a locally stored .2bit file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes .2bit file twoBitParser.String
getSequence(String chromosomeName, int start, int end)
Extract a sequence from a chromosome, using chromosomal coordinatesvoid
setChromosome(String chr)
Sets a chromosome for TwoBitParser.
-
-
-
Constructor Detail
-
TwoBitFacade
public TwoBitFacade(File file) throws Exception
Reads a genome from a locally stored .2bit file.- Parameters:
file
- the File to a .2bit file.- Throws:
Exception
-
-
Method Detail
-
setChromosome
public void setChromosome(String chr) throws Exception
Sets a chromosome for TwoBitParser.- Parameters:
chr
- The chromosome name (e.g. chr21)- Throws:
Exception
-
getSequence
public String getSequence(String chromosomeName, int start, int end) throws Exception
Extract a sequence from a chromosome, using chromosomal coordinates- Parameters:
chromosomeName
-start
-end
-- Returns:
- the DNASequence from the requested coordinates.
- Throws:
Exception
-
-