Skip to content

Commit

Permalink
small gctree updates
Browse files Browse the repository at this point in the history
  • Loading branch information
psathyrella committed Jun 29, 2024
1 parent b9ab8ef commit e79381b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/run-paired-loci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ common="--n-sub-procs 15 --n-max-procs 5 --single-light-locus igk --base-outdir
# echo $bin --label pairfix --version v1 --n-replicates 3 --n-leaves-list hist --n-sim-events-list 3000 --scratch-mute-freq-list 0.07 --bulk-data-fraction-list 0:0.5:0.8:0.9:0.95 --simu-extra-args=\"--flat-mute-freq --same-mute-freq-for-all-seqs\" --inference-extra-args=\"--pair-unpaired-seqs-with-paired-family\" --final-plot-xvar bulk-data-fraction --perf-metrics all-pcfrac:f1:precision:sensitivity --make-hist-plots --use-val-cfgs --empty-bin-range 0:200 $common
# echo $bin --label test-antn --version imbal-v3 --n-replicates 2 --tree-imbalance-list None:0.04:0.07 --scratch-mute-freq-list 0.15 --n-leaves-list 50 --simu-extra-args=\"--flat-mute-freq --same-mute-freq-for-all-seqs\" --n-sim-events-list 50 --antn-perf --perf-metrics naive-hdist $common # NOTE also made :0.13:0.14:0.16
# echo $bin --label bcr-phylo-antn --version v0 --n-replicates 2 --obs-times-list 50:150:300 --n-sim-seqs-per-generation-list 15:45 --context-depend-list 1 --simu-type bcr-phylo --dont-observe-common-ancestors --antn-perf --perf-metrics naive-hdist $common
simu_extra="--simu-extra-args=\"--target-distance 10 --context-depend 1 --tdist-weights random-uniform --min-target-distance 2 --n-sim-seqs-per-generation 70 --aa-paratope-positions N=60 --aa-struct-positions N=100 --leaf-sampling-scheme high-affinity\""
echo $bin --label gct-valid --version v4 --n-replicates 3 --obs-times-list 15:20:30:40:50 --n-sim-events-list 70 --carry-cap-list 1000 --simu-type bcr-phylo --perf-metrics coar:rf:mrca --calc-antns --inference-extra-args=\"--no-indels --simultaneous-true-clonal-seqs\" --plot-metrics tree-perf --final-plot-xvar obs-times --final-plot-xvar obs-times $simu_extra $common # NOTE also have sampling times 10, 100, 150 for most methods
simu_extra="--simu-extra-args=\"--target-distance 10 --context-depend 1 --tdist-weights random-uniform --min-target-distance 2 --n-sim-seqs-per-generation 89 --parameter-variances n-sim-seqs-per-generation,23 --aa-paratope-positions N=60 --aa-struct-positions N=100 --leaf-sampling-scheme high-affinity\""
echo $bin --label gct-valid --version v5 --n-replicates 3 --obs-times-list 15:20:30:40:50 --n-sim-events-list 70 --carry-cap-list 1000 --simu-type bcr-phylo --perf-metrics coar:rf:mrca --calc-antns --inference-extra-args=\"--no-indels --simultaneous-true-clonal-seqs\" --plot-metrics tree-perf --final-plot-xvar obs-times --final-plot-xvar obs-times $simu_extra $common # NOTE also have sampling times 10, 100, 150 for most methods
# echo $bin --label gct-valid --version gcdyn-v1 --n-replicates 2 --simu-type gcdyn --n-sim-events-list 70 --obs-times-list 15:30 --perf-metrics coar:rf:mrca --calc-antns --inference-extra-args=\"--no-indels --simultaneous-true-clonal-seqs\" --plot-metrics tree-perf $common

# NOTE have to set --n-sub-procs to 1 for partition step, and re-set --n-sim-events-list for each --n-leaves value (500 leaves: 10 events, 100:50, 50:100):
Expand Down
3 changes: 3 additions & 0 deletions projects/replay-plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ def scale_affinities(antn_list, mfos):
for itr, dtree in enumerate(dendro_trees):
tnode = list(dtree.leaf_node_iter())[0]
gcn = gcids[itr] if isdata(label) else (itr if args.bcr_phylo else tnode.taxon.label.split('-')[0])
if gcn not in all_seqfos:
print(' gcn \'%s\' not in all_seqfos (probably skipped with --n-max-simu-trees), so not processing its tree' % gcn)
continue
all_dtrees[gcn] = dtree
ndict = {n.taxon.label : n for n in dtree.preorder_node_iter()}
for sfo in all_seqfos[gcn]:
Expand Down
2 changes: 1 addition & 1 deletion test/cf-paired-loci.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def get_cmd(action, base_args, varnames, vlists, vstrs, synth_frac=None):
binstr, actstr, odstr = ('bcr-phylo-run.py', '--actions %s'%actstr, 'base') if args.simu_type=='bcr-phylo' and action=='simu' else ('partis', actstr.replace('simu', 'simulate'), 'paired')
cmd = './bin/%s %s --paired-loci --%s-outdir %s --n-procs %d' % (binstr, actstr, odstr, odir(args, varnames, vstrs, action), args.n_sub_procs)
if action == 'replay-plot':
cmd = './projects/replay-plot.py --min-seqs-per-gc 70 --max-seqs-per-gc 70 --n-max-simu-trees 61 --simu-like-dir %s --outdir %s --bcr-phylo' % (os.path.dirname(ofname(args, varnames, vstrs, 'write-fake-paired-annotations')), os.path.dirname(ofname(args, varnames, vstrs, action)))
cmd = './projects/replay-plot.py --min-seqs-per-gc 70 --normalize --n-max-simu-trees 61 --simu-like-dir %s --outdir %s --bcr-phylo' % (os.path.dirname(ofname(args, varnames, vstrs, 'write-fake-paired-annotations')), os.path.dirname(ofname(args, varnames, vstrs, action)))
if args.simu_type == 'gcdyn':
cmd += ' --default-naive-affinity 0'
elif action == 'simu':
Expand Down

0 comments on commit e79381b

Please sign in to comment.