X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FFastaFile.java;h=c698a31b81963fe24ec8c3044ceaf6a10eb0fb15;hb=5fe8a7444f60733f195cd812e75d7e873e688880;hp=9c8cdf66cbee9608700d774d0d0299cce221bf9a;hpb=4a5137b64f7ec23db2a09290bfcd392984a52150;p=jalview.git diff --git a/src/jalview/io/FastaFile.java b/src/jalview/io/FastaFile.java index 9c8cdf6..c698a31 100755 --- a/src/jalview/io/FastaFile.java +++ b/src/jalview/io/FastaFile.java @@ -20,14 +20,14 @@ */ package jalview.io; +import java.io.IOException; + import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.Annotation; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceI; -import java.io.IOException; - /** * DOCUMENT ME! * @@ -69,7 +69,12 @@ public class FastaFile extends AlignFile public FastaFile(FileParse source) throws IOException { - super(source); + this(source, true); + } + + public FastaFile(FileParse source, boolean closeData) throws IOException + { + super(true, source, closeData); } public FastaFile(SequenceI[] seqs) @@ -164,8 +169,8 @@ public class FastaFile extends AlignFile anots[i] = new Annotation("" + cn, null, ' ', Float.NaN); } } - AlignmentAnnotation aa = new AlignmentAnnotation(seq.getName() - .substring(2), seq.getDescription(), anots); + AlignmentAnnotation aa = new AlignmentAnnotation( + seq.getName().substring(2), seq.getDescription(), anots); return aa; } @@ -180,8 +185,7 @@ public class FastaFile extends AlignFile addProperties(al); for (int i = 0; i < annotations.size(); i++) { - AlignmentAnnotation aa = annotations - .elementAt(i); + AlignmentAnnotation aa = annotations.elementAt(i); aa.setPadGaps(true, al.getGapCharacter()); al.addAnnotation(aa); }