biomsalign icon indicating copy to clipboard operation
biomsalign copied to clipboard

MSA result is different from Clustal Omega

Open nikolay-alemasov opened this issue 3 years ago • 3 comments

Input

>test1
AANTTYKNYRENLLT
>test2
VTPENYIRNLL
>test3
AANTTYKNFREND
>test4
ANTTYKNFHRND
>test5
ANTTYKNYHRNRL
>test6
HTYQNYHQNLL
>test7
VTYQNYHQNLL
>test8
HTPENYIRNLL
>test9
AANTTYKNYRENLD
>test10
AANTTYKNYRENLF

Observed output

>test1
AANTTYKNYRENLLT-
>test2
---VTPENYIRNL--L
>test3
AANTTYKNFREND---
>test4
-ANTTYKNFHRND---
>test5
-ANTTYKNYHRNRL--
>test6
---HTYQNYHQNL--L
>test7
---VTYQNYHQNL--L
>test8
---HTPENYIRNL--L
>test9
AANTTYKNYRENLD--
>test10
AANTTYKNYRENLF--

Expected output

>test1
AANTTYKNYRENLLT
>test2
---VTPENYIRNLL-
>test3
AANTTYKNFREND--
>test4
-ANTTYKNFHRND--
>test5
-ANTTYKNYHRNRL-
>test6
---HTYQNYHQNLL-
>test7
---VTYQNYHQNLL-
>test8
---HTPENYIRNLL-
>test9
AANTTYKNYRENLD-
>test10
AANTTYKNYRENLF

Description

Code executed for BioMSA:

const biomsa = require('biomsa');

const samples = [
  'AANTTYKNYRENLLT',
  'VTPENYIRNLL',
  'AANTTYKNFREND',
  'ANTTYKNFHRND',
  'ANTTYKNYHRNRL',
  'HTYQNYHQNLL',
  'VTYQNYHQNLL',
  'HTPENYIRNLL',
  'AANTTYKNYRENLD',
  'AANTTYKNYRENLF',
];

biomsa.align(samples).then((result: string) => {
  for (let i = 0; i < result.length; ++i) {
    console.log(`>test${i+1}\n${result[i]}`);
  }
  console.log('');
});

Code run for Clustal (https://github.com/DinikaSen/clustal-omega-wrapper):

const clustalOmega = require('clustal-omega-wrapper');
const customExecPath = 'utils';

clustalOmega.setCustomLocation(customExecPath);

const outputType = 'fasta';
let input = '';

for (let i = 0; i < samples.length; ++i) {
    input += `>test${i+1}\n${samples[i]}\n`;
}

clustalOmega.alignSeqString(input, outputType, function(err: any, data: any) {
    if (err) {
        console.log(err);
    } else {
        console.log(data);
    }
});

nikolay-alemasov avatar Jan 06 '22 04:01 nikolay-alemasov

Thanks for the detailed report. Even if my objective is not to reproduce Clustal Omega, these simple cases must be better handled. I've noticed such issues in other test cases but did not have examples of manageable size until now. So thanks for that, it definitely helps!

ppillot avatar Jan 08 '22 17:01 ppillot

Thanks for the detailed report. Even if my objective is not to reproduce Clustal Omega, these simple cases must be better handled. I've noticed such issues in other test cases but did not have examples of manageable size until now. So thanks for that, it definitely helps!

Thank you for your efforts!

nikolay-alemasov avatar Jan 10 '22 02:01 nikolay-alemasov

Some improvements with the latest v0.3.3 image There is still a blatant issue with the end of the last two sequences.

ppillot avatar Jan 07 '24 04:01 ppillot