Skip to content

Commit

Permalink
Fix double comma in skesa plasmid annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Phylloxera committed Aug 30, 2024
1 parent 59c3c1e commit 5b57ff9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions singfiles/metaclean.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ mydf<-read.delim("metadata.txt", row.names = NULL)
mydf <- mydf[,colSums(is.na(mydf))<nrow(mydf)]
cols_to_be_rectified <- names(mydf)[vapply(mydf, is.character, logical(1))]
mydf[, cols_to_be_rectified] <- lapply(mydf[, cols_to_be_rectified], trimws)
mydf[] <- lapply(mydf, sub, pattern = ",,", replacement = ",") #7/10/24 double commas in SkesaPlasList
mydf[] <- lapply(mydf, sub, pattern = ",$", replacement = "") #7/10/24 trailing commas in SkesaPlasList
write.table(mydf, "metadata.txt", sep="\t", na="", quote=F, row.names=F)

0 comments on commit 5b57ff9

Please sign in to comment.