git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replaced image
[jalview.git]
/
src
/
jalview
/
io
/
FastaFile.java
diff --git
a/src/jalview/io/FastaFile.java
b/src/jalview/io/FastaFile.java
index
37c96f6
..
bfcfaca
100755
(executable)
--- a/
src/jalview/io/FastaFile.java
+++ b/
src/jalview/io/FastaFile.java
@@
-41,16
+41,6
@@
public class FastaFile extends AlignFile
/**
\r
* Creates a new FastaFile object.
\r
*
\r
/**
\r
* Creates a new FastaFile object.
\r
*
\r
- * @param inStr DOCUMENT ME!
\r
- */
\r
- public FastaFile(String inStr)
\r
- {
\r
- super(inStr);
\r
- }
\r
-
\r
- /**
\r
- * Creates a new FastaFile object.
\r
- *
\r
* @param inFile DOCUMENT ME!
\r
* @param type DOCUMENT ME!
\r
*
\r
* @param inFile DOCUMENT ME!
\r
* @param type DOCUMENT ME!
\r
*
\r
@@
-76,12
+66,20
@@
public class FastaFile extends AlignFile
\r
while ((line = nextLine()) != null)
\r
{
\r
\r
while ((line = nextLine()) != null)
\r
{
\r
+ line = line.trim();
\r
if (line.length() > 0)
\r
{
\r
if (line.charAt(0)=='>')
\r
{
\r
if (count != 0)
\r
{
\r
if (line.length() > 0)
\r
{
\r
if (line.charAt(0)=='>')
\r
{
\r
if (count != 0)
\r
{
\r
+ if (!isValidProteinSequence(sb.toString()))
\r
+ {
\r
+ throw new IOException(AppletFormatAdapter.INVALID_CHARACTERS
\r
+ +" : "+seq.getName()
\r
+ +" : "+invalidCharacter);
\r
+ }
\r
+
\r
seq.setSequence(sb.toString());
\r
seqs.addElement(seq);
\r
}
\r
seq.setSequence(sb.toString());
\r
seqs.addElement(seq);
\r
}
\r
@@
-100,9
+98,11
@@
public class FastaFile extends AlignFile
\r
if (count > 0)
\r
{
\r
\r
if (count > 0)
\r
{
\r
- if (!isValidProteinSequence(sb.toString().toUpperCase()))
\r
+ if (!isValidProteinSequence(sb.toString()))
\r
{
\r
{
\r
- throw new IOException("Invalid protein sequence");
\r
+ throw new IOException(AppletFormatAdapter.INVALID_CHARACTERS
\r
+ +" : "+seq.getName()
\r
+ +" : "+invalidCharacter);
\r
}
\r
\r
seq.setSequence(sb.toString());
\r
}
\r
\r
seq.setSequence(sb.toString());
\r