Wouldn't it be better not to have the default value 40 (or 20) in the wrapper at all? i.e. Leave it out, so that by default that argument isn't used, so that tophat uses the default it wants to use.
This would work but limits reproducibility and transparency because Galaxy wouldn't have a record of the parameter's actual value. Yes, this is a problem when default parameters are used as well and should be fixed. However, making more use of defaults when advanced setting are used could be especially problematic b/c I imagine that using advanced parameters generally implies that a user cares are default values more so than if using all defaults. FWIW, the Galaxy team has started thinking about how to better handle multiple tool versions and different parameter default values for different tool versions. If anyone has strong feelings, please feel free to start a discussion (in a new thread please) on this challenge. Best, J.