This rule should do the following to make plots of the clusters found in the single-cell data:
Take as input the three output files from the cluster_cells rule
Specify which attribute to color the data by (Hint: an attribute is usually a piece of metadata or categorical label for a data point. In this example, the attribute is the column titled "louvain")
Up until now, you have hardcoded the parameters needed into each rule. A more elegant solution is to have the Snakefile use a config.yaml file that specifies these parameters. In this step you should do the following:
Create a config.yaml file
Specify the parameters in the config.yaml file
Import the config.yaml file into the Snakefile
Have the Snakefile use the parameters specified in the config.yaml file
This rule should do the following to cluster the data and output it in an R-readable format:
Take the output of the preprocess_data rule as input
Specify parameters such that the number of clusters is 15 and the resolution is 1
Create three output files for the count matrix, cell metadata, and gene metadata. (Tip: think about directory structure when choosing where this clustered data should save to)
Take the output of the download_data rule as input
Specify parameters to filter the data such that the minimum number of cells is 3, the minimum number of genes is 200, the maximum percent of mitochondrial reads is 5%, and the number of highly variable genes to retain is 2000
Output a processed '.h5ad' file. You should put this in some type of data directory. (Hint: can you specify different directories for raw and processed data?)
Right now, your Snakefile will process one data set that is hard coded in. A more realistic use of a snakemake pipeline is to apply it to multiple data sets.
Here, use wildcards to generalize the rules for multiple data sets.