/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package data.cerevisiae.region;
import fork.lib.base.file.management.Dirs;
import fork.lib.bio.anno.genomic.BedAttribute;
import fork.lib.bio.anno.genomic.BedReader;
import fork.lib.bio.anno.genomic.region.DirectionalGenomicRegion;
import fork.lib.bio.anno.genomic.region.GenomicRegion;
import fork.lib.bio.seq.FastaEntry;
import fork.lib.bio.seq.FastaReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.util.Iterator;
import data.cerevisiae.region.wt4krlen.GenerateLen;
/**
*
* @author forksapien
*/
public class GenerateChr {
public static void main(String[] args) throws Exception {
File dir= Dirs.getFile("dir");
File gen= new File(dir+"/anno/genomes/sacCer1/sacCer1.fa");
FastaReader fr= new FastaReader(gen);
BufferedWriter bw= new BufferedWriter(new FileWriter(new File(dir+"/anno/sacCer1_chr.bed")));
FastaEntry en;
while( (en=fr.nextEntry())!=null ){
String chr= en.getTitle();
int l= en.getSequence().length();
bw.write(chr+"\t0\t"+l+"\t"+chr+"\t0\t+\n");
}
bw.close();
}
}