-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recent changes and conda updates (#70)
* Change simulation to be more intuitive and always have the desired range of simulation * Remove pdb statements * Incredibly hacky version of masking * Some simulation changes * Some partial changes wrt output class * Simple record instance to store trees before converting to tables * First stab at functional tables, not much in terms of inferring them from the data * Recursion to find paths * Find MRC node * Working tree updates, need to do some QC * Remove internal nodes * Test case working except for one edge * Same MRC recomb and reciever causing havoc in node creation * Producing sensible trees up to time * move * Simple addition to get migration segments * Bump version to 1.0.2 and have working migration segment inference. * Still working * Conda changes for 1.0.2, and generalisation of simulation protocol. * Get rid of pedantic warnings * Fix RPATH during native cmake and amend local conda-build instructions with env file * update changelog * move things around a little * Edit simulations and reporting of scrm approximation * Flexible conda building, version bump, and small edits. * Edit readme * Edit installation
- Loading branch information
Showing
25 changed files
with
860 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Changelog | ||
|
||
This file contains notable updates to `smcsmc` partitioned by version. | ||
|
||
## [Unreleased] | ||
|
||
- Fixed a bug where the `scrm` approximation window was not being properly set. | ||
|
||
## [1.0.2] - 16/10/19 | ||
### Added | ||
- Scripts to convert from the ARGs output by `smcsmc` to a partial `tskit` tree-sequence. Notably, this is used to infer better migration tracts. | ||
- Build environment for local `conda` building. | ||
|
||
### Changed | ||
- Default parameters of simulations, in order to correctly bound the proportions to the correct epochs. | ||
- Format of the simulations to be more expressive. | ||
|
||
### Fixed | ||
- `rpath` of `smcsmc` when installed now automatically prefers `conda` libraries. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
# Locally building via `conda-build` | ||
|
||
Use this recipe for locally creating your own `conda` package. | ||
|
||
## Operating Systems: | ||
|
||
- **Linux**: Tested, verified. | ||
- **MacOSX**: Work in progress, but follow [this](https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html#macos-sdk) guide for installing the SDK which is *not* packaged with `conda-build`. | ||
- **Windows**: Currently no support, nor is it planned. | ||
Use this recipe for locally creating your own `conda` package. It only works on Linux right now. | ||
|
||
## Usage | ||
|
||
To build your package (after cloning the repository and installing `conda-build`) | ||
You can build the package with | ||
|
||
```sh | ||
conda build . -c terhorst | ||
conda build . | ||
``` | ||
|
||
To install: | ||
To install from the local build files: | ||
|
||
```sh | ||
conda install -c ${CONDA_PREFIX}/conda-bld smcsmc | ||
conda install -c conda-forge -c ${CONDA_PREFIX}/conda-bld smcsmc | ||
``` | ||
|
||
This will install both the python package and `smcsmc`/`scrm` binaries. | ||
|
||
## Building for other Python versions | ||
|
||
Build variants are included in the `conda_build_config.yaml`. The only real constraint on the python versions that we are able to build for is the `boost` package. Note that the version on `conda-forge` is more current than the default channels, so this should be set preferentially on the command line. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#$PYTHON -m pip install --ignore-installed --verbose . | ||
$PYTHON setup.py install | ||
rm -rf build | ||
mkdir -p build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
python: | ||
- 3.6 | ||
- 3.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,57 @@ | ||
package: | ||
name: smcsmc | ||
version: 1.0.1 | ||
version: 1.0.2b | ||
|
||
source: | ||
path: .. | ||
|
||
python: | ||
- 3.6.8 | ||
- 3.7.3 | ||
|
||
build: | ||
number: 0 | ||
number: 2 | ||
entry_points: | ||
- smc2=smcsmc.cli:smcsmc_main | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('cxx') }} | ||
- gperftools | ||
- python {{ python }} | ||
- cmake | ||
- boost | ||
- zlib | ||
- msprime | ||
- tqdm | ||
|
||
host: | ||
- python | ||
- msprime | ||
- python {{ python }} | ||
- numpy | ||
- pandas | ||
- tqdm | ||
- msprime | ||
|
||
run: | ||
- gperftools | ||
- numpy | ||
- pandas | ||
- msprime | ||
- boost | ||
- python | ||
- boost | ||
- python | ||
- zlib | ||
- matplotlib | ||
- tqdm | ||
- msprime | ||
- tskit | ||
|
||
test: | ||
imports: | ||
- smcsmc | ||
commands: | ||
- smc2 -h | ||
- smcsmc -h | ||
- scrm -h | ||
|
||
about: | ||
home: https://github.com/luntergroup/smcsmc | ||
doc_url: https://smcsmc.readthedocs.io | ||
summary: 'A particle filter for demographic inference.' | ||
|
||
extra: | ||
recipe-maintainers: | ||
- Chris1221 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
from setuptools import setup | ||
|
||
setup(name='smcsmc', | ||
version='0.1', | ||
version='1.0.2', | ||
description='Demographic Inference using Particle Filters', | ||
url='https://github.com/luntergroup/smcsmc', | ||
author='Chris Cole, Donna Henderson, Sha (Joe) Zhu, Gerton Lunter', | ||
author_email='[email protected], [email protected], [email protected], [email protected]', | ||
license='CC-BY-4.0', | ||
packages=['smcsmc'], | ||
setup_requires=[ | ||
install_requires=[ | ||
'numpy', | ||
'pandas', | ||
'msprime' | ||
'msprime', | ||
'tqdm' | ||
], | ||
zip_safe=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
from .model import Smcsmc | ||
from .square_model import * | ||
from .simulations import * | ||
from .populationmodels import Population | ||
from .plot import * | ||
from .utils import ts_to_seg, run_smcsmc, vcf_to_seg | ||
from .generate_smcsmcinput import run_multihetsep | ||
from .output import Output, Event |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.