X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2Fgff%2FGffHelperBase.java;h=48c33e5deff795985bf817080dd4a06d80c30140;hb=604cbee405a837565ba1a74aa9bddd62aed685ab;hp=d4a53586568124428bd0fd152542a381389b5ac0;hpb=ecc50d775a514f9840cdcc10a9d5b1e49c60582c;p=jalview.git diff --git a/src/jalview/io/gff/GffHelperBase.java b/src/jalview/io/gff/GffHelperBase.java index d4a5358..48c33e5 100644 --- a/src/jalview/io/gff/GffHelperBase.java +++ b/src/jalview/io/gff/GffHelperBase.java @@ -1,3 +1,23 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.io.gff; import jalview.analysis.SequenceIdMatcher; @@ -321,13 +341,18 @@ public abstract class GffHelperBase implements GffHelperI { int start = Integer.parseInt(gff[START_COL]); int end = Integer.parseInt(gff[END_COL]); - float score = Float.NaN; + + /* + * default 'score' is 0 rather than Float.NaN as the latter currently + * disables the 'graduated colour => colour by label' option + */ + float score = 0f; try { score = Float.parseFloat(gff[SCORE_COL]); } catch (NumberFormatException nfe) { - // e.g. '.' - leave as NaN to indicate no score + // e.g. '.' - leave as zero } SequenceFeature sf = new SequenceFeature(gff[TYPE_COL], @@ -335,6 +360,8 @@ public abstract class GffHelperBase implements GffHelperI sf.setStrand(gff[STRAND_COL]); + sf.setPhase(gff[PHASE_COL]); + if (attributes != null) { /* @@ -385,7 +412,8 @@ public abstract class GffHelperBase implements GffHelperI * @param toSeq * @return */ - protected AlignedCodonFrame getMapping(AlignmentI align, SequenceI fromSeq, SequenceI toSeq) + protected AlignedCodonFrame getMapping(AlignmentI align, + SequenceI fromSeq, SequenceI toSeq) { AlignedCodonFrame acf = align.getMapping(fromSeq, toSeq); if (acf == null)