Skip to content

Commit

Permalink
Responding to Can's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan Weinberger authored and Ethan Weinberger committed Oct 8, 2024
1 parent 3e89f76 commit fa8837d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scbs/MethylVI_batch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand All @@ -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": {},
Expand Down

0 comments on commit fa8837d

Please sign in to comment.