Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retesting cast of simulate.binary.dated.tree.fgy output to phylo object #79

Closed
gtng92 opened this issue Jun 27, 2017 · 9 comments
Closed
Assignees
Labels
Milestone

Comments

@gtng92
Copy link
Collaborator

gtng92 commented Jun 27, 2017

Commit f0d4cf0 simplified cast of simulated.binary.dated.tree.fgy output to phylo object.
Later as I process the tree, the following error happens:

> obs.tree <- compartmental.model(theta, nsim=1, tips=100, model='sir.nondynamic')[[1]]
> obs.tree <- parse.input.tree(obs.tree, config)
Error in x$edge : $ operator is invalid for atomic vectors

> class(obs.tree)
[1] "phylo"
@gtng92 gtng92 self-assigned this Jun 27, 2017
@ArtPoon ArtPoon added the bug label Jul 3, 2017
@ArtPoon ArtPoon added this to the Kaphi 1.0 milestone Jul 3, 2017
@ArtPoon
Copy link
Contributor

ArtPoon commented Jul 3, 2017

@ArtPoon and @gtng92 to pick this apart later today

@ArtPoon
Copy link
Contributor

ArtPoon commented Jul 3, 2017

Could not reproduce this issue on my Mac using f0d4cf0
and running through the example script example-compartmental.R

@gtng92
Copy link
Collaborator Author

gtng92 commented Jul 3, 2017

No error produced on @0ldM4j0r 's computer, error reproduced on mine and @MathiasRenaud 's computer. Checking to see if it's because of an update to R. (Currently on 3.2.3, Faisal is on 3.4)

@gtng92
Copy link
Collaborator Author

gtng92 commented Jul 3, 2017

Updated to R version 3.4.1, reinstalled Kaphi and colgem, but error is still there.

@ArtPoon
Copy link
Contributor

ArtPoon commented Jul 3, 2017

That is really strange. Is it stochastic? Are you sure the config file is the same?

@gtng92
Copy link
Collaborator Author

gtng92 commented Jul 3, 2017

On all the computers, I ran the example-compartmental.R script from the specified commit. They all rely on the example-compartmental.yaml file to load the config.
The only thing I changed each time I ran it was t.end=50 instead of t.end=1300 to eliminate the negative probability error (which is a separate issue).

@0ldM4j0r
Copy link
Collaborator

I re-ran the test on the machines that it worked on last week but for some reason they are giving the same error now (aka not working). This is really weird as I am sure I did it along side Tammy last week and it worked. So none of the workstations down stairs or the mac pass that test.

@0ldM4j0r
Copy link
Collaborator

I also tried to run it on Langley through ssh and that didn't worked. This is weird as it worked when running it through ssh from Hypnotoad

gtng92 added a commit that referenced this issue Jul 12, 2017
gtng92 added a commit that referenced this issue Jul 12, 2017
--Tammy Ng
@gtng92
Copy link
Collaborator Author

gtng92 commented Jul 12, 2017

Oops. Just noticed an indexing addition to the phylo cast from the commit.
Originally it was

phy <- tree[[1]]                   
class(phy) <- 'phylo'
return(phy)

The first line accesses the first index of tree, which is not a phylogenetic tree, but the first attribute of the rcolgem phylo object. Initially must have thought it outputted 1 phylogenetic tree. Now looks like:

class(tree) <- 'phylo'
return(tree)

Don't really get how it worked for some computers before but not for others with this indexing addition but at least it works now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants