knitr::opts_chunk$set(echo = TRUE)
This script downloads and subsets test IMC data that were acquired for general purpose testing. The Github repository containing this data can be accessed here.
More specifically, we will use the 210308_ImcTestData
dataset.
Here, we will first download the raw data in form of .txt files. For this, we an use the automatically generated Github assets.
cur_url <- "https://github.com/BodenmillerGroup/TestData/releases/download/v1.0.2/210308_ImcTestData_raw.tar.gz" download.file(cur_url, "210308_ImcTestData_raw.tar.gz") untar("210308_ImcTestData_raw.tar.gz") unlink("210308_ImcTestData_raw.tar.gz")
Here, we will move the .txt files of one raw data file to the mockData
folder
file.copy(list.files("datasets/210308_ImcTestData/raw/20210305_NE_mockData2/", pattern = ".txt$", full.names = TRUE), "../extdata/mockData/raw", overwrite = TRUE) unlink("datasets/", recursive = TRUE)
Here, we will download the .tiff
files asset.
cur_url <- "https://github.com/BodenmillerGroup/TestData/releases/download/v1.0.2/210308_ImcTestData_analysis_cpout_images.tar.gz" download.file(cur_url, "210308_ImcTestData_analysis_cpout_images.tar.gz") untar("210308_ImcTestData_analysis_cpout_images.tar.gz") unlink("210308_ImcTestData_analysis_cpout_images.tar.gz")
And copy them to the right location.
file.copy("datasets/210308_ImcTestData/analysis/cpout/images/20210305_NE_mockData2_s0_a1_ac_fullFiltered.tiff", "../extdata/mockData/tiffs/", overwrite = TRUE) unlink("datasets/", recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.