nsh87 / receptormarker

Source for 'receptormarker' package for R: antibody receptor and phenotypic marker analysis
http://receptormarker.com
BSD 2-Clause "Simplified" License
4 stars 9 forks source link

Create multiClust class and implement related fixes #63

Closed nsh87 closed 8 years ago

nsh87 commented 8 years ago

The major commit here is https://github.com/nsh87/receptormarker/commit/3d58920d11f0dfac3250ab148e5e80986492cda1. It creates an actual multiClust class and moves the documentation around. The rest of the commits are around:

@catterbu: If you can take a look at all of these that would be great. This PR is going to fail. I've split up most of the unit tests to be more atomic so it's more obvious what is failing. I think you'll have to address those failing ones yourself - I've done most of what I feel comfortable doing.

nsh87 commented 8 years ago

@catterbu: actually, it might just be some stupid thing that causes this to fail. If so I can fix it, but if you can take a look at these commits all the same that would be awesome. I still have to test this on the site tonight once this is merged into dev.

nsh87 commented 8 years ago

@catterbu: never mind, it's not a stupid typo or anything. You're going to have to check out these failed tests to see what's going on:

1. Error: the 'clust_model' slot in the pre-generated multiClust validates -----
argument "FUN" is missing, with no default
1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls, message = function(c) invokeRestart("muffleMessage"))
2: eval(code, new_test_environment)
3: eval(expr, envir, enclos)
4: lapply(expect_is(f_clust@clust_model[[1]], "kmeans")) at test_multi_clustering.R:47
5: match.fun(FUN)

2. Error: multi_clust() correctly handles contrived boolean data ---------------
more cluster centers than distinct data points.
1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls, message = function(c) invokeRestart("muffleMessage"))
2: eval(code, new_test_environment)
3: eval(expr, envir, enclos)
4: multi_clust(contrived_bool, krange = 2:7) at test_multi_clustering.R:81
5: stats::kmeans(d, k, iter.max = iter.max, nstart = runs, ...) at /home/travis/build/nsh87/receptormarker/R/multi_clustering.R:88
6: stop("more cluster centers than distinct data points.")

3. Failure (at test_multi_clustering.R#92): multi_clust() correctly handles non-boolean iris data 
k_best is not identical to 3. Differences: 
Mean relative difference: 0.3333333

*** grep results from unit tests ********************

27:3. Failure (at test_multi_clustering.R#92): multi_clust() correctly handles non-boolean iris data 
10:1. Error: the 'clust_model' slot in the pre-generated multiClust validates -----
18:2. Error: multi_clust() correctly handles contrived boolean data ---------------

ERROR, WARNING, or Failure found in unit tests. See grep results above.
catterbu commented 8 years ago

@nsh87 will do this evening. Just got back from a meeting with Bill. My guess was absolutely correct. You set up everything perfectly, now he is jut waiting on the money and data I say "go."

On Mar 14, 2016, at 3:44 PM, Nikhil Haas notifications@github.com wrote:

@catterbu: never mind, it's not a stupid typo or anything. You're going to have to check out these failed tests to see what's going on:

  1. Error: the 'clust_model' slot in the pre-generated multiClust validates ----- argument "FUN" is missing, with no default 1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls, message = function(c) invokeRestart("muffleMessage")) 2: eval(code, new_test_environment) 3: eval(expr, envir, enclos) 4: lapply(expect_is(f_clust@clust_model[[1]], "kmeans")) at test_multi_clustering.R:47 5: match.fun(FUN)
  2. Error: multi_clust() correctly handles contrived boolean data --------------- more cluster centers than distinct data points. 1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls, message = function(c) invokeRestart("muffleMessage")) 2: eval(code, new_test_environment) 3: eval(expr, envir, enclos) 4: multi_clust(contrived_bool, krange = 2:7) at test_multi_clustering.R:81 5: stats::kmeans(d, k, iter.max = iter.max, nstart = runs, ...) at /home/travis/build/nsh87/receptormarker/R/multi_clustering.R:88 6: stop("more cluster centers than distinct data points.")
  3. Failure (at test_multi_clustering.R#92): multi_clust() correctly handles non-boolean iris data k_best is not identical to 3. Differences: Mean relative difference: 0.3333333

* grep results from unit tests **

27:3. Failure (at test_multi_clustering.R#92): multi_clust() correctly handles non-boolean iris data 10:1. Error: the 'clust_model' slot in the pre-generated multiClust validates ----- 18:2. Error: multi_clust() correctly handles contrived boolean data ---------------

ERROR, WARNING, or Failure found in unit tests. See grep results above. — Reply to this email directly or view it on GitHub.

nsh87 commented 8 years ago

@catterbu: I fixed the first error - that one was dumb.