002‐ Download sample data - rezakj/iCellR GitHub Wiki
- Download and unzip a publicly available sample PBMC scRNA-Seq data.
In R
Set your working directory to the location where you want the file to be downloaded to
setwd("/your/download/directory")
Set the URL of the PBMC 3k dataset as an object
sample.file.url = "https://cf.10xgenomics.com/samples/cell/pbmc3k/pbmc3k_filtered_gene_bc_matrices.tar.gz"
Download the file from the URL and save it in your working directory
download.file(url = sample.file.url,
destfile = "pbmc3k_filtered_gene_bc_matrices.tar.gz",
method = "auto")
Unzip the downloaded tar.gz file
untar("pbmc3k_filtered_gene_bc_matrices.tar.gz")
# Check the contents of the unzipped folder to ensure successful extraction
list.files()
In your browser
Copy and paste this link in your web browser to download the file and unzip
https://cf.10xgenomics.com/samples/cell/pbmc3k/pbmc3k_filtered_gene_bc_matrices.tar.gz