Article Lost in parameter space: A road map for Stacks
Article Restriction site-associated DNA sequencing, genotyping error...
My personal recommendation (which is used in various researches) is to take a subset of your samples (one that covers a broad range of your data) and follow the Paris et al. method (from the first paper).
In denovo_map.pl the M, n, and m parameters are critical. You can check the suitable parameter set by running the analysis number of times while changing the parameters. Then using a PCA diagram or Cluster dendrogram you can confirm the suitable parameter set for your data. In most cases, optimal parameters are M 4, n 4, m 3. Then when you are running populations program R, r, p is important.