{ "cells": [ { "cell_type": "markdown", "id": "multiple-session", "metadata": {}, "source": [ "# Singularity changeo clonotype calling\n", "\n", "Dandelion has a pair of functions, `ddl.pp.calculate_threshold()` and `ddl.tl.define_clones()`, that come together to run the [changeo clonotype calling pipeline](https://changeo.readthedocs.io/en/stable/examples/cloning.html). However, this can be quite fiddly to properly set up - one part of the process is in R, so it requires an operational rpy2 and appropriate dependencies. Meanwhile the other is a command line script which can be difficult to recognise properly within some virtual environments. In summary, creating a simple singularity pipeline to circumvent the need for annoying setup creates a user-friendly way to access this functionality.\n", "\n", "Once in possession of a `.h5ddl` file, a saved form of the Dandelion object, the changeo clonotype calling can be ran like so:\n", "\n", "```\n", "singularity run -B $PWD /path/to/sc-dandelion_latest.sif changeo-clonotypes \\\n", " --h5ddl vdj.h5ddl\n", "```\n", "\n", "By default, this will save the changeo clones into a new column called `changeo_clone_id` in the output `.h5ddl` file. All Dandelion functions that operate on clone calls can be directed to this column by providing `clone_id=\"changeo_clone_id\"` as an argument. If wishing to save the clones to a different column, provide its desired name via `--key_added`.\n", "\n", "If wishing to override the threshold determined by SHazaM, provide it via `--manual_threshold`.\n", "\n", "The SHazaM plot and Dandelion object with changeo clones identified are saved to files named after the original input file (with `_shazam.pdf` and `_changeo.h5ddl` appended respectively). These destinations can be controlled via `--plot_file` and `--h5ddl_out`." ] } ], "metadata": { "kernelspec": { "display_name": "dandelion-tutorial", "language": "python", "name": "dandelion-tutorial" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.13" } }, "nbformat": 4, "nbformat_minor": 5 }