Skip to content

Commit

Permalink
v0
Browse files Browse the repository at this point in the history
  • Loading branch information
augustearth committed May 5, 2020
1 parent 11668d8 commit be3c2ec
Show file tree
Hide file tree
Showing 64 changed files with 14,597 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# build directory
build/
.DS_Store
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,40 @@
# stem-sim
# STEM-SIM
Multi-scale simulation of neoplasm formation.


## Requirements

### Ant
Ant is an open source software building tool available at ant.apache.org.

### Java 1.5
StemSim is pure Java and requires Java 1.5 or later. Java is available at
java.sun.com.



## Building StemSim
To build StemSim, cd into the StemSim directory and type: ant.



## Running a StemSim Simulation
1. Modify the run.properties file as needed
- the default run.properties is set up to run a default simulation
- review each parameter and change as needed

2. To run the simulation:
- cd StemSim
- ./bin/sim run.properties

StemSim will create a directory named after the time the simulation was kicked
off. All files created by the simulation will be found in this directory.



## Computing Statistics
StemSim cancer statistics are computed after the runs have completed from the XML simulation files. To generate the statistics:

`./bin/stat <sim xml directory>`

The stat command will create files with names based on the XML directory.
21 changes: 21 additions & 0 deletions bin/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# echo $0 > $2
scriptdir=`dirname $0`
libdir=$scriptdir/../lib/
builddir=$scriptdir/../build/
cp=""
for f in `find $builddir -name "*.jar"`;
do
cp=${cp}$f:
done

for f in `find $libdir -name "*.jar"`;
do
cp=${cp}$f:
done

# echo cp=$cp

java -Xms256m -Xmx1536m -classpath $cp $*

6 changes: 6 additions & 0 deletions bin/sim
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# echo $0 > $2
scriptdir=`dirname $0`
$scriptdir/run stemsim.simulation.SimulationRunner $*

13 changes: 13 additions & 0 deletions bin/stat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# echo $0 > $2
scriptdir=`dirname $0`

#scriptdir/run stemsim.statxml.CancerStat $*
#$scriptdir/run stemsim.statxml.MutationStat $*
#$scriptdir/run stemsim.statxml.FitnessStat $*
#$scriptdir/run stemsim.statxml.DistanceStat $*

#$scriptdir/run stemsim.stat.CryptStat $*
#$scriptdir/run stemsim.stat.DivStat $*
$scriptdir/run stemsim.stat.TissuePopStat $*
23 changes: 23 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# INSTALLATOIN PROPERTIES
jarfile=stemsim

# for to scp files to remote host
# remote.webapp.dir
# remote.host
# remote.user

# BUILD MECHANICS PROPERTIES
# DO NOT EDIT
source=src
source.java=${source}/java
source.java-test=${source}/java-test
build=build
build.classes=${build}/classes
build.testresults=${build}/testresults
build.tmp=${build}/tmp
lib=lib
prop=prop
test=test
test.data=${test}/data
test.java=${test}/java

92 changes: 92 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<project name="stemsim" default="unittest" basedir=".">

<!-- mechanical and installation properties -->
<property file="build.properties"/>


<!-- Compile and install locally -->
<target name="install" depends="compile" description="install app">
<fail unless="install.dir">
please define the install.dir property in build.properties
</fail>

<copy file="${build}/${jarfile}.jar"
todir="${install.dir}"/>
</target>


<!-- Default target. Just compiles the code. No installation -->
<target name="compile" description="compile the source code">
<mkdir dir="${build.classes}"/>

<javac srcdir="${source}"
destdir="${build.classes}"
sourcepath="${source.java}"
deprecation="on"
debug="on">
<classpath>
<fileset dir="${lib}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</classpath>
</javac>

<javac srcdir="${test.java}"
destdir="${build.classes}"
deprecation="on"
debug="on">
<classpath>
<fileset dir="${lib}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</classpath>
</javac>

<jar destfile="${build}/${jarfile}.jar"
basedir="${build.classes}"/>
</target>

<!-- Run the unit tests -->
<target name="unittest" description="run JUnit unit tests"
depends="compile">
<mkdir dir="${build.testresults}"/>
<mkdir dir="${build.tmp}"/>
<junit printsummary="yes" haltonfailure="yes">
<sysproperty key="testdata.dir" value="${test.data}"/>
<sysproperty key="tmp.dir" value="${build.tmp}"/>
<sysproperty key="testresults.dir" value="${build.testresults}"/>
<classpath>
<pathelement path="${java.class.path}" />
<fileset dir="${build}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<fileset dir="${lib}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</classpath>
<formatter type="plain"/>
<test if="test.class" name="${test.class}" fork="no"
todir="${reports.tests}">
</test>
<batchtest unless="test.class"
fork="no"
todir="${build.testresults}">
<fileset dir="${test.java}">
<include name="**/*Test*.java"/>
<exclude name="**/*Tests.java"/>
<exclude name="**/*TestCase.java"/>
</fileset>
</batchtest>
</junit>
</target>

<!-- clean up a previous build for a fresh start -->
<target name="clean">
<delete dir="${build}"/>
</target>

</project>
Loading

0 comments on commit be3c2ec

Please sign in to comment.