Skip to content

Commit 9aa8037

Browse files
committed
edit docs + better print
1 parent 869cab9 commit 9aa8037

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/install.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Until we've managed to resolve this, then, you'll unfortunately be limited to ei
2323

2424
Install from PyPI (recommended):
2525
```bash
26+
python -m venv .venv
27+
source .venv/bin/activate # On Windows: partis-env\Scripts\activate
2628
pipx install partis-bcr
2729
```
2830
Alternatively, you can install from source if you think you'll want to modify the source code.

partis/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4926,13 +4926,15 @@ def merge_csvs(outfname, csv_list, cleanup=False, old_simulation=False):
49264926
return n_event_list, n_seq_list
49274927

49284928
# ----------------------------------------------------------------------------------------
4929-
def merge_yamls(outfname, yaml_list, headers, cleanup=False, use_pyyaml=False, dont_write_git_info=False, remove_duplicates=False):
4929+
def merge_yamls(outfname, yaml_list, headers, cleanup=False, use_pyyaml=False, dont_write_git_info=False, remove_duplicates=False, debug=False):
49304930
from . import glutils
49314931
merged_annotation_list, merged_keys = [], set()
49324932
merged_cpath, merged_glfo = None, None
49334933
n_event_list, n_seq_list = [], []
49344934
for infname in yaml_list:
49354935
glfo, annotation_list, cpath = read_yaml_output(infname, dont_add_implicit_info=True)
4936+
if debug:
4937+
print(' %d sequences in %d clusters from %s' % (sum(len(l['unique_ids']) for l in annotation_list), len(annotation_list), infname))
49364938
if remove_duplicates: # NOTE this doesn't catch duplicates *within* each subfile, but atm I'm only worried about the case where they appear at most once in each subfile, so oh well
49374939
annotation_list = [l for l in annotation_list if ':'.join(l['unique_ids']) not in merged_keys]
49384940
for ptn in cpath.partitions:
@@ -4965,6 +4967,9 @@ def merge_yamls(outfname, yaml_list, headers, cleanup=False, use_pyyaml=False, d
49654967

49664968
write_annotations(outfname, merged_glfo, merged_annotation_list, headers, use_pyyaml=use_pyyaml, dont_write_git_info=dont_write_git_info, partition_lines=merged_cpath.get_partition_lines())
49674969

4970+
if debug:
4971+
print(' read %d total seqs from %d yaml files' % (sum(n_seq_list), len(yaml_list)))
4972+
49684973
return n_event_list, n_seq_list
49694974

49704975
# ----------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)