I learned about the package fastseg after its main function was implemented in Altuna Akalin’s package methylKit. I have a question about an argument to the fastseg function.
Can you explain the purpose of maxInt? What exactly is it doing? The manual says "Maximal length of the left and the right segment. (Default = 40).
But the source code shows fastseg calls another internal function segmentGeneral whose maxInt default = 10.
Thanks for your question. Yes, indeed the default value for the argument "maxInt" of the wrapper function "segmentGeneral" and the main function "fastseg" are different. This has no special meaning and if you use the function "fastseg" the default value 40 is passed to "segmentGeneral". If I recall correctly, the default value "40" comes from hyperparameter selection procedures that we ran. The default value of "segmentGeneral" is 10, and this is just a rough guess what could be a good value.
Now, "what is it exactly doing?". Fastseg performs a (cyber t-test) between the data points left against the data points right of a putative breakpoint. The question is how many data points left and right of the breakpoint you would use for this test. You would use at least "minSeg" and at most "maxInt". I admit that the naming of the variables is a bit unfortunate.