X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAlignFile.java;h=5760fbe385781550f72b6bace208a6f9da3f2ab5;hb=9fc1c4d049a16cccb933e80b5be07ec36e6bda7f;hp=e5c8e0419c148890c24d522d19f85465c5020dca;hpb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;p=jalview.git diff --git a/src/jalview/io/AlignFile.java b/src/jalview/io/AlignFile.java index e5c8e04..5760fbe 100755 --- a/src/jalview/io/AlignFile.java +++ b/src/jalview/io/AlignFile.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -47,7 +47,8 @@ public abstract class AlignFile extends FileParse int maxLength = 0; /** - * Sequences to be added to form a new alignment. + * Sequences to be added to form a new alignment. TODO: remove vector in this + * class */ protected Vector seqs; @@ -88,14 +89,14 @@ public abstract class AlignFile extends FileParse /** * Constructor which parses the data from a file of some specified type. * - * @param inFile - * Filename to read from. + * @param dataObject + * Filename, URL or Pasted String to read from. * @param type - * What type of file to read from (File, URL) + * What type of file to read from (File, URL, Pasted String) */ - public AlignFile(String inFile, String type) throws IOException + public AlignFile(String dataObject, String type) throws IOException { - this(true, inFile, type); + this(true, dataObject, type); } /** @@ -104,16 +105,16 @@ public abstract class AlignFile extends FileParse * * @param parseImmediately * if false, need to call 'doParse()' to begin parsing data - * @param inFile - * Filename to read from. + * @param dataObject + * Filename, URL or Pasted String to read from. * @param type * What type of file to read from (File, URL) * @throws IOException */ - public AlignFile(boolean parseImmediately, String inFile, String type) + public AlignFile(boolean parseImmediately, String dataObject, String type) throws IOException { - super(inFile, type); + super(dataObject, type); initData(); if (parseImmediately) { @@ -351,7 +352,15 @@ public abstract class AlignFile extends FileParse if (space > -1) { seq = new Sequence(id.substring(0, space), ""); - seq.setDescription(id.substring(space + 1)); + String desc = id.substring(space + 1); + seq.setDescription(desc); + + /* + * it is tempting to parse Ensembl style gene description e.g. + * chromosome:GRCh38:7:140696688:140721955:1 and set the + * start position of the sequence, but this causes much confusion + * for reverse strand feature locations + */ } else {