Skip to content

Commit

Permalink
remove some messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
d-callan authored Nov 8, 2023
1 parent c86c680 commit ac6cb16
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions R/methods-Megastudy.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ setMethod('as.data.table', signature('StudySpecificVocabulariesByVariable'), fun
#should this be an s4 method?
findEntityIdColumnNameForVariableSpec <- function(varSpec, entityIdColumns) {
if (!inherits(varSpec, 'VariableSpec')) stop("The first argument must be of the S4 class `VariableSpec`.")
message("varSpec: ", veupathUtils::getColName(varSpec))

return(entityIdColumns[grepl(varSpec@entityId, entityIdColumns)])
}

Expand Down Expand Up @@ -275,9 +275,6 @@ setMethod('getDTWithImputedZeroes', signature = c('Megastudy', 'VariableMetadata

# !!!! this assumes entity ids are passed in order, from a single branch
# alternative would i guess be to make this class aware of the entity diagram
message("allEntityIdColumns: ", allEntityIdColumns)
message("varSpecEntityIdColName: ", varSpecEntityIdColName)
message("upstreamEntityIdColIndices: ", which(allEntityIdColumns %in% varSpecEntityIdColName)-1)
upstreamEntityIdColNames <- allEntityIdColumns[1:(which(allEntityIdColumns %in% varSpecEntityIdColName)-1)]
if (!all(allEntityIdColumns[!allEntityIdColumns %in% varSpecEntityIdColName] %in% upstreamEntityIdColNames)) {
# if we have downstream entities, it doesnt make sense to do all this work. plot.data will just remove the imputed values.
Expand Down Expand Up @@ -326,4 +323,4 @@ setMethod('getDTWithImputedZeroes', signature = c('Megastudy', 'VariableMetadata
veupathUtils::logWithTime("Added imputed values to table. Finished imputing zeroes.", verbose)

return(.dt)
})
})

0 comments on commit ac6cb16

Please sign in to comment.