From 41bcbb4b60b08945498189ed4f1b04b02b62c7f9 Mon Sep 17 00:00:00 2001 From: Andrej Fischer Date: Sun, 13 Apr 2014 12:32:21 +0200 Subject: [PATCH 1/4] mod README --- .gitignore | 1 + README.md | 15 +++++---------- src/cloneHD.cpp | 8 +++++++- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index a71c8f3..3bca399 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.[oa] build/* +build-*tar.gz *~ release/ release* diff --git a/README.md b/README.md index 8d453f8..6fa482f 100755 --- a/README.md +++ b/README.md @@ -1,15 +1,11 @@ # How to get cloneHD and filterHD? -The current stable release, including pre-compiled executable binaries -of filterHD and cloneHD for Mac OS X (64bit), can be found at: - -`ftp://ftp.sanger.ac.uk/pub/teams/153/cloneHD/` - -The source code can also be downloaded here. +The current stable release, as well as pre-compiled executable binaries +for Mac OS X and GNU Linux (64bit), can be found [here](/releases/). # Run a test with simulated data -If you download cloneHD from the ftp site above, you can test both filterHD and cloneHD by running +After downloading cloneHD from the release site, you can test both filterHD and cloneHD by running `$ sh run-example.sh` @@ -18,12 +14,11 @@ data with a matched normal. All command line arguments are explained below. # Compilation -For Mac OS X (64bit), there are pre-compiled binaries available on the ftp server above. To compile cloneHD yourself, you need the GNU scientific library ([GSL](http://www.gnu.org/software/gsl/)) v1.15 or later. Change the paths in the Makefile to your GSL installation location (if non-standard). Then type +For Mac OS X and GNU Linux (64bit), pre-compiled binaries are available [here](/releases/). To compile cloneHD yourself, you need the GNU scientific library ([GSL](http://www.gnu.org/software/gsl/)) v1.15 or later. Change the paths in the Makefile to point to your local GSL installation (if non-standard). Then type `$ make` -in the source directory. The two executables, `filterHD` and -`cloneHD`, will be in `./build`. For debugging with gdb, use `make -f Makefile.debug`. +in the `src` directory. The executables will be in `build`. For debugging with gdb, use `make -f Makefile.debug`. # What are cloneHD and filterHD for? diff --git a/src/cloneHD.cpp b/src/cloneHD.cpp index 0880461..d8b20e3 100755 --- a/src/cloneHD.cpp +++ b/src/cloneHD.cpp @@ -165,7 +165,13 @@ int main (int argc, const char * argv[]){ else{ // ****** INFERENCE STARTS HERE ****** bestn = infer_clones( clones, mass, &myClone, opts); - printf("cloneHD found support for %i sub-clone(s) in the data.\n", bestn); + printf("cloneHD in "); + if (cnaEmit.is_set && bafEmit.is_set && snvEmit.is_set) cout<<"cna-baf-snv"; + if (cnaEmit.is_set && bafEmit.is_set && !snvEmit.is_set) cout<<"cna-baf"; + if (cnaEmit.is_set && !bafEmit.is_set && snvEmit.is_set) cout<<"cna-snv"; + if (cnaEmit.is_set && !bafEmit.is_set && !snvEmit.is_set) cout<<"cna"; + if (!cnaEmit.is_set && !bafEmit.is_set && snvEmit.is_set) cout<<"snv"; + printf("mode found support for %i sub-clone(s) in the data.\n", bestn); // ****** INFERENCE COMPLETED ******** } print_all_results( &myClone, opts); From c72c6a98d0713e3a9e5f04397b1ee0011f2adbf8 Mon Sep 17 00:00:00 2001 From: Andrej Fischer Date: Sun, 13 Apr 2014 12:34:29 +0200 Subject: [PATCH 2/4] mod README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6fa482f..8c65254 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # How to get cloneHD and filterHD? The current stable release, as well as pre-compiled executable binaries -for Mac OS X and GNU Linux (64bit), can be found [here](/releases/). +for Mac OS X and GNU Linux (64bit), can be found [here](https://github.com/andrej-fischer/cloneHD/releases). # Run a test with simulated data @@ -14,7 +14,7 @@ data with a matched normal. All command line arguments are explained below. # Compilation -For Mac OS X and GNU Linux (64bit), pre-compiled binaries are available [here](/releases/). To compile cloneHD yourself, you need the GNU scientific library ([GSL](http://www.gnu.org/software/gsl/)) v1.15 or later. Change the paths in the Makefile to point to your local GSL installation (if non-standard). Then type +For Mac OS X and GNU Linux (64bit), pre-compiled binaries are available [here](https://github.com/andrej-fischer/cloneHD/releases). To compile cloneHD yourself, you need the GNU scientific library ([GSL](http://www.gnu.org/software/gsl/)) v1.15 or later. Change the paths in the Makefile to point to your local GSL installation (if non-standard). Then type `$ make` From 54f326ade6462f7e5b753133d8ae61fe7a7c6501 Mon Sep 17 00:00:00 2001 From: Andrej Fischer Date: Tue, 22 Apr 2014 08:03:41 +0200 Subject: [PATCH 3/4] mod changelog --- changelog.md | 5 +++++ src/cloneHD.cpp | 10 +++++----- src/pre-filter.cpp | 13 +++++++------ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/changelog.md b/changelog.md index adeb54d..008fcc4 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ # changelog for cloneHD/filterHD +## v1.17.5 / 22.04.2014 + +* fixed memory alloc bug in pre-filter +* abandon ftp site for releases, used only for backup and beta + ## v1.17.4 / 10.04.2014 * fixed fatal bug in snv-mode with correlations diff --git a/src/cloneHD.cpp b/src/cloneHD.cpp index d8b20e3..a46bf0e 100755 --- a/src/cloneHD.cpp +++ b/src/cloneHD.cpp @@ -166,11 +166,11 @@ int main (int argc, const char * argv[]){ // ****** INFERENCE STARTS HERE ****** bestn = infer_clones( clones, mass, &myClone, opts); printf("cloneHD in "); - if (cnaEmit.is_set && bafEmit.is_set && snvEmit.is_set) cout<<"cna-baf-snv"; - if (cnaEmit.is_set && bafEmit.is_set && !snvEmit.is_set) cout<<"cna-baf"; - if (cnaEmit.is_set && !bafEmit.is_set && snvEmit.is_set) cout<<"cna-snv"; - if (cnaEmit.is_set && !bafEmit.is_set && !snvEmit.is_set) cout<<"cna"; - if (!cnaEmit.is_set && !bafEmit.is_set && snvEmit.is_set) cout<<"snv"; + if (cnaEmit.is_set && bafEmit.is_set && snvEmit.is_set) cout<<"cna-baf-snv "; + if (cnaEmit.is_set && bafEmit.is_set && !snvEmit.is_set) cout<<"cna-baf "; + if (cnaEmit.is_set && !bafEmit.is_set && snvEmit.is_set) cout<<"cna-snv "; + if (cnaEmit.is_set && !bafEmit.is_set && !snvEmit.is_set) cout<<"cna "; + if (!cnaEmit.is_set && !bafEmit.is_set && snvEmit.is_set) cout<<"snv "; printf("mode found support for %i sub-clone(s) in the data.\n", bestn); // ****** INFERENCE COMPLETED ******** } diff --git a/src/pre-filter.cpp b/src/pre-filter.cpp index 9c34aa7..d8b57d4 100755 --- a/src/pre-filter.cpp +++ b/src/pre-filter.cpp @@ -199,6 +199,7 @@ void pre_filter( Emission& dataEmit, cmdl_opts& opts){ for (int s=0; s < dataEmit.nSamples; s++){ unsigned int * rds = dataEmit.reads[0][s]; unsigned int * dps = dataEmit.depths[0][s]; + if (dataEmit.nSites[s] == 0) abort(); double * wMean = new double [dataEmit.nSites[s]]; double * wVar = new double [dataEmit.nSites[s]]; int * mask = new int [dataEmit.nSites[s]]; @@ -238,21 +239,21 @@ void pre_filter( Emission& dataEmit, cmdl_opts& opts){ else if ( size < 2*opts.wSize+1 ){ size++; } - while (front < dataEmit.nSites[s]){ + while (front < dataEmit.nSites[s]-1){ front++; if (dps[front] > 0) break; } if (front < dataEmit.nSites[s]){ sum += fabs(median - double(rds[front]) / double(dps[front])); } - while (center < dataEmit.nSites[s]){ + while (center < dataEmit.nSites[s]-1){ center++; if (center < 0 || dps[center] > 0 ) break; } if (back >= 0){ sum -= fabs(median - double(rds[back]) / double(dps[back])); } - while (back < dataEmit.nSites[s]){ + while (back < dataEmit.nSites[s]-1){ back++; if ( back < 0 || dps[back] > 0 ) break; } @@ -275,21 +276,21 @@ void pre_filter( Emission& dataEmit, cmdl_opts& opts){ else if ( size < 2*opts.wSize+1 ){ size++; } - while (front < dataEmit.nSites[s]){ + while (front < dataEmit.nSites[s]-1){ front++; if (dps[front] > 0 && mask[front]==1) break; } if (front < dataEmit.nSites[s]){ sum += double(rds[front]) / double(dps[front]); } - while (center < dataEmit.nSites[s]){ + while (center < dataEmit.nSites[s]-1){ center++; if (center < 0 || (dps[center] > 0 && mask[center]==1)) break; } if (back >= 0){ sum -= double(rds[back]) / double(dps[back]); } - while (back < dataEmit.nSites[s]){ + while (back < dataEmit.nSites[s]-1){ back++; if ( back<0 || (dps[back]>0 && mask[back]==1 ) ) break; } From cb042d716660310b7fb9cc3de6c60cfa66d5a40b Mon Sep 17 00:00:00 2001 From: Andrej Fischer Date: Tue, 22 Apr 2014 08:34:00 +0200 Subject: [PATCH 4/4] mod README --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8c65254..3a6275c 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # How to get cloneHD and filterHD? The current stable release, as well as pre-compiled executable binaries -for Mac OS X and GNU Linux (64bit), can be found [here](https://github.com/andrej-fischer/cloneHD/releases). +for Mac OS X and GNU Linux (64bit), can be found [here](https://github.com/andrej-fischer/cloneHD/releases). The cloneHD software is undergoing rapid development. Watch/Star this repo to receive updates. # Run a test with simulated data @@ -20,6 +20,10 @@ For Mac OS X and GNU Linux (64bit), pre-compiled binaries are available [here](h in the `src` directory. The executables will be in `build`. For debugging with gdb, use `make -f Makefile.debug`. +# Report bugs + +To report bugs, use the [issue](https://github.com/andrej-fischer/cloneHD/issues) interface of github. + # What are cloneHD and filterHD for? cloneHD is a software for reconstructing the subclonal structure of a @@ -76,20 +80,17 @@ The full documentation can be found in the `/docs/` subfolder. Click below. bias field for the tumor CNA data. Follow the logic of the example given here. -* If the matched-normal was sequenced at lower coverage than the tumor, it might be necessary - to run filterHD with a higher-than-optimal diffusion constant (set with `--sigma [double]`) - to obtain a more faithful bias field. Otherwise, the filterHD solution is too stiff and - you loose bias detail. +* If the matched-normal sample was sequenced at lower coverage than the tumor sample, it might be necessary to run filterHD with a higher-than-optimal diffusion constant (set with `--sigma [double]`) to obtain a more faithful bias field. Otherwise, the filterHD solution is too stiff and you loose bias detail. -* filterHD can sometimes run into local optima. It might be useful to - fix initial values for the parameters via `--jumpi [double]` etc. +* filterHD can sometimes run into local optima. In this case, it might be useful to + set initial values for the parameters via `--jumpi [double]` etc. * By default, cloneHD runs with mass gauging enabled. This seems like an overkill, but is actually quite useful because you can see some alternative explanations during the course of the analysis. * Don't put too much weight on the BIC criterion. It was calibrated - using simulated data. For real data, it should be supplied together with + using simulated data. For real data, it should be supplemented with common sense and biological knowledge. Use `--force [int]` to use a fixed number of subclones and `--max-tcn [int]` to set the maximum possible total copy number.