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 Details

    • 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 Details

    • close

      public void close() throws Exception
      Closes .2bit file twoBitParser.
      Throws:
      Exception
    • 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