X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FEMBLLikeFlatFile.java;h=7671412b24591c9a7fb06bbfc5cbcd20257e72cb;hb=57738a1f3c19b1c3a00bd3ac5108f8cd0af32f99;hp=e8ce34b619ed7d926aab5e1cf1fc225160d36398;hpb=e7338a61f3ce96dadf44ac80b2b32cc5ba4b94c8;p=jalview.git diff --git a/src/jalview/io/EMBLLikeFlatFile.java b/src/jalview/io/EMBLLikeFlatFile.java index e8ce34b..7671412 100644 --- a/src/jalview/io/EMBLLikeFlatFile.java +++ b/src/jalview/io/EMBLLikeFlatFile.java @@ -160,8 +160,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile * when true, interpret the mol_type 'source' feature attribute * and generate an RNA sequence from the DNA record */ - protected boolean produceRna=true; - + protected boolean produceRna = true; /* * values parsed from the data file @@ -178,7 +177,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile protected List dbrefs; - protected boolean sequenceStringIsRNA=false; + protected boolean sequenceStringIsRNA = false; protected String sequenceString; @@ -201,13 +200,14 @@ public abstract class EMBLLikeFlatFile extends AlignFile * using TreeMap gives CDS sequences in alphabetical, so readable, order */ cds = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - + parse(); } /** - * process attributes for 'source' until the next FT feature entry - * only interested in 'mol_type' + * process attributes for 'source' until the next FT feature entry only + * interested in 'mol_type' + * * @param tokens * @return * @throws IOException @@ -236,7 +236,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile int p = line.indexOf("\\mol_type"); int qs = line.indexOf("\"", p); int qe = line.indexOf("\"", qs + 1); - String qualifier=line.substring(qs,qe).toLowerCase(Locale.ROOT); + String qualifier = line.substring(qs, qe).toLowerCase(Locale.ROOT); if (qualifier.indexOf("rna") > -1) { sequenceStringIsRNA = true; @@ -245,12 +245,11 @@ public abstract class EMBLLikeFlatFile extends AlignFile { sequenceStringIsRNA = false; } - line=parseFeatureQualifier(sb, false); + line = parseFeatureQualifier(sb, false); } return line; } - /** * Parses one (GenBank or EMBL format) CDS feature, saves the parsed data, and * returns the next line @@ -715,8 +714,8 @@ public abstract class EMBLLikeFlatFile extends AlignFile String[] tokens = line.split(WHITESPACE); if (tokens.length < 2) { - Console.error("Ignoring bad EMBL line for " + this.accession - + ": " + line); + Console.error("Ignoring bad EMBL line for " + this.accession + ": " + + line); break; } if (tokens[1].startsWith("/")) @@ -797,7 +796,8 @@ public abstract class EMBLLikeFlatFile extends AlignFile protected String parseFeature(String line) throws IOException { String[] tokens = line.trim().split(WHITESPACE); - if (tokens.length < 2 || (!"CDS".equals(tokens[0]) && (!"source".equals(tokens[0])))) + if (tokens.length < 2 + || (!"CDS".equals(tokens[0]) && (!"source".equals(tokens[0])))) { return nextLine(); }