Skip to content

Commit e08d063

Browse files
committed
Merge branch 'devel'
2 parents c56f51b + 10bbc20 commit e08d063

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+11113
-869
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ dist/
2323
smcpp.egg-info
2424
.cache
2525
smcpp/version.py
26+
smcpp/_estimation_tools.c
27+
<<<<<<< HEAD
28+
src/.release_time

.travis.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,22 @@ sudo: false
44

55
os:
66
- linux
7-
- osx
7+
# - osx
88

99
install:
1010
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export OS=MacOSX; else export OS=Linux; fi
11-
- wget https://repo.continuum.io/miniconda/Miniconda3-4.3.21-$OS-x86_64.sh -O miniconda.sh
11+
- wget https://repo.continuum.io/miniconda/Miniconda3-4.3.30-$OS-x86_64.sh -O miniconda.sh
1212
- bash miniconda.sh -b -p $HOME/miniconda
1313
- export OLDPATH=$PATH PATH="$HOME/miniconda/bin:$PATH" VERSION=$(git describe --tags) MACOSX_DEPLOYMENT_TARGET=10.9
1414
- hash -r
1515
- conda config --set always_yes yes --set changeps1 no
16-
- conda update -q conda
16+
- conda update -y conda python
1717
- conda info -a
1818
- conda install conda-build anaconda-client constructor git
19-
- conda build -c terhorst -c conda-forge -c bioconda conda
20-
- conda build -c terhorst -c conda-forge -c bioconda conda --output > .packages
19+
- conda build -c terhorst -c bioconda conda
20+
- conda build -c terhorst -c bioconda conda --output | tee .packages
2121
- conda/template.py conda/construct.tpl $VERSION > conda/construct.yaml
2222

23-
before_deploy:
24-
- constructor conda
2523
deploy:
2624
- provider: script
2725
script: conda/deploy.sh

conda/build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
#!/bin/bash -ex
2-
export CFLAGS="-mtune=generic" CXXFLAGS="-mtune=generic"
2+
CFLAGS="-I$PREFIX/include -Wno-int-in-bool-context -mtune=generic $CFLAGS"
3+
CXXFLAGS="-Wno-int-in-bool-context -I$PREFIX/include -mtune=generic $CXXFLAGS"
4+
LDFLAGS="-L$PREFIX/lib $LDFLAGS"
5+
PATH="$PREFIX/bin:$PATH"
6+
LDSHARED=$(python -c "import sys;from distutils import sysconfig;lds = sysconfig.get_config_var('LDSHARED').split(' ');print(' '.join(['$GCC'] + lds[1:]))")
7+
export CFLAGS CXXFLAGS LDFLAGS PATH LDSHARED
38
$PYTHON setup.py install --single-version-externally-managed --record=/dev/null

conda/conda_build_config.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
python:
22
- 3.5
33
- 3.6
4-
openblas:
5-
- 0.2.19
6-
7-
pin_run_as_build:
8-
openblas: {}

conda/construct.tpl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
name: smcpp
22
version: {version}
33
channels:
4+
- http://repo.continuum.io/pkgs/main/
45
- http://repo.continuum.io/pkgs/free/
56
- http://conda.anaconda.org/bioconda
67
- http://conda.anaconda.org/terhorst
7-
- http://conda.anaconda.org/conda-forge
88
specs:
9-
- smcpp
9+
- smcpp {version}
1010
- python 3.6.*
11-
- conda 4.3.21
1211
post_install: post_install.sh
1312
license_file: ../LICENSE

conda/construct.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: smcpp
2+
version: 1.11.0dev
3+
channels:
4+
- http://repo.continuum.io/pkgs/main/
5+
- http://repo.continuum.io/pkgs/free/
6+
- http://conda.anaconda.org/bioconda
7+
- http://conda.anaconda.org/terhorst
8+
specs:
9+
- smcpp 1.11.0dev
10+
- python 3.6.*
11+
post_install: post_install.sh
12+
license_file: ../LICENSE
13+

conda/deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ export PATH="$HOME/miniconda/bin:$PATH"
44
PKGS=$(cat .packages)
55
anaconda -t $ANACONDA_TOKEN upload --force $PKGS
66

7-
# Next, pull uploaded pkg and create a binary installed
8-
constructor conda
7+
# Next, pull uploaded pkg and create a binary
8+
constructor conda -v

conda/meta.yaml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,25 @@ source:
88
requirements:
99
build:
1010
- python {{ python }}
11-
- nomkl
12-
- gcc >=4.8.5
13-
- libgcc
14-
- openblas {{ openblas }}
11+
- {{ compiler('cxx') }}
1512
- git >=2.9.3
1613
- cython >=0.25
1714
- setuptools >=33.1
1815
- numpy >=1.10
1916
- gmp >=6.1.0
2017
- gsl >=2.2.1
21-
- mpc >=1.0.3
2218
- mpfr >=3.1.5
2319
- setuptools_scm >=1.15
2420
run:
2521
- python
26-
- nomkl
27-
- gcc >=4.8.5
28-
- libgcc
29-
- openblas
30-
- git >=2.9.3
22+
- {{ pin_compatible('libgcc-ng') }}
23+
- {{ pin_compatible('libstdcxx-ng') }}
3124
- cython >=0.25
3225
- setuptools >=33.1
3326
- numpy >=1.10
3427
- gnuplot >=4.6.0
3528
- gmp >=6.1.0
3629
- gsl >=2.2.1
37-
- mpc >=1.0.3
3830
- mpfr >=3.1.5
3931
- setuptools_scm >=1.15
4032
- pysam >=0.11

conda/run_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
$SMC vcf2smc -v example/example.vcf.gz /tmp/example.1.smc.gz 1 msp1:msp_0,msp_1,msp_2
55
$SMC vcf2smc -d msp_0 msp_0 example/example.vcf.gz /tmp/example.2.smc.gz 1 msp2:msp_0,msp_3,msp_4
66
$SMC vcf2smc -d msp_1 msp_1 example/example.vcf.gz /tmp/example.12.smc.gz 1 msp1:msp_1,msp_2 msp2:msp_3,msp_4,msp_0
7-
$SMC estimate -o /tmp/out/1 --unfold --knots 5 --multi --em-iterations 1 1.25e-8 /tmp/example.1.smc.gz
7+
$SMC estimate -o /tmp/out/1 --unfold --knots 5 --no-multi --em-iterations 1 1.25e-8 /tmp/example.1.smc.gz
88
$SMC estimate -p 0.01 -r 1e-8 -o /tmp/out/2 --knots 5 --em-iterations 1 1.25e-8 /tmp/example.2.smc.gz
99
$SMC split -o /tmp/out/split --em-iterations 1 \
1010
/tmp/out/1/model.final.json \

include/bin_key.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,24 @@ std::set<block_key> bin_key<1>::run(
5353
else
5454
{
5555
ret.emplace(key);
56+
if (true) // or undistinguish)
57+
for (int aa = 0; aa <= na(0); ++aa)
58+
{
59+
int bb = key(1) - aa;
60+
tmp(0) = aa;
61+
if ((aa + bb == key(0) + key(1)) and
62+
(0 <= bb) and
63+
(bb <= key(2)))
64+
ret.emplace(tmp);
65+
}
66+
/*
5667
if (nb > 0 and ((double)b / (double)nb > cutoff))
5768
for (int bb = (int)(cutoff * nb); bb <= nb; ++bb)
5869
{
5970
tmp(1) = bb;
6071
ret.emplace(tmp);
6172
}
73+
*/
6274
}
6375
return ret;
6476
}

0 commit comments

Comments
 (0)