2 Set up the project
2.1 1. Download and open the complete project
Open the GitHub repository, select Code → Download ZIP, then extract the ZIP.
In VS Code, choose File → Open Folder and select the extracted project folder. A GitHub ZIP usually names it ai-assisted-single-cell-analysis-main. Open the inner folder if there is an extra outer folder. Do not work inside the compressed ZIP.
Check that you can see _quarto.yml, renv.lock, data/, scripts/ and examples/ directly inside the selected folder. The complete project also includes .Rprofile and renv/activate.R. These may be hidden in your file browser.
Choose Terminal → New Terminal. This is the main project folder. Run guide commands here unless the instructions explicitly say to enter reports/.
Commands beginning with Rscript or quarto go in the terminal. The > prompt means you are inside R; exit with q(save = "no") before using terminal commands. Copy commands without any displayed prompt symbols. Ctrl+Z suspends R; it does not exit R.
2.2 2. Check the tools
Install R and Quarto. RStudio is optional. The worked examples were checked on macOS with R 4.6.1. Use the R version recorded in the supplied renv.lock; renv restores packages but does not install R itself.
In the terminal:
Rscript --version
quarto --versionBoth should print a version. If either command is not found, finish installing that tool and reopen the terminal.
2.3 3. Restore the analysis environment
Rscript scripts/R/setup.RAn internet connection is required on the first run. Wait for Setup complete. The script restores the package versions in renv.lock, checks that required packages load and confirms that the project is synchronized. It does not create a new lockfile or update packages to current releases.
If setup fails, stop before running analysis and use installation troubleshooting. A missing lockfile means the download is incomplete or the maintainer has not supplied the tested environment.
2.4 4. Start the synthetic practice
Open Define: Synthetic practice, then follow its seven steps in order. The commands you will use are:
Rscript scripts/R/prepare_synthetic.R
Rscript scripts/R/check_inputs.R synthetic
Rscript scripts/R/run_workflow.R synthetic
Rscript scripts/R/verify_cell.R synthetic Cell001
Rscript scripts/R/verify_cell.R synthetic Cell047
Rscript scripts/R/verify_cell.R synthetic Cell048Run one line at a time. Stop if a command fails. Expected: 1,000 genes, 200 cells, 190 retained, followed by three PASS messages. Cell047 and Cell048 should have retained FALSE; the verifier passes because it confirms their exclusion.
2.5 5. Preview the guide
quarto previewThe book explains commands without running analysis during rendering. Figures come from the R workflow. Stop the preview with Ctrl+C when you need the terminal again.
After synthetic practice, follow the Zeisel example. Use your own study only after you understand the inputs and verification. Report-writing instructions are in Write the report.