delt0r / msms

A coalsecent simulator with selection
www.mabs.at/ewing/msms
17 stars 7 forks source link

How build msms from sources? #55

Open popgenomics opened 1 year ago

popgenomics commented 1 year ago

Hello, I need to increase the precision of floating values corresponding to the positions of the simulated SNPs. For that purpose, I see which line I can modify, it doesn't seem to be a big modification. But, I don't know how to build a new .jar from the sources downloaded here https://www.mabs.at/publications/software-msms/downloads/. Does anyone know how to do that please using Ubuntu? All the best C.

popgenomics commented 1 year ago

I think I got it: Just had to change few parts of the build.xml file as follows:

<project name="msms" default="dist" basedir="/home/croux/Programmes/msms/git/msms">
    <description>

    </description>
    <!-- set global properties for this build -->
    <property name="src" location="src" />
    <property name="build" location="bin" />
    <property name="dist" location="msms" />
    <property name="version.num" value="3.2rc" />
    <buildnumber file="ant/build.num" />

Then, compiling all pdf in the ../tex/ directory.

Then, just running ant as follows: ant -buildfile build.xml

popgenomics commented 1 year ago

And general comment: to adapt the precision of the floating values, it's in at/mabs/util/Util.java as follows:

public class Util {
    public static DecimalFormat defaultFormat;
    public static final DecimalFormatSymbols dfs;
    static {
        dfs =DecimalFormatSymbols.getInstance();
        dfs.setDecimalSeparator('.');
        defaultFormat =new DecimalFormat("0.00000000", dfs);
        // defaultFormat.getDecimalFormatSymbols().setDecimalSeparator(',');
        // System.out.println(defaultFormat.getDecimalFormatSymbols().getDecimalSeparator());
    }