Skip to content

Commit

Permalink
Merge pull request #45 from VEuPathDB/16s-collection-names
Browse files Browse the repository at this point in the history
add region to 16s collection names
  • Loading branch information
d-callan authored Apr 16, 2024
2 parents 7635c41 + fb56c66 commit 591a19c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/internal-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ findCollectionIds <- function(dataColNames) {
#' @export
findRecordIdColumn <- function(dataColNames) {
# for now assume were working w bulk download files, which means its the first column
allIdColumns <- dataColNames[grepl("_Id", dataColNames, fixed=TRUE)]
allIdColumns <- dataColNames[grepl("_Id$", dataColNames)]
return(allIdColumns[1])
}

#' @export
findAncestorIdColumns <- function(dataColNames) {
# for now assume were working w bulk download files, which means they have '_Id'
allIdColumns <- dataColNames[grepl("_Id", dataColNames, fixed=TRUE)]
allIdColumns <- dataColNames[grepl("_Id$", dataColNames)]
if (length(allIdColumns) == 1) {
return(character(0))
}
Expand Down Expand Up @@ -117,7 +117,7 @@ findCollectionDataColumns <- function(dataColNames, collectionId) {
#' @export
getCollectionName <- function(collectionId, dataSourceName, ontology = NULL) {
if (grepl("16S", dataSourceName, fixed=TRUE)) {
dataSourceName <- "16S"
dataSourceName <- paste("16S", regmatches(dataSourceName,regexpr("(\\(.*?)\\)",dataSourceName)))
}

if (grepl("Metagenomic", dataSourceName, fixed=TRUE)) {
Expand Down

0 comments on commit 591a19c

Please sign in to comment.