Package fork.lib.bio.seq

Examples of fork.lib.bio.seq.FastaReader


   
    while( (en=zz.nextEntry())!=null ){
        String nm= en.tit;
        PWM mot= en.pwm;
       
        FastaReader fr= new FastaReader(new File(dir+"/anno/genomes/sacCer1/sacCer1.fa"));
        MotifToLandscape ml= new MotifToLandscape(fr, mot);
       
        System.out.println(nm+"  ");
        File of= new File(od+"/"+nm+".wig");
        ml.writeToFile(of, nm);
        fr.close();
       
           
        /*
        String s= "AGATTATTTAATAATGGGAC";
        double a= mot.align(s);
View Full Code Here


   
    int size= 1;
   
   
    FrequencyCount<String> fcg= new FrequencyCount();
    FastaReader frg= new FastaReader(genomef);
    FastaEntry eng;
    while( (eng=frg.nextEntry())!=null ){
        String s= eng.getSequence();
        for( int i=0; i<s.length()-size; i++ ){
            String ss= s.substring(i, i+size);
            fcg.add(ss);
        }
    }
    Object[] ks= fcg.getSortedKeys();
   
   
    File[] fs= d.listFiles();
    for( int j=0; j<fs.length; j++ ){
        File f= fs[j];
        if(FileName.getExt(f).equals("fasta")){
            FastaReader fr= new FastaReader(f);
            FastaEntry en;
            FrequencyCount<String> fc= new FrequencyCount<>();


            while( (en=fr.nextEntry())!=null ){
                String s= en.getSequence();
                for( int i=0; i<s.length()-size; i++ ){
                    String ss= s.substring(i, i+size);
                    fc.add(ss);
                }
View Full Code Here

                    tab.appendEmptyColumn(col);
                }
                tab.setValueAt(v, row, col);
            }
        }
        FastaReader fr= new FastaReader(new File(dir+"/anno/genomes/sacCer1/sacCer1.fa"));
        PWM mot= new PWM(tab);
        MotifToLandscape ml= new MotifToLandscape(fr, mot);

        System.out.println(nm+"  ");
       
        File of= new File(od+"/"+nm+".wig");
        ml.writeToFile(of, nm);
        fr.close();
       
        //System.exit(1);
    }
   
   
View Full Code Here

   
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();
View Full Code Here

TOP

Related Classes of fork.lib.bio.seq.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.