/
+# We need to get the SampleID_tumor for runs before 2023-04-07. We can do that
+# by using the LibraryID_tumor to match up with the glims.
+missing_tumor_sampleid <- pmeta |>
+ filter(end < "2023-04-07") |>
+ pull(LibraryID_tumor)
+table(missing_tumor_sampleid %in% lims$LibraryID)
+libid2sampid <- lims |>
+ filter(LibraryID %in% missing_tumor_sampleid) |>
+ select(LibraryID_tumor = LibraryID, SampleID_tumor = SampleID)
-x <- d |>
- mutate(
- sbj = sub("/analysis_data/(SBJ.*?)/.*", "\\1", path),
- dir = dirname(path),
- gds_indir = glue("gds://{volume_name}{dir}/"),
- libids = dirname(dirname(dirname(path))) |> basename()
- ) |>
- group_by(sbj) |>
- # TODO: check if results already exist for same sbj
- mutate(
- n_samp = n(),
- sbj2 = if_else(n_samp > 1, glue("{sbj}_{dplyr::row_number()}"), sbj)
- ) |>
- ungroup() |>
- arrange(sbj2) |>
- mutate(
- outdir = here(glue("nogit/umccrise/2023-01-18/{sbj2}")),
- local_indir = file.path(outdir, "dracarys_gds_sync")
- ) |>
- select(sbj, sbj2, libids, gds_indir, outdir, local_indir, date = time_created)
+d <- pmeta |>
+ left_join(libid2sampid, by = "LibraryID_tumor") |>
+ mutate(SampleID_tumor = if_else(is.na(SampleID_tumor.x), SampleID_tumor.y, SampleID_tumor.x)) |>
+ select(-c(SampleID_tumor.x, SampleID_tumor.y)) |>
+ relocate(SampleID_tumor, .before = SampleID_normal) |>
+ mutate(gds_outdir_umccrise = glue("{.data$gds_outdir_umccrise}/{.data$SubjectID}__{.data$SampleID_tumor}"))
+d
-write_rds(x, here("nogit/umccrise/rds/x_2023-01-20.rds"))
-
-token <- Sys.getenv("ICA_ACCESS_TOKEN_PROD")
-dryrun <- F
-for (i in 1:276) {
- print(i)
- # print(x$gds_indir[i])
- # print(x$local_indir[i])
- umccr_tidy(in_dir = x$gds_indir[i], out_dir = x$outdir[i], prefix = x$sbj2[i], dryrun = dryrun, token = token, pattern = "um__qcsum")
- # umccr_tidy(in_dir = x$gds_indir[i], out_dir = x$outdir[i], prefix = x$sbj2[i], dryrun = dryrun, token = token)
- # umccr_tidy(in_dir = x$local_indir[i], out_dir = x$outdir[i], prefix = x$sbj2[i], dryrun = FALSE, token = token)
-}
+# final portal meta for umccrise runs
+saveRDS(d, file = here(glue("nogit/umccrise/rds/portal_meta/{date1}_pmeta_final.rds")))
diff --git a/man/UmChordTsvFile.Rd b/man/UmChordTsvFile.Rd
index 7270398..358e6db 100644
--- a/man/UmChordTsvFile.Rd
+++ b/man/UmChordTsvFile.Rd
@@ -12,7 +12,7 @@ Contains methods for reading and displaying contents of the
x <- "/path/to/chord.tsv.gz"
d <- UmChordTsvFile$new(x)
d_parsed <- d$read() # or read(d)
-d$write(d_parsed, out_dir = tempdir(), prefix = "sample705", out_format = "both")
+d$write(d_parsed, out_dir = tempdir(), prefix = "sample705", out_format = "tsv")
}
}
\section{Super class}{
@@ -55,7 +55,13 @@ A tibble.
\subsection{Method \code{write()}}{
Writes a tidy version of the \code{chord.tsv.gz} file output from umccrise.
\subsection{Usage}{
-\if{html}{\out{}}\preformatted{UmChordTsvFile$write(d, out_dir, prefix, out_format = "tsv")}\if{html}{\out{
}}
+\if{html}{\out{}}\preformatted{UmChordTsvFile$write(
+ d,
+ out_dir = NULL,
+ prefix,
+ out_format = "tsv",
+ drid = NULL
+)}\if{html}{\out{
}}
}
\subsection{Arguments}{
@@ -67,8 +73,9 @@ Writes a tidy version of the \code{chord.tsv.gz} file output from umccrise.
\item{\code{prefix}}{Prefix of output file(s).}
-\item{\code{out_format}}{Format of output file(s) (one of 'tsv' (def.),
-'parquet', 'both').}
+\item{\code{out_format}}{Format of output file(s).}
+
+\item{\code{drid}}{dracarys ID to use for the dataset (e.g. \code{wfrid.123}, \code{prid.456}).}
}
\if{html}{\out{}}
}
diff --git a/man/UmHrdetectTsvFile.Rd b/man/UmHrdetectTsvFile.Rd
index 9ca51ce..e2f7777 100644
--- a/man/UmHrdetectTsvFile.Rd
+++ b/man/UmHrdetectTsvFile.Rd
@@ -12,7 +12,7 @@ Contains methods for reading and displaying contents of the
x <- "/path/to/hrdetect.tsv.gz"
d <- UmHrdetectTsvFile$new(x)
d_parsed <- d$read() # or read(d)
-d$write(d_parsed, out_dir = tempdir(), prefix = "sample705", out_format = "both")
+d$write(d_parsed, out_dir = tempdir(), prefix = "sample705", out_format = "tsv")
}
}
\section{Super class}{
@@ -55,7 +55,7 @@ A tibble.
\subsection{Method \code{write()}}{
Writes a tidy version of the \code{hrdetect.tsv.gz} file output from umccrise.
\subsection{Usage}{
-\if{html}{\out{}}\preformatted{UmHrdetectTsvFile$write(d, out_dir, prefix, out_format = "tsv")}\if{html}{\out{
}}
+\if{html}{\out{}}\preformatted{UmHrdetectTsvFile$write(d, out_dir, prefix, out_format = "tsv", drid = NULL)}\if{html}{\out{
}}
}
\subsection{Arguments}{
@@ -67,8 +67,9 @@ Writes a tidy version of the \code{hrdetect.tsv.gz} file output from umccrise.
\item{\code{prefix}}{Prefix of output file(s).}
-\item{\code{out_format}}{Format of output file(s) (one of 'tsv' (def.),
-'parquet', 'both').}
+\item{\code{out_format}}{Format of output file(s).}
+
+\item{\code{drid}}{dracarys ID to use for the dataset (e.g. \code{wfrid.123}, \code{prid.456}).}
}
\if{html}{\out{}}
}
diff --git a/man/UmQcSumFile.Rd b/man/UmQcSumFile.Rd
index 5f81779..eaf8b83 100644
--- a/man/UmQcSumFile.Rd
+++ b/man/UmQcSumFile.Rd
@@ -12,7 +12,7 @@ Contains methods for reading and displaying contents of the
x <- "/path/to/snv_2015.tsv.gz"
d <- UmQcSumFile$new(x)
d_parsed <- d$read() # or read(d)
-d$write(d_parsed, out_dir = tempdir(), prefix = "sample705", out_format = "both")
+d$write(d_parsed, out_dir = tempdir(), prefix = "sample705", out_format = "tsv")
}
}
\section{Super class}{
@@ -56,7 +56,7 @@ A tibble.
Writes a tidy version of the \code{qc_summary.tsv.gz} QC summary file output
from umccrise.
\subsection{Usage}{
-\if{html}{\out{}}\preformatted{UmQcSumFile$write(d, out_dir, prefix, out_format = "tsv")}\if{html}{\out{
}}
+\if{html}{\out{}}\preformatted{UmQcSumFile$write(d, out_dir, prefix, out_format = "tsv", drid = NULL)}\if{html}{\out{
}}
}
\subsection{Arguments}{
@@ -68,8 +68,9 @@ from umccrise.
\item{\code{prefix}}{Prefix of output file(s).}
-\item{\code{out_format}}{Format of output file(s) (one of 'tsv' (def.),
-'parquet', 'both').}
+\item{\code{out_format}}{Format of output file(s).}
+
+\item{\code{drid}}{dracarys ID to use for the dataset (e.g. \code{wfrid.123}, \code{prid.456}).}
}
\if{html}{\out{}}
}
diff --git a/man/UmSigsSnvFile.Rd b/man/UmSigsSnvFile.Rd
index 7a21553..78480fd 100644
--- a/man/UmSigsSnvFile.Rd
+++ b/man/UmSigsSnvFile.Rd
@@ -12,7 +12,7 @@ Contains methods for reading and displaying contents of the
x <- "/path/to/snv_2015.tsv.gz"
d <- UmSigsSnvFile$new(x)
d_parsed <- d$read() # or read(d)
-d$write(d_parsed, out_dir = tempdir(), prefix = "sample705", out_format = "both")
+d$write(d_parsed, out_dir = tempdir(), prefix = "sample705", out_format = "tsv")
}
}
\section{Super class}{
@@ -67,8 +67,9 @@ Writes a tidy version of the \code{snv_20XX.tsv.gz} signature file output from u
\item{\code{prefix}}{Prefix of output file(s).}
-\item{\code{out_format}}{Format of output file(s) (one of 'tsv' (def.),
-'parquet', 'both').}
+\item{\code{out_format}}{Format of output file(s).}
+
+\item{\code{drid}}{dracarys ID to use for the dataset (e.g. \code{wfrid.123}, \code{prid.456}).}
}
\if{html}{\out{}}
}
diff --git a/man/glims_read.Rd b/man/glims_read.Rd
new file mode 100644
index 0000000..502df9a
--- /dev/null
+++ b/man/glims_read.Rd
@@ -0,0 +1,14 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/utils.R
+\name{glims_read}
+\alias{glims_read}
+\title{Read Google LIMS}
+\usage{
+glims_read()
+}
+\value{
+Tibble with all columns and rows from the Google LIMS spreadsheet.
+}
+\description{
+Reads UMCCR's Google LIMS spreadsheet.
+}