Commit 96dde8eb authored by Laura Denies's avatar Laura Denies
Browse files

Update AMR_MGE.R

parent 357dd754
...@@ -76,7 +76,14 @@ VirSorter$ContigID <- sprintf("%010d", VirSorter$ContigID) ...@@ -76,7 +76,14 @@ VirSorter$ContigID <- sprintf("%010d", VirSorter$ContigID)
## Combine Phage prediction ## Combine Phage prediction
Phage_prediction <- merge(VirFinder, VirSorter, by="ContigID", all = TRUE) Phage_prediction <- merge(VirFinder, VirSorter, by="ContigID", all = TRUE)
Phage_prediction$VirSorter_prediction <- fct_explicit_na(Phage_prediction$VirSorter_prediction, na_level = "-") #Phage_prediction$VirSorter_prediction <- fct_explicit_na(Phage_prediction$VirSorter_prediction, na_level = "-")
if(all(is.na(Phage_prediction$VirSorter_prediction))){
# issue #39
Phage_prediction$VirSorter_prediction <- factor(rep("-", nrow(Phage_prediction)))
} else {
Phage_prediction$VirSorter_prediction <- fct_explicit_na(Phage_prediction$VirSorter_prediction, na_level = "-")
}
# Combine AMR/MGE with Phage prediction # Combine AMR/MGE with Phage prediction
AMR_MGE <- merge(AMR_Plasmid, Phage_prediction, by="ContigID", all = TRUE) AMR_MGE <- merge(AMR_Plasmid, Phage_prediction, by="ContigID", all = TRUE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment