X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=srcjar%2Ffr%2Forsay%2Flri%2Fvarna%2Futils%2FTranslateFormatRNaseP.java;fp=srcjar%2Ffr%2Forsay%2Flri%2Fvarna%2Futils%2FTranslateFormatRNaseP.java;h=0000000000000000000000000000000000000000;hb=4f77328104498504339216829abf5ea87e2791ec;hp=7c999e5b6d5de4d2fccf836b8504cd80ed2f8f5d;hpb=2b8c0785318a3528e1876e8e2dd48b7d831eae69;p=jalview.git diff --git a/srcjar/fr/orsay/lri/varna/utils/TranslateFormatRNaseP.java b/srcjar/fr/orsay/lri/varna/utils/TranslateFormatRNaseP.java deleted file mode 100644 index 7c999e5..0000000 --- a/srcjar/fr/orsay/lri/varna/utils/TranslateFormatRNaseP.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * File written by Raphael Champeimont - * UMR 7238 Genomique des Microorganismes - */ -package fr.orsay.lri.varna.utils; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -public class TranslateFormatRNaseP { - public static void main(String[] args) throws Exception { - File templatesDir = new File(new File(System.getProperty("user.dir")), "templates"); - File infile = new File(new File(templatesDir, "RNaseP_bact_a"), "a_bacterial_rnas.gb"); - File outfile = new File(new File(templatesDir, "RNaseP_bact_a"), "alignment.fasta"); - - BufferedReader inbuf = new BufferedReader(new FileReader(infile)); - String line = inbuf.readLine(); - String seqname; - List seqnames = new ArrayList(); - List sequences = new ArrayList(); - while (line != null) { - if (line.length() != 0) { - if (line.startsWith("LOCUS")) { - String parts[] = line.split("\\s+"); - seqname = parts[1]; - seqnames.add(seqname); - sequences.add(""); - } - if (line.startsWith(" ")) { - String parts[] = line.split("\\s+"); - for (int i=2; i" + seqnames.get(i) + "\n"); - outbuf.write(sequences.get(i) + "\n"); - } - outbuf.close(); - } -}