diff --git a/scbs/MethylVI_batch.ipynb b/scbs/MethylVI_batch.ipynb index 46d2771..3f54c8c 100644 --- a/scbs/MethylVI_batch.ipynb +++ b/scbs/MethylVI_batch.ipynb @@ -316,7 +316,7 @@ "source": [ "Before training our model, we'll use methylVI's `setup_mudata` function to prepare our `MuData` object for training. \n", "\n", - "First, we need to tell methylVI which modalities in our MuData object to consider via the `methylation_contexts` argument. Here we'll jointly model CpG and non-CpG methylation, so we'll set this argument to a list containing the names of both modalities. Next, methylVI directly models the total coverage and number of methylated cytosines in each region. Thus, for each modality in our `MuData` object, we need layers containing the coverage in each region (specified by `cov_layer`) and layers with the number of methylated cytosines (specified by `mc_layer`). Finally, we'll provide methylVI with a categorical covariate specifying the sequencing protocol used for each cell, and we'll specify which modality's `.obs` field contains this covariate. Here the `.obs` fields are identical for both modalities, so we arbitrarily tell methylVI to look in the `mCG` modality for our covariate." + "First, we need to tell methylVI which modalities in our MuData object to consider via the `methylation_contexts` argument. Here we'll jointly model both CpG and non-CpG methylation features, so we'll set this argument to a list containing the names of both modalities. Next, methylVI directly models the total coverage and number of methylated cytosines in each region. Thus, for each modality in our `MuData` object, we need layers containing the coverage in each region (specified by `cov_layer`) and layers with the number of methylated cytosines (specified by `mc_layer`). Finally, we'll provide methylVI with a categorical covariate specifying the sequencing protocol used for each cell." ] }, { @@ -335,6 +335,15 @@ ")" ] }, + { + "metadata": {}, + "cell_type": "markdown", + "source": [ + "```{note}\n", + "Specify the modality of each argument via the `modalities` dictionary, which maps layer/key arguments to MuData modalities. In our case, both the `mCG` and `mCH` modalities contain the all of the fields specified in the `categorical_covariate_keys` argument (i.e., `Protocol`) in their respective `.obs`, so we arbitrarily choose `mCG` here.\n", + "```" + ] + }, { "cell_type": "markdown", "metadata": {},