bug in reading AMSA files

Dear Jalview developers,

I found a bug in Jalview when saving and reloading AMSA files.
By default Jalview saves correctly the AMSA with white spaces between annotations within the rows.

But apparently the annotation rows are not read correctly when there are white spaces at the beginning or the end of a line.

See example:

psu>LmjF23.0270 | organism=Leishmania_major | product=pteridine reductase 1 | location=Lmjchr23:101916-102782(+) | length=288
-MTAPTVPVALVTGAAKRLGRSIAEGLHAEGYAVCLHYHRSAAEANALSATLNARRPNSAITVQADLSNVAT
APVSGADGSAPVTLFTRCAELVAACYTHWGRCDVLVNNASSFYPTPLLRNDEDGHEPCVGDREAMETATADL
FGSNAIAPYFLIKAFAHRVAGTPAKHRGTNYSIINMVDAMTNQPLLGYTIYTMAKGALEGLTRSAALELAPL
QIRVNGVGPGLSVLVDDMPPAVWEGHRSKVPLYQRDSSAAEVSDVVIFLCSSKAKYITGTCVKVDGGYSLTR
A
psu>LbrM23_V2.0300 | organism=Leishmania_braziliensis | product=pteridine reductase 1 | location=Lbr.chr23:89052-89918(+) | length=288
MTSVATVPVALVTAAAKRLGCGIAEILHAQGYAVCLHYHRSAEDANTLTATLNSRRPNSAIAVQADLSAVAT
ASVSSAHDAAPISLVQRCAGLVDACYNHWGRCDVLVNNASAYYPTPLLNKVEEGHEPSM-NEETEAAAAADL
FGTNALAPFFLIKAFAQRVADIPAEQRSDNYSIVNIIDAMTNQPLLGFTMYTMAKEALEGLTRSAALELAPL
QVRVNGVSPGLSLFPADMPSAVQADYRSKVPLYQRESTAEEVAAAVFFLCSSSAKYITGTCVKVDGGYSLTR
A
Lg5313b_orf00052_scaffold279_66548_65604
MMSVATVPVALVTAAAKRLGCGIAEILHAQGYAVCLHYHRSAEDANTLAATLNSRRPNSAIAVQADLSATAT
ASVSNAHGAAPISLVQRCAGLVDACYNHWGRCDVLVNNASAYYPTPLLNK-DEGHEPSM-NEETEAAAAADL
FGTNALAPFFLIKAFAQRVADIPAEQRSDNYSIVNMIDAMTNQPLLGFTMYTMAKEALEGLTRSAALELAPL
QVRVNGVSPGLSLFPADMPSAVQADYRSKVPLYQRESTAEEVAAAVFFLCSSSAKYITGTCVKVDGGYSLTR
A
#_adh short domain 8-213
s x x
x x xy
x e

#_Active sites


…B------------------A

The #_Active sites annotation is read correctly (dots were added manually).
The #_adh annotation is scrambled.

Thanks for correcting it.
Best greetings,
Laurent Falquet

···

Dr. Laurent Falquet
Swiss Institute of Bioinformatics
Vital-IT
Génopode, UNIL
CH-1015 Lausanne, Switzerland
Tel: +41 21 692 4078
Fax: +41 21 692 4065
Email: Laurent.Falquet@isb-sib.ch
http://www.isb-sib.ch
http://www.vital-it.ch

Hi Laurent - thanks - a bug has been lodged:
http://issues.jalview.org/browse/JAL-686

I suspect this behaviour has existed in Jalview's AMSA parser for some time.

As a workaround, try to avoid using annotation which consists mostly of spaces - the problem is that the leading set of spaces are stripped off the line before it is parsed.

Jim.

···

--
-------------------------------------------------------------------
J. B. Procter (JALVIEW/ENFIN) Barton Bioinformatics Research Group
Phone/Fax:+44(0)1382 388734/345764 http://www.compbio.dundee.ac.uk
The University of Dundee is a Scottish Registered Charity, No. SC015096.