From 128c1c559ce7749ba5a39d30e6108f5ce8f4b99e Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 27 May 2005 09:31:14 +0000 Subject: [PATCH] Response to bug mantis?id=8187 - some quick hacks to read and write david's MSF file with '~' as a gap character. --- src/jalview/io/FormatAdapter.java | 5 +++++ src/jalview/io/IdentifyFile.java | 6 ++++++ src/jalview/io/MSFfile.java | 13 ++++++++----- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/jalview/io/FormatAdapter.java b/src/jalview/io/FormatAdapter.java index dba0c61..3e5e250 100755 --- a/src/jalview/io/FormatAdapter.java +++ b/src/jalview/io/FormatAdapter.java @@ -9,6 +9,7 @@ public class FormatAdapter static{ formats.addElement("FASTA"); formats.addElement("MSF"); + formats.addElement("PileUp"); formats.addElement("CLUSTAL"); formats.addElement("BLC"); formats.addElement("PIR"); @@ -25,6 +26,8 @@ public class FormatAdapter afile = new FastaFile(inFile, type); else if (format.equals("MSF")) afile = new MSFfile(inFile, type); + else if (format.equals("PileUp")) + afile = new PileUpfile(inFile, type); else if (format.equals("CLUSTAL")) afile = new ClustalFile(inFile, type); else if (format.equals("BLC")) @@ -59,6 +62,8 @@ public class FormatAdapter afile = new FastaFile(); else if (format.equals("MSF")) afile = new MSFfile(); + else if (format.equals("PileUp")) + afile = new PileUpfile(); else if (format.equals("CLUSTAL")) afile = new ClustalFile(); else if (format.equals("BLC")) diff --git a/src/jalview/io/IdentifyFile.java b/src/jalview/io/IdentifyFile.java index 55d771b..eebde9b 100755 --- a/src/jalview/io/IdentifyFile.java +++ b/src/jalview/io/IdentifyFile.java @@ -43,6 +43,12 @@ public class IdentifyFile if(data.indexOf("PILEUP")>-1) { + reply = "PileUp"; + break; + } + if((data.indexOf("!!")>-1) + && (data.indexOf("!!")