FitnessShape Function
Hello, I am very new to Macaulay 2 and I have downloaded it to find Markov bases and triangulations of a fitness surface. The paper I am reading used version 0.9.95, and it advises me to load "fitness.m2". I have stored my data in a text file named "mydata", yet after running fitnessShape "mydata" I get this error message: fitnessShape "mydata"
stdio:5:1:(3): error: no method for adjacent objects: -- fitnessShape (of class Symbol) -- SPACE "mydata" (of class String)
From what I gather this means that there is no "fitness.m2" program that the paper I am following used? Is there another program I can load that does the same thing?
Thank you for your help!
The file fitness.m2 and various example files are located here: https://authors.library.caltech.edu/74859/
Could this problem be occurring because I am using the Web version? The link you sent me was the paper I am following, and despite following all of the instructions I am still met with
stdio:5:1:(3): error: no method for adjacent objects: -- fitnessShape (of class Symbol) -- SPACE "mydata" (of class String)
This is after loading fitness.m2 and uploading the data file. Should I switch to the non-web version?
Thank you for your time
I doubt you loaded the file "fitness.m2". Here's the way it looks for me:
i1 : load "fitness.m2"
i2 : class fitnessShape
o2 = MethodFunction
o2 : Type
You are right, however when I just type load "fitness.m2" I am met with stdio:1:1:(3): error: file not found on path: "fitness.m2"
I am following the instructions on the paper, and pasting this file into my directory and pressing enter before I try and load however I still get the error message above.
https://static-content.springer.com/esm/art%3A10.1186%2F1471-2148-7-60/MediaObjects/12862_2006_354_MOESM2_ESM.m2
After copy pasting this and pressing enter, when I try load "fitness.m2" I am met with
Macaulay2, version 1.19.1.1 with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, MinimalPrimes, OnlineLookup, PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone
Thank you very much for you prompt replies and help
I'll intervene since this is web app-related. you saved the file fitness.m2 under the wrong name. try again now.
On Sun, 8 May 2022 at 10:36, ThomasXielt @.***> wrote:
You are right, however when I just type load "fitness.m2" I am met with stdio:1:1:(3): error: file not found on path: "fitness.m2"
I am following the instructions on the paper, and pasting this file into my directory and pressing enter before I try and load however I still get the error message above.
https://static-content.springer.com/esm/art%3A10.1186%2F1471-2148-7-60/MediaObjects/12862_2006_354_MOESM2_ESM.m2
After copy pasting this and pressing enter, when I try load "fitness.m2" I am met with
Macaulay2, version 1.19.1.1 with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, MinimalPrimes, OnlineLookup, PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone
Thank you very much for you prompt replies and help
— Reply to this email directly, view it on GitHub https://github.com/Macaulay2/M2/issues/2486#issuecomment-1120323535, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDLBB533I4EZKZJFP4ABQLVI4EAXANCNFSM5VK5BYTQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thank y'all so much for your thorough and prompt replies! I am very new to coding and this is was very important to me so I really appreciate y'all's help!
Hello, when using FitnessShape sometimes I am met with
"fitness.m2:40:8:(3):[2]: error: expected all genotypes to have the same length fitness.m2:82:11:(3):[1]: --back trace--"
Is this because there is a certain way of listing genotypes in binary, as all of my genotypes are the same length? I have tried this even with only 3 digit long genotypes to ensure they are all the same length yet I still get the error above. I have matched the exact format with the examples the paper provided, yet I can only edit their fitness, if I touch the binary representing the genotype then I am met with the error above.
Thank you.
You should be able to debug that with the Macaulay2 debugger. Set "debuggingMode" to "true", and read up on the debugger at https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2-1.19.1/share/doc/Macaulay2/Macaulay2Doc/html/_the_spdebugger.html .
That software is very old, so it might need some attention.
Okay, thank you for your help!
Let us know if you have any trouble with that.
Make sure none of the lines in your file start with spaces, and that all the first words from the lines have the same length.
Thank you, I am now able to map the Markov basis. However, I would like to analyze the influence of each individual mutation in terms of their strength in changing fitness, which function/package would you recommend? For example, after plugging in values such as 001 = .38, 010 = .24, etc. the function/package would relate to me that a mutation on the second point, 010, has a consistently negative effect on fitness. This may not be related to fitnessShape I apologize, I do not know where else to ask. Thank you for your time.
I don't know. Maybe someone else can contribute something at this point. If not, you could write your own code for that.