SNAP addon vs SNAP.jar ?

232 views
Skip to first unread message

Hamish

unread,
Jul 29, 2015, 12:03:12 AM7/29/15
to beast-users
Hi

As part of trying to get BEASt to handle my large datasets, I am trying to play around using SNAP.jar instead of using BEAST.jar to run my alignments as I was recommended to do so by a researcher I am trying to emulate - who was able to use SNAP.jar on a cluster where it utilised the available computing resources in a way that I haven't been able to do so far.

Up until now I have been making my .xml files in beauti, using the SNAP template and then running them using BEAST. However, now when I try to load these same .xml files into Snap.jar they do not load and I get the following error (bold):

java.lang.NumberFormatException: For input string: "A"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:580)
    at java.lang.Integer.parseInt(Integer.java:615)
    at beast.evolution.datatype.DataType$Base.string2state(Unknown Source)
    at beast.evolution.alignment.Sequence.getSequence(Unknown Source)
    at snap.SNPSequence.getSequence(Unknown Source)
    at beast.evolution.alignment.Alignment.initAndValidate(Unknown Source)
    at snap.Data.initAndValidate(Unknown Source)
    at beast.util.XMLParser.initPlugins(Unknown Source)
    at beast.util.XMLParser.parse(Unknown Source)
    at beast.util.XMLParser.parseFile(Unknown Source)
    at beast.app.BeastMCMC.parseArgs(Unknown Source)
    at snap.app.mcmc.SNAPPMCMC.main(Unknown Source)

Error 110 parsing the xml input file

validate and intialize error: For input string: "A"

Error detected about here:
  <beast>
      <run id='mcmc' spec='MCMC'>
          <state id='state'>
              <stateNode id='Tree.Allign1_usingallign1_58taxa_25jul15' spec='beast.util.ClusterTree'>
                  <taxa id='snap.Allign1_usingallign1_58taxa_25jul15' spec='snap.Data'>


Does anybody have any idea how I can fix this?

I also received another error:

WARNING: there is a sequence with a state count larger than 2.
If this XML file was generated with BEAUti, this is most likely wrong.
To fix this, change totalCount in the XML to 2 for binary sequences, or 3 for diploid data.

For this error, I can easily fix it, by replacing the thread count from 4 to 2 or 3, but am not sure what effect this has or why I need to change it since I used SNAP plug in to generate these xml files.

Any advice on this is much appreciated.

Cheers,
Hamish

Remco Bouckaert

unread,
Jul 29, 2015, 3:54:22 AM7/29/15
to beast...@googlegroups.com
Hi Hamish,

SNAPP.jar is rather out of date now and I recommend you do not use it.

SNAPP works on SNPs, encoded as binary sequences (for haploid data): a zero for the SNP being present, and a 1 for the SNP being absent. For such sequences, there are two states, so the statecount should be 2.
If you have diploid data there are three values (0 = both present, 1 = one present one absent and 2 = both absent) so the statecount should be 3.
You can encode more than 2 lineages using a single sequence, which would give a higher state count, but that would be usual, hence the warning.

If you imported nucleotide data instead of binary or 3-valued sequence (as suggested by the first error message), the latest version of SNAPP attempts to call SNPs assuming each sequence is haploid.

Cheers,

Remco


--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
To post to this group, send email to beast...@googlegroups.com.
Visit this group at http://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages