psathyrella / partis

B- and T-cell receptor sequence annotation, simulation, clonal family and germline inference, and affinity prediction
GNU General Public License v3.0
54 stars 34 forks source link

Can't simulate constant SHM with derived parameters #246

Closed scharch closed 6 years ago

scharch commented 6 years ago

Seems like there should be a way to override SHM, while still keeping the derived recombination parameters (or vice versa).

partis simulate --parameter-dir ../v15/partis/mu/ --outfname partis_simulate.csv --n-sim-events 10 --n-leaves 1 --constant-number-of-leaves --mutate-from-scratch --same-mute-freq-for-all-seqs --flat-mute-freq 0 --only-genes IGHV1-69*10:IGHD3-10*01:IGHJ6*02
Traceback (most recent call last):
  File "/home/schrammca/bin/partis", line 423, in <module>
    args.func(args)
  File "/home/schrammca/bin/partis", line 63, in run_simulation
    raise Exception('you can\'t specify --parameter-dir if you also set either of the scratch options or --generate-germline-set')
Exception: you can't specify --parameter-dir if you also set either of the scratch options or --generate-germline-set
psathyrella commented 6 years ago

Yes. This was the idea with having --rearrange-from-scratch and --mutate-from-scratch separate. I think I added that ^ exception because at some later date I changed some things about how the options worked, and I wanted to go back through and make sure that specifying them separately still worked as intended. OK, will go do that now...

psathyrella commented 6 years ago

OK I've separated --rearrange-from-scratch and --mutate-from-scratch, and hopefully clarified them and the related options. lmk if it doesn't behave as expected.

https://github.com/psathyrella/partis/commits/dev

psathyrella commented 6 years ago

switched interface a bit (to clarify what's coming from where) so using --shm-parameter-dir and --reco-parameter-dir instead of --parameter-dir when simulation from scratch.

https://github.com/psathyrella/partis/commit/b0c45c4e1ad884ab2b61ebc2dc52ba43dd60458f