Skip to content

Commit

Permalink
Set lumen group first to prevent potential inclusion from other groups
Browse files Browse the repository at this point in the history
  • Loading branch information
pchelle committed Nov 22, 2023
1 parent 896ed75 commit 103abbd
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions R/utilities-mass-balance.R
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,12 @@ defaultMassBalanceGroupings <- function(compoundNames) {
)

defaultGroupings <- c(
# Lumen Compartment excluding Feces
list(list(
Name = paste(paste(compoundNames, collapse = ", "), "Lumen", sep = " - "),
Include = paste0("Organism|Lumen|*|", compoundNames),
Exclude = paste0("Organism|Lumen|Feces|", compoundNames)
)),
lapply(
groupNames,
function(groupName) {
Expand All @@ -463,23 +469,15 @@ defaultMassBalanceGroupings <- function(compoundNames) {
)
}
),
list(
# Lumen Compartment excluding Feces
list(
Name = paste(paste(compoundNames, collapse = ", "), "Lumen", sep = " - "),
Include = paste0("Organism|Lumen|*|", compoundNames),
Exclude = paste0("Organism|Lumen|Feces|", compoundNames)
),
# Rest Compartment
list(
# Rest Compartment
list(list(
Name = paste("Rest of", paste(compoundNames, collapse = ", ")),
# Since default option excludes previously included paths,
# we can include all the paths but saliva here
Include = paste0("Organism|**|", compoundNames),
# Exclude saliva from rest
Exclude = paste0("Organism|Saliva|**|", compoundNames)
)
)
))
)
return(defaultGroupings)
}

0 comments on commit 103abbd

Please sign in to comment.