{ "cells": [ { "cell_type": "markdown", "id": "f4143c1d-4f24-4aae-9d6d-98552383c4a6", "metadata": {}, "source": [ "# Select samples for use in reference building" ] }, { "cell_type": "markdown", "id": "18f31246-4851-4a0d-a915-68ec4894d1ad", "metadata": {}, "source": [ "## Load packages" ] }, { "cell_type": "code", "execution_count": 1, "id": "5adb72ac-565d-4960-931c-3803a71e145c", "metadata": { "tags": [] }, "outputs": [], "source": [ "quiet_library <- function(...) { suppressPackageStartupMessages(library(...)) }\n", "quiet_library(hise)\n", "quiet_library(dplyr)\n", "quiet_library(purrr)" ] }, { "cell_type": "markdown", "id": "559d4162-e70f-43b8-b171-0254152a8d36", "metadata": {}, "source": [ "## Retrieve file and sample metadata from HISE" ] }, { "cell_type": "code", "execution_count": 2, "id": "886829cd-06ef-4300-956b-75fbabca4378", "metadata": { "tags": [] }, "outputs": [], "source": [ "BR1_rna_desc <- getFileDescriptors(\n", " fileType = \"scRNA-seq-labeled\", \n", " filter = list(cohort.cohortGuid = \"BR1\"))\n", "BR2_rna_desc <- getFileDescriptors(\n", " fileType = \"scRNA-seq-labeled\", \n", " filter = list(cohort.cohortGuid = \"BR2\"))\n", "UP1_rna_desc <- getFileDescriptors(\n", " fileType = \"scRNA-seq-labeled\", \n", " filter = list(cohort.cohortGuid = \"UP1\"))" ] }, { "cell_type": "code", "execution_count": 3, "id": "7713d294-470e-4bce-b823-50db7bb28ea7", "metadata": { "tags": [] }, "outputs": [], "source": [ "BR1_rna_desc <- fileDescToDataframe(BR1_rna_desc)\n", "BR2_rna_desc <- fileDescToDataframe(BR2_rna_desc)\n", "UP1_rna_desc <- fileDescToDataframe(UP1_rna_desc)" ] }, { "cell_type": "markdown", "id": "b7e3b449-b423-4987-8a7b-b9689ad1130d", "metadata": {}, "source": [ "## Remove irrelevant batches\n", "\n", "Batches starting with \"EXP\" are experimental, non-pipeline batches. \n", "B004 is an early batch that has some batch effects. We'll exclude this batch, as samples have been re-run in later batches. \n", "Batches later than B145 are not used for this reference." ] }, { "cell_type": "code", "execution_count": 4, "id": "fea5288b-59be-47ad-8e23-1ec57b1080a4", "metadata": { "tags": [] }, "outputs": [], "source": [ "meta_data <- plyr::rbind.fill(BR1_rna_desc , BR2_rna_desc )" ] }, { "cell_type": "code", "execution_count": 5, "id": "59f3e5f6-408a-4e77-ac97-a8d350ebebc1", "metadata": {}, "outputs": [], "source": [ "meta_data <- meta_data %>%\n", " filter(!grepl(\"EXP\",file.batchID)) %>%\n", " filter(!file.batchID == \"B004\") %>%\n", " mutate(file.batch_num = as.numeric(sub(\"B\",\"\",file.batchID))) %>%\n", " filter(file.batch_num <= 145) %>%\n", " select(-file.batch_num)" ] }, { "cell_type": "markdown", "id": "3a0a76db-0e8f-4743-b929-5bbb6d765934", "metadata": {}, "source": [ "## Remove non-healthy and abnormal subjects\n", "\n", "We want to use only healthy subjects without abnormal presentation for this reference. A few subjects have non-healthy or abnormal states recored at some visits. We'll identify and remove these subjects." ] }, { "cell_type": "code", "execution_count": 6, "id": "1e37252c-19bc-41df-8dca-f97275a73407", "metadata": {}, "outputs": [], "source": [ "non_healthy <- meta_data %>%\n", " filter(sample.diseaseStatesRecordedAtVisit != \"\") %>%\n", " select(subject.subjectGuid, sample.diseaseStatesRecordedAtVisit) %>%\n", " unique()" ] }, { "cell_type": "code", "execution_count": 7, "id": "e67ba6bc-ad53-4f2d-bb79-54c944aeed2e", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\t\n", "\t\n", "\n", "\n", "\t\n", "\t\n", "\t\n", "\n", "
A data.frame: 3 × 2
subject.subjectGuidsample.diseaseStatesRecordedAtVisit
<chr><chr>
1BR1034Psoriasis
7BR2007Healthy - Abnormal
17BR2049Healthy - Abnormal
\n" ], "text/latex": [ "A data.frame: 3 × 2\n", "\\begin{tabular}{r|ll}\n", " & subject.subjectGuid & sample.diseaseStatesRecordedAtVisit\\\\\n", " & & \\\\\n", "\\hline\n", "\t1 & BR1034 & Psoriasis \\\\\n", "\t7 & BR2007 & Healthy - Abnormal\\\\\n", "\t17 & BR2049 & Healthy - Abnormal\\\\\n", "\\end{tabular}\n" ], "text/markdown": [ "\n", "A data.frame: 3 × 2\n", "\n", "| | subject.subjectGuid <chr> | sample.diseaseStatesRecordedAtVisit <chr> |\n", "|---|---|---|\n", "| 1 | BR1034 | Psoriasis |\n", "| 7 | BR2007 | Healthy - Abnormal |\n", "| 17 | BR2049 | Healthy - Abnormal |\n", "\n" ], "text/plain": [ " subject.subjectGuid sample.diseaseStatesRecordedAtVisit\n", "1 BR1034 Psoriasis \n", "7 BR2007 Healthy - Abnormal \n", "17 BR2049 Healthy - Abnormal " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "non_healthy" ] }, { "cell_type": "code", "execution_count": 8, "id": "a337a609-68bb-4ea1-8f60-2ba3010a98ce", "metadata": { "tags": [] }, "outputs": [], "source": [ "meta_data <- meta_data %>%\n", " filter(!subject.subjectGuid %in% non_healthy$subject.subjectGuid)" ] }, { "cell_type": "markdown", "id": "ff09d813-73e3-4242-9509-2fcf2f818477", "metadata": {}, "source": [ "## Select Flu Year 1 Day 0 samples\n", "\n", "To build our reference, we'll use the pre-vaccination samples from each of our BR1 (healthy adult 25-35 years) and BR2 (healthy adult 55-65 years) subjects.\n", "\n", "These samples have the visit name \"Flu Year 1 Day 0\"." ] }, { "cell_type": "code", "execution_count": 9, "id": "e599d045-47e3-48d1-8fe2-26db30b86a79", "metadata": { "tags": [] }, "outputs": [], "source": [ "meta_data$pbmc_sample_id <- gsub(\"_\",\"\",paste0(\"PB0\",substr(sub(\".*PB0\", \"\", meta_data$file.name),1,8)))\n", "meta_data <- meta_data %>% \n", " arrange(pbmc_sample_id) %>%\n", " filter(!duplicated(sample.sampleKitGuid, fromLast = TRUE)) %>%\n", " filter(sample.visitName == 'Flu Year 1 Day 0') %>%\n", " arrange(sample.sampleKitGuid)" ] }, { "cell_type": "code", "execution_count": 10, "id": "5eb5922c-a134-4661-9338-e0494569eaa0", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "\n", "BR1 BR2 \n", " 47 45 " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "table(meta_data$cohort.cohortGuid)" ] }, { "cell_type": "markdown", "id": "a9048003-ae15-4dd5-bc84-bf261dfcbd9e", "metadata": {}, "source": [ "## Select pediatric samples\n", "\n", "A set of 16 pediatric samples have been previously published in Thomson, Z. et al. Trimodal single-cell profiling reveals a novel pediatric CD8αα+ T cell subset and broad age-related molecular reprogramming across the T cell compartment. Nat. Immunol. 24, 1947–1959 (2023).\n", "\n", "We'll use this set of samples to provide coverage of pediatric cells in our reference." ] }, { "cell_type": "code", "execution_count": 11, "id": "70d7eb1b-dd86-4519-acea-765d06a5ed4d", "metadata": { "tags": [] }, "outputs": [], "source": [ "UP_Sample_kits <- c(\"KT00809\",\"KT00811\",\"KT00193\",\"KT00841\",\n", " \"KT00842\",\"KT00833\",\"KT00910\",\"KT00884\",\n", " \"KT00892\",\"KT00914\",\"KT00913\",\"KT00927\",\n", " \"KT00928\",\"KT02391\",\"KT02392\",\"KT03223\")" ] }, { "cell_type": "code", "execution_count": 12, "id": "d43c00fd-15f1-45c0-ae6e-f122ba146355", "metadata": { "tags": [] }, "outputs": [], "source": [ "UP1_rna_desc <- UP1_rna_desc %>% \n", " filter(sample.sampleKitGuid %in% UP_Sample_kits)" ] }, { "cell_type": "code", "execution_count": 13, "id": "551cb10a-8a18-4f54-a843-a752cbb35fe1", "metadata": { "tags": [] }, "outputs": [], "source": [ "meta_data <- plyr::rbind.fill(meta_data, UP1_rna_desc)" ] }, { "cell_type": "markdown", "id": "f293094f-0846-4f41-b514-b825a0b40ec5", "metadata": {}, "source": [ "## Save file and sample metadata" ] }, { "cell_type": "code", "execution_count": 14, "id": "cd936a54-747c-46a4-8fec-56a689b6da61", "metadata": {}, "outputs": [], "source": [ "if(!dir.exists(\"output\")) {\n", " dir.create(\"output\")\n", "}" ] }, { "cell_type": "code", "execution_count": 15, "id": "1899832d-825b-41ce-99dc-d13a24966c05", "metadata": { "tags": [] }, "outputs": [], "source": [ "out_file <- file.path(\n", " \"output\",\n", " paste0(\"ref_h5_meta_data_\",Sys.Date(),\".csv\")\n", ")\n", "\n", "write.csv(\n", " meta_data,\n", " out_file,\n", " row.names = FALSE,\n", " quote = FALSE\n", ")" ] }, { "cell_type": "markdown", "id": "8828733c-c5d0-445e-a7d9-49ed302eb2ec", "metadata": {}, "source": [ "## Store results in HISE\n", "\n", "In order to store the results in HISE, we'll need to cache these files to register them, and then we can upload the CSV file for later steps." ] }, { "cell_type": "code", "execution_count": 16, "id": "31198686-2fd2-497b-a1a6-af9ad5c709bd", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[1] \"Initiating file download for B001-P1_PB00001-01_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B001-P1_PB00002-01_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B001-P1_PB00003-01_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B002-P1_PB00004-01_2023-11-17T21:36:51.794326181Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B002-P1_PB00006-01_2023-11-17T21:36:51.794326181Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B078-P2_PB00010-02_2021-08-19T17:09:29.934849811Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B002-P1_PB00012-01_2023-11-17T21:36:51.794326181Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B002-P1_PB00014-01_2023-11-17T21:36:51.794326181Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B002-P1_PB00015-01_2023-11-17T21:36:51.794326181Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B002-P1_PB00016-01_2023-11-17T21:36:51.794326181Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B002-P2_PB00022-01_2023-11-17T21:38:04.103392546Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B078-P2_PB00023-05_2021-08-19T17:09:29.934849811Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B078-P2_PB00025-04_2021-08-19T17:09:29.934849811Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B078-P2_PB00026-05_2021-08-19T17:09:29.934849811Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B078-P2_PB00030-02_2021-08-19T17:09:29.934849811Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B078-P2_PB00031-05_2021-08-19T17:09:29.934849811Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B007-P1_PB00041-01_2020-06-24T03:16:48.417213376Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B010-P1_PB00166-01_2021-11-09T17:30:04.059664207Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B039-P2_PB00334-01_2020-12-14T06:30:12.885244281Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B036-P1_PB00338-01_2020-11-05T20:20:56.478927112Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B056-P2_PB00339-01_2021-06-09T18:00:29.080476056Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B036-P1_PB00341-01_2020-11-05T20:20:56.478927112Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B050-P1_PB00342-01_2021-02-28T21:06:52.68159788Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B041-P2_PB00345-01_2021-02-12T20:13:57.744090035Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B047-P2_PB00347-01_2021-02-25T00:07:50.971832932Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B040-P2_PB00349-01_2021-03-24T00:48:50.255094117Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B040-P2_PB00350-01_2021-03-24T00:48:50.255094117Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B078-P1_PB00352-04_2021-08-15T20:26:02.548957446Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B078-P1_PB00353-04_2021-08-15T20:26:02.548957446Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B046-P2_PB00356-01_2021-02-24T00:13:26.04313294Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B040-P2_PB00357-01_2021-03-24T00:48:50.255094117Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B039-P1_PB00362-01_2020-12-13T18:58:42.148340626Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B040-P2_PB00363-01_2021-03-24T00:48:50.255094117Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B040-P2_PB00365-01_2021-03-24T00:48:50.255094117Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B039-P1_PB00366-01_2020-12-13T18:58:42.148340626Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B142-P2_PB00368-07_2022-11-16T19:59:12.434982913Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B056-P2_PB00369-01_2021-06-09T18:00:29.080476056Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B040-P1_PB00377-01_2021-02-14T05:03:10.129208213Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B077-P2_PB00383-01_2021-07-23T23:25:52.724598929Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B040-P1_PB00384-01_2021-02-14T05:03:10.129208213Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B041-P2_PB00386-01_2021-02-12T20:13:57.744090035Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B055-P2_PB00387-01_2021-07-18T21:22:58.754356074Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B040-P1_PB00388-01_2021-02-14T05:03:10.129208213Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B067-P2_PB00390-01_2023-05-10T23:59:25.925856679Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B041-P2_PB00391-01_2021-02-12T20:13:57.744090035Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B053-P2_PB00393-01_2021-10-01T22:42:30.043074144Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B082-P2_PB00394-02_2021-08-22T03:15:23.834723601Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B040-P1_PB00398-01_2021-02-14T05:03:10.129208213Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B053-P1_PB00501-01_2021-03-16T16:53:54.504538818Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B041-P1_PB00504-01_2021-02-11T20:48:07.416042815Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B041-P1_PB00507-01_2021-02-11T20:48:07.416042815Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B043-P1_PB00510-01_2021-01-28T01:04:59.754710921Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B041-P1_PB00514-01_2021-02-11T20:48:07.416042815Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B064-P1_PB00516-01_2021-06-13T18:07:41.688427174Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B046-P1_PB00518-01_2021-02-24T00:12:47.912386239Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B077-P2_PB00520-01_2021-07-23T23:25:52.724598929Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B077-P2_PB00523-01_2021-07-23T23:25:52.724598929Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B045-P1_PB00525-01_2021-02-20T17:54:07.896349649Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B073-P2_PB00526-01_2021-07-16T04:08:14.677295096Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B072-P2_PB00529-01_2021-07-12T17:24:20.370028377Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B045-P1_PB00530-01_2021-02-20T17:54:07.896349649Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B046-P1_PB00532-01_2021-02-24T00:12:47.912386239Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B080-P2_PB00533-01_2021-08-17T16:54:06.046922824Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B046-P1_PB00535-01_2021-02-24T00:12:47.912386239Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B046-P1_PB00537-01_2021-02-24T00:12:47.912386239Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B048-P2_PB00539-01_2021-02-26T23:24:20.340902222Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B080-P2_PB00541-01_2021-08-17T16:54:06.046922824Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B060-P2_PB00545-01_2021-04-20T21:56:32.569265429Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B072-P2_PB00549-01_2021-07-12T17:24:20.370028377Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B045-P1_PB00552-01_2021-02-20T17:54:07.896349649Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B073-P2_PB00557-01_2021-07-16T04:08:14.677295096Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B132-P2_PB00561-04_2023-08-01T23:45:21.463231471Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B046-P1_PB00562-01_2021-02-24T00:12:47.912386239Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B056-P2_PB00563-01_2021-06-09T18:00:29.080476056Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B145-P2_PB00564-04_2023-02-11T00:49:32.117536882Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B073-P2_PB00565-01_2021-07-16T04:08:14.677295096Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B053-P1_PB00566-01_2021-03-16T16:53:54.504538818Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B048-P1_PB00568-01_2021-03-01T17:06:41.838698747Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B047-P2_PB00569-01_2021-02-25T00:07:50.971832932Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B056-P2_PB00575-01_2021-06-09T18:00:29.080476056Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B048-P1_PB00582-01_2021-03-01T17:06:41.838698747Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B054-P1_PB00588-01_2022-06-28T21:54:05.984884065Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B072-P2_PB00592-01_2021-07-12T17:24:20.370028377Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B060-P2_PB00599-01_2021-04-20T21:56:32.569265429Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B054-P1_PB00600-01_2022-06-28T21:54:05.984884065Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B084-P2_PB00602-01_2021-09-29T16:53:56.828677249Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B072-P2_PB00621-01_2021-07-12T17:24:20.370028377Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B084-P2_PB00623-01_2021-09-29T16:53:56.828677249Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B145-P2_PB00625-02_2023-02-11T00:49:32.117536882Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B072-P2_PB00645-01_2021-07-12T17:24:20.370028377Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B073-P1_PB01425-01_2021-07-16T04:07:49.451824358Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B085-P2_PB01446-01_2021-10-07T16:25:25.021068654Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B053-P1_PB00809-01_2021-03-16T16:53:54.504538818Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B060-P2_PB00811-01_2021-04-20T21:56:32.569265429Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B053-P2_PB00193-01_2021-10-01T22:42:30.043074144Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B063-P2_PB00841-01_2021-05-27T20:39:53.63831316Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B063-P2_PB00842-01_2021-05-27T20:39:53.63831316Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B094-P2_PB00833-01_2021-11-24T17:15:39.555696237Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B094-P2_PB00910-01_2021-11-24T17:15:39.555696237Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B094-P2_PB00884-01_2021-11-24T17:15:39.555696237Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B094-P2_PB00892-01_2021-11-24T17:15:39.555696237Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B096-P2_PB00914-01_2021-11-28T04:01:08.720902535Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B096-P2_PB00913-01_2021-11-28T04:01:08.720902535Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B096-P2_PB00927-01_2021-11-28T04:01:08.720902535Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B096-P2_PB00928-01_2021-11-28T04:01:08.720902535Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B138-P2_PB02391-001_2022-11-08T19:15:22.447561185Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B138-P2_PB02392-001_2022-11-08T19:15:22.447561185Z_labeled.h5\"\n", "[1] \"Download successful.\"\n", "[1] \"Initiating file download for B138-P1_PB03223-001_2022-11-08T19:14:56.863218242Z_labeled.h5\"\n", "[1] \"Download successful.\"\n" ] }, { "ename": "ERROR", "evalue": "Error in if (thisDesc$file$id != idsExpanded[[fidx]]) {: the condition has length > 1\n", "output_type": "error", "traceback": [ "Error in if (thisDesc$file$id != idsExpanded[[fidx]]) {: the condition has length > 1\nTraceback:\n", "1. cacheFiles(list(meta_data$file.id))" ] } ], "source": [ "res <- cacheFiles(list(meta_data$file.id))" ] }, { "cell_type": "code", "execution_count": 17, "id": "b8053016-b422-43b2-b742-7ff65f1b32b3", "metadata": { "tags": [] }, "outputs": [], "source": [ "study_space_uuid <- \"64097865-486d-43b3-8f94-74994e0a72e0\"\n", "title <- paste(\"PBMC Ref. Metadata\", Sys.Date())" ] }, { "cell_type": "code", "execution_count": 18, "id": "21259ce8-9d61-4b78-b316-f55c0ffdaceb", "metadata": { "tags": [] }, "outputs": [], "source": [ "in_list <- as.list(meta_data$file.id)" ] }, { "cell_type": "code", "execution_count": 19, "id": "891df2a9-6e0e-4f5e-98ad-eb86ff401b61", "metadata": { "tags": [] }, "outputs": [], "source": [ "out_list <- list(out_file)" ] }, { "cell_type": "code", "execution_count": 20, "id": "581a8c91-9fd1-4c8a-b210-75697ea01d6f", "metadata": { "scrolled": true, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[1] \"Cannot determine the current notebook.\"\n", "[1] \"1) /home/jupyter/scRNA-Reference-IH-A/00-R_Sample_Selection.ipynb\"\n", "[1] \"2) /home/jupyter/examples/Visualization_apps/dash/save_visualization_app_example.ipynb\"\n", "[1] \"3) /home/jupyter/examples/R/XX-R Tips and tricks.ipynb\"\n" ] }, { "name": "stdin", "output_type": "stream", "text": [ "Please select (1-3) 1\n" ] }, { "data": { "text/html": [ "
\n", "\t
$files
\n", "\t\t
    \n", "\t
  1. 'output/ref_h5_meta_data_2024-02-18.csv'
  2. \n", "
\n", "
\n", "\t
$traceId
\n", "\t\t
'd418c0ea-9a79-4fc3-861a-5cb68659c808'
\n", "
\n" ], "text/latex": [ "\\begin{description}\n", "\\item[\\$files] \\begin{enumerate}\n", "\\item 'output/ref\\_h5\\_meta\\_data\\_2024-02-18.csv'\n", "\\end{enumerate}\n", "\n", "\\item[\\$traceId] 'd418c0ea-9a79-4fc3-861a-5cb68659c808'\n", "\\end{description}\n" ], "text/markdown": [ "$files\n", ": 1. 'output/ref_h5_meta_data_2024-02-18.csv'\n", "\n", "\n", "\n", "$traceId\n", ": 'd418c0ea-9a79-4fc3-861a-5cb68659c808'\n", "\n", "\n" ], "text/plain": [ "$files\n", "$files[[1]]\n", "[1] \"output/ref_h5_meta_data_2024-02-18.csv\"\n", "\n", "\n", "$traceId\n", "[1] \"d418c0ea-9a79-4fc3-861a-5cb68659c808\"\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "uploadFiles(\n", " files = out_list,\n", " studySpaceId = study_space_uuid,\n", " title = title,\n", " inputFileIds = in_list,\n", " store = \"project\",\n", " doPrompt = FALSE\n", ")" ] }, { "cell_type": "code", "execution_count": 21, "id": "e582811f-d8de-4072-a74c-dcfb0f313767", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "R version 4.3.2 (2023-10-31)\n", "Platform: x86_64-conda-linux-gnu (64-bit)\n", "Running under: Ubuntu 20.04.6 LTS\n", "\n", "Matrix products: default\n", "BLAS/LAPACK: /opt/conda/lib/libopenblasp-r0.3.25.so; LAPACK version 3.11.0\n", "\n", "locale:\n", " [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 \n", " [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 \n", " [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C \n", "[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C \n", "\n", "time zone: Etc/UTC\n", "tzcode source: system (glibc)\n", "\n", "attached base packages:\n", "[1] stats graphics grDevices utils datasets methods base \n", "\n", "other attached packages:\n", "[1] purrr_1.0.2 dplyr_1.1.4 hise_2.16.0\n", "\n", "loaded via a namespace (and not attached):\n", " [1] crayon_1.5.2 vctrs_0.6.5 httr_1.4.7 cli_3.6.2 \n", " [5] rlang_1.1.3 stringi_1.8.3 generics_0.1.3 assertthat_0.2.1\n", " [9] jsonlite_1.8.8 glue_1.7.0 RCurl_1.98-1.14 plyr_1.8.9 \n", "[13] htmltools_0.5.7 IRdisplay_1.1 IRkernel_1.3.2 fansi_1.0.6 \n", "[17] evaluate_0.23 tibble_3.2.1 bitops_1.0-7 fastmap_1.1.1 \n", "[21] base64enc_0.1-3 lifecycle_1.0.4 stringr_1.5.1 compiler_4.3.2 \n", "[25] Rcpp_1.0.12 pkgconfig_2.0.3 pbdZMQ_0.3-10 digest_0.6.34 \n", "[29] R6_2.5.1 repr_1.1.6.9000 tidyselect_1.2.0 utf8_1.2.4 \n", "[33] curl_5.1.0 pillar_1.9.0 magrittr_2.0.3 withr_3.0.0 \n", "[37] uuid_1.2-0 tools_4.3.2 mime_0.12 " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "sessionInfo()" ] }, { "cell_type": "code", "execution_count": null, "id": "61def613-3746-4fed-b87f-93c19f157e77", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "R 4", "language": "R", "name": "ir4" }, "language_info": { "codemirror_mode": "r", "file_extension": ".r", "mimetype": "text/x-r-source", "name": "R", "pygments_lexer": "r", "version": "4.3.2" } }, "nbformat": 4, "nbformat_minor": 5 }