matsengrp / linearham

A Bayesian Phylo-HMM for B cell receptor sequence analysis
http://matsengrp.github.io/linearham
6 stars 4 forks source link

Add option for less verbose output dir #91

Closed psathyrella closed 2 years ago

psathyrella commented 2 years ago

Could someone who understands nestly help me figure out how to add an option to not have two levels of parameter values in the output directory even if you're not modifying any mcmc params? E.g. by default this: mcmciter1000_mcmcthin10_tuneiter500_tunethin100_numrates4_rngseed0/burninfrac0.1_subsampfrac0.05 is always in the output path, which requires either a glob.glob or hard coding all these linearham default params into your calling code just in order to figure out where the output file is going to go.

It seems to be determined by this fcn getting passed to the nestly add_nest calls, but I can't figure out how to adjust nestly behavior. As far as I can tell the outdir is set to what the user tells it to be here but then once you're inside any of the nestly target fcns like here it's got all the extra levels added to it.

I think a good way to keep backwards compatibility would be an option to have the outdir stay the actual user-specified outdir (i.e. let the user worry about putting different outputs in different output dirs).

matsen commented 2 years ago

To make sure, I think you don't like the mcmciter1000_mcmcthin10_tuneiter500_tunethin100_numrates4_rngseed0 part, right?

To modify that, you want to change the label_func, which by default concats everything together.

(I think! It's been a long time.)