Fishplot R package
1
0
Entering edit mode
5.6 years ago

Hello,

I'm trying to use fishplot package on R, but I failed when attempted to create the fish object (createFishObject), I got this message error :

Erreur : C stack usage  7970384 is too close to the limit

Let's say that this is my matrix (fish.matrix) :

Day0    Day150  Day750
65  0   70
45  0   0
5   0   30
0   0   30

And these are my variables to create the fish object:

fish.parents = c(1,0,1,0)
fish.timepoints = c(0,150,750)

I failed when I try to create the fish object :

fish.obj = createFishObject(frac.table = fish.matrix, parents = fish.parents, timepoints = timepoints)

For this reason:

Erreur : C stack usage  7970384 is too close to the limit

Does someone know how to solve this problem please? (It works with the doc's example, but I if I change any value in the matrix or parents option I got the same error)

Thanks, Yasmine

R • 4.0k views
ADD COMMENT
0
Entering edit mode

Looks like a memory error to me. You're running out. Reduce your memory usage, find a machine with more you can use, or add more to your machine. Though looking at the package, it seems pretty simple and I can't imagine how it would be using that much memory unless you're running into a silent bug or throwing it a really weird case it doesn't know how to handle.

Also, there was no need to post this with the 'forum' tag, it's just a basic question. A mod will likely fix it once they come along.

ADD REPLY
1
Entering edit mode

I'd prefer OP themselves fix it, as it's a learning opportunity.

ADD REPLY
0
Entering edit mode

Thank you. I have a matrix with only 3 columns and 4 rows, I don't think that it's a memory problem since when I run the example given by the documentation, it works well. I think it can be related to "parents" option that I don't well understand, because when I change this option in the doc's example, I have the same error ...

ADD REPLY
0
Entering edit mode

This is a question, not a forum discussion. Please read the document on Post Types. Please edit your question and change it to a Question. Here's the how-to on editing a post.

ADD REPLY
0
Entering edit mode

OP, could you also add a few more relevant tags? I think fishplot is a relevant tag, you could add a few more. You'll need to edit your question to add the tags.

ADD REPLY
3
Entering edit mode
5.6 years ago

Your matrix design doesn't make sense, which is why it's throwing an error. Run the example and examine how they construct their matrix carefully. With your current design, you end up with a population that is 0 for all three timepoints, which is part of the issue.

The parent option refers to which population the specified population will be derived from. Your first population has to be 0, it doesn't make sense otherwise. If you run the example, you can see that the 2nd population (the red), is derived from the 1st pop (the gray). So in the parents option, the first 1 in c(0,1,1,3) refers to this relationship. The second 1 refers to the orange population, which stems from the gray (the first cluster), and the 3 refers to the yellow (the 4th cluster), which stems from the orange (the 3rd cluster). It's kind of confusing, but makes sense. Note how each population frequency can't be larger than the population it's derived from.

In the example, change parents to c(0,1,1,2) and the frac.table to:

frac.table = matrix(     
    c(100, 45, 00, 00,
       02, 01, 00, 00,
       05, 01, 02, 01,
       98, 50, 40, 40),
     ncol=length(timepoints))

Then you can see how the 4th population (yellow) is derived from the 2nd population (red) during the last timepoint.

Currently, your populations don't make sense. If you provide a better formatted matrix, I can give a more concrete answer, but hopefully this explanation will help you figure it out on your own.

ADD COMMENT
1
Entering edit mode

Hi, fishplot creator here. Jared's advice is sound - start there. If you have continued issues, feel free to follow up here or post an issue on the github page

ADD REPLY
0
Entering edit mode

Thank you so much. I understand better now how does this package work. I will check with the person who gave the matrix if he's sure that it's the right one (because he used it before and it worked but he doesn't know with which parents vector)

Thanks again for your clear explanations, Best, Yasmine

ADD REPLY

Login before adding your answer.

Traffic: 3107 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6