Package fork.lib.bio.seq

Examples of fork.lib.bio.seq.SequenceExtractorEntry


    out.getParentFile().mkdirs();
    BufferedWriter bw= new BufferedWriter(new FileWriter(out));
    BedGraphExporter.writeTitle(bw, tit);
   
    FastaSequenceExtractor se= new FastaSequenceExtractor(gen, gbout);
    SequenceExtractorEntry en;
    while( (en= se.nextEntry())!=null ){
        GenomicRegion gr= en.getGenomicRegion();
        NucleotideSequence seq= NucleotideSequenceParser.parseSequence(en.getSequence());
        double at= seq.atContent();
        bw.write( gr.toBedFormat()+"\t"+ ((double)Math.round(at*100)/100)+"\n" );
    }
   
    bw.close();
View Full Code Here


   
   
protected void init() throws Exception{
    GenomicRegionsBuilder gb= new BedReader(f).getGenomicRegionsBuilder();
    FastaSequenceExtractor se= new FastaSequenceExtractor(sf, gb);
    SequenceExtractorEntry en;
    while((en=se.nextEntry())!=null){
        GenomicRegion reg= en.getGenomicRegion();
        String seq= en.getSequence();
        String id= reg.getID();
        idseq.put(id , seq);
        tab.appendEmptyRow(id);
    }
}
View Full Code Here

TOP

Related Classes of fork.lib.bio.seq.SequenceExtractorEntry

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.