-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64643bc
commit b0a41b3
Showing
108 changed files
with
5,867 additions
and
4,376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#------------------------------------------------------------------------------- | ||
# tcplLoadConcUnit: Load concentration units for assay endpoints | ||
#------------------------------------------------------------------------------- | ||
|
||
#' @title Load concentration units for assay endpoints | ||
#' | ||
#' @description | ||
#' \code{tcplLoadUnit} queries the tcpl databases and returns a data.table | ||
#' with the concentration units for the given assay endpoint ids (spid). | ||
#' | ||
#' @param spid Integer, assay endpoint ids | ||
#' | ||
#' @return A data.table containing level 3 correction methods for the given | ||
#' spids. | ||
#' | ||
#' @seealso \code{\link{tcplQuery}}, \code{\link{data.table}} | ||
#' | ||
#' @import data.table | ||
|
||
tcplLoadConcUnit <- function(spid) { | ||
|
||
qformat <- | ||
" | ||
SELECT | ||
spid, | ||
tested_conc_unit AS conc_unit | ||
FROM | ||
sample | ||
WHERE | ||
spid IN ('%s'); | ||
" | ||
|
||
qstring <- sprintf(qformat, paste(spid, collapse = "','")) | ||
|
||
dat <- tcplQuery(query = qstring, db = getOption("TCPL_DB"), tbl=c("sample")) | ||
|
||
if (nrow(dat) == 0) { | ||
#warning("The given spid(s) do not have concentration units.") | ||
return(dat) | ||
} | ||
|
||
len_miss <- lw(!spid %in% dat$spid) | ||
if (len_miss > 0) { | ||
#warning(len_miss, " of the given spid(s) do not have concentration units.") | ||
} | ||
|
||
dat[] | ||
|
||
} | ||
|
||
#------------------------------------------------------------------------------- |
Oops, something went wrong.