sanger-pathogens / snp-sites

Finds SNP sites from a multi-FASTA alignment file
http://sanger-pathogens.github.io/snp-sites/
Other
238 stars 50 forks source link

snp-sites -c doesn't produce recognisable alignment for IQtree #97

Open martinastoycheva opened 4 years ago

martinastoycheva commented 4 years ago

Hello,

I am trying to generate a core genome tree for a bacterial plant pathogen local outbreak (Ralstonia solanacearum) using the output of IQtree with the output of snp-sites -c. I have tried generating an alignment with snippy-core with a reference strain and with de novo assembly alignment done with mafft but in both of these cases IQtree crashes by not recognising the input file as an alignment. I suspect that it has something to do with the output from snp-sites -c being just a multifasta and therefore unrecognisable to IQtree but my understanding was that this functionality of iqtree is specifically for snp-sites. I have now tried it with another data set and I get the same result.

I have attached the snp alignment from snippy fed to iqtree after snp-sites -c, also fconst output and iqtree error log files. The commands I used to generate the files are: $ snp-sites -C core.full.aln > fconst_output.txt $ snp-sites -c core.full.aln > snp-sites.aln $ iqtree -fconst fconst_output.txt -s snp-sites.txt

With output from snippy: fconst_output.txt iqtree_error.log snp-sites.txt

Let me know if more information is needed! Thank you!

roblanf commented 4 years ago

Hi! IQ-TREE dev (well, kinda, I sort of help a bit) here. This looks like an IQ-TREE issue not an issue with snp-sites.

Can I suggest you post this issue here: https://github.com/iqtree/iqtree2

While you do that - can I ask what value you supplied as [fconst_param]?

Your commandline looks like this (from your log file):

iqtree -fconst fconst_param -s core.full.snp-sites_filtered.aln

My guess from looking at the stack trace is that this is related to the issue you're getting. It's hard to know for sure if this is the issue (mostly because I'm too ignorant), but -fconst expects a list of integers like this:

-fconst 10,20,15,40

from the docs: "IQ-TREE will then add a number of constant sites accordingly. For example, -fconst 10,20,15,40 will add 10 constant sites of all A, 20 constant sites of all C, 15 constant sites of all G and 40 constant sites of all T into the alignment."

Rob