Skip to content

Commit e33e423

Browse files
committed
add module import to docs
1 parent 9aa8037 commit e33e423

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/quick-start.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ Both of these take the argument `--reverse-negative-strands` if you have a mix o
1515
If you have heavy/light pairing information, for instance from 10x single cell data, it is important to incorporate it as described [here](paired-loci.md) in order to take advantage of (among other things) dramatically improved partitioning accuracy.
1616
If you're using Docker, and you mounted your host filesystem as described [here](install.md#installation-with-docker), you should replace `/path/to` with the appropriate host mount point within Docker.
1717

18+
If you prefer, you can import partis as a module rather than running command line scripts, for instance:
19+
```
20+
import partis.utils as utils
21+
glfo, annotation_list, cpath = utils.read_output(yaml_output_file_path) # read germline info, annotations, and list of partitions from partis yaml output file
22+
antn_dict = utils.get_annotation_dict(annotation_list) # convert list to dict for convenient access
23+
for cluster in cpath.best(): # loop over clusters in best partition
24+
annotation = antn_dict[':'.join(cluster)] # retrieve annotation for cluster
25+
utils.print_reco_event(annotation) # print ascii representation of annotation
26+
```
27+
While we do not have automatically generated documentation pages for the functions thereby exposed, we have had very good results asking LLMs what functions to use for a task and how to use them.
28+
1829
If you want it to run faster (by a factor of 5 to 10, and at the cost of some accuracy) add `--fast`, which uses [naive vsearch clustering](subcommands#--fast-synonym---naive-vsearch).
1930
The number of processes on your local machine defaults to the number of cpus, so shouldn't need to be adjusted (with `--n-procs N`) unless you're running several things at once.
2031
To paralellize over many machines, the slurm and sge batch systems are currently supported (details [here](parallel.md)).

docs/subcommands.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ For the sake of brevity, the commands below invoke partis with no leading path,
4242
- added the partis `bin/` to your path: `export PATH=/path/to/partis/dir/bin/:$PATH`
4343
The other option is to specify the full path with each call `/path/to/partis/dir/bin/partis`.
4444

45+
You can also import partis as a module rather than running command line scripts (see [quick start](quick-start.md) for details).
46+
4547
### annotate
4648

4749
In order to find the most likely annotation (VDJ assignment, deletion boundaries, etc.) for each single sequence, run

0 commit comments

Comments
 (0)