Package org.bioinfo.formats.core.feature

Examples of org.bioinfo.formats.core.feature.Gff


            // we have gff file -> convert it to BED
            String bedFile  =   workDir + "/file.bed";
            PrintWriter outWriter = new PrintWriter( new FileWriter(bedFile) );

            GffReader gffReader = new GffReader(cfg.pathToRegions);
            Gff region;

            int numLines = 0;

            while((region = gffReader.read())!=null){
                StringBuilder buf = new StringBuilder();
                buf.append(region.getSequenceName()).append("\t");
                buf.append(region.getStart()).append("\t");
                buf.append(region.getEnd()).append("\t");
                buf.append(region.getFeature()).append("\t");
                buf.append(region.getScore()).append("\t");
                buf.append(region.getStrand()).append("\n");
                outWriter.print(buf.toString());
                numLines++;
            }

            outWriter.close();
View Full Code Here

TOP

Related Classes of org.bioinfo.formats.core.feature.Gff

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.