Package org.bioinfo.formats.core.sequence.io

Examples of org.bioinfo.formats.core.sequence.io.FastaReader



  private void loadReference() throws Exception{
    if(referenceAvailable){
      // prepare reader
      FastaReader reader = new FastaReader(referenceFile);

      // init buffer
      StringBuilder referenceBuffer = new StringBuilder();

      numberOfReferenceContigs = 0;
      Fasta contig;
      while((contig=reader.read())!=null){
        referenceBuffer.append(contig.getSeq().toUpperCase());
        numberOfReferenceContigs++;
      }

      reader.close();
      reference = referenceBuffer.toString().getBytes();
      referenceSize = reference.length;
      if(reference.length!=locator.getTotalSize()){
        throw new Exception("invalid reference file, number of nucleotides differs");
      }
View Full Code Here

TOP

Related Classes of org.bioinfo.formats.core.sequence.io.FastaReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.