| 1 | package driver; |
| 2 | |
| 3 | import java.io.File; |
| 4 | |
| 5 | import tax.TaxNode; |
| 6 | import tax.TaxTree; |
| 7 | |
| 8 | public class RenameRefseqFiles { |
| 9 | |
| 10 | public static void main(String[] args){ |
| 11 | TaxTree tree=TaxTree.loadTaxTree(TaxTree.defaultTreeFile(), System.err, false, false); |
| 12 | for(TaxNode tn : tree.nodes){ |
| 13 | if(tn!=null){ |
| 14 | String dir=tree.toDir(tn, args[0]); |
| 15 | String path=dir+tn.id+".fa.gz"; |
| 16 | File f=new File(path); |
| 17 | if(f.exists()){ |
| 18 | f.renameTo(new File(dir+"refseq_"+tn.id+".fa.gz")); |
| 19 | } |
| 20 | } |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | } |