Skip to content

Commit

Permalink
Merge pull request #42 from michaelgruenstaeudl/testing
Browse files Browse the repository at this point in the history
Debugging for small test datasets
  • Loading branch information
michaelgruenstaeudl authored May 21, 2024
2 parents 4f4cd99 + a4697db commit 3cac42c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ join_metadata_with_samplelist <- function(meta_data) {

normalize_metadata_names <- function(meta_data) {
# resolve spelling mistake
meta_data[which(meta_data$Samples == "Eragrostis_tef"), ]$`Assembly Method` <-
"Geneious"
if ("Eragrostis_tef" %in% meta_data$Samples) {
meta_data[which(meta_data$Samples == "Eragrostis_tef"), ]$`Assembly Method` <- "Geneious"
}

# unify assembly methods
nameList <- c(
Expand Down Expand Up @@ -125,10 +126,9 @@ normalize_metadata_names <- function(meta_data) {
)

for (i in 1:length(nameList)) {
meta_data$`Assembly Method`[grepl(nameList[i],
meta_data$`Assembly Method`,
ignore.case = TRUE)] <-
assignList[i]
if (nameList[i] %in% meta_data$`Assembly Method`) {
meta_data$`Assembly Method`[grepl(nameList[i], meta_data$`Assembly Method`, ignore.case = TRUE)] <- assignList[i]
}
}

# standardize sampling methods
Expand Down

0 comments on commit 3cac42c

Please sign in to comment.