Question: Fishplot R package
0
gravatar for iddir.yasmine
2.1 years ago by
iddir.yasmine0 wrote:

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 • 1.7k views
ADD COMMENTlink modified 2.1 years ago by Chris Miller21k • written 2.1 years ago by iddir.yasmine0

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 REPLYlink modified 2.1 years ago • written 2.1 years ago by jared.andrews077.5k
1

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

ADD REPLYlink written 2.1 years ago by RamRS30k

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 REPLYlink written 2.1 years ago by iddir.yasmine0

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 REPLYlink written 2.1 years ago by RamRS30k

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 REPLYlink modified 2.1 years ago • written 2.1 years ago by RamRS30k
3
gravatar for jared.andrews07
2.1 years ago by
jared.andrews077.5k
Memphis, TN
jared.andrews077.5k wrote:

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 COMMENTlink modified 2.1 years ago • written 2.1 years ago by jared.andrews077.5k
1

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 REPLYlink written 2.1 years ago by Chris Miller21k

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 REPLYlink written 2.1 years ago by iddir.yasmine0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1523 users visited in the last hour