@@ -2189,6 +2189,7 @@ PerformAsariResultsFormating <- function(minFrac = 0.7){
21892189
21902190 all_recrds <- ftab_annotation $ matched_DB_records
21912191 all_forumus <- sapply(all_recrds , function (x ){
2192+ if (is.na(x )){return (" " )}
21922193 res <- strsplit(x , " \\ ), \\ (" )
21932194 if (length(res [[1 ]]) == 0 ){
21942195 return (" " )
@@ -2208,6 +2209,7 @@ PerformAsariResultsFormating <- function(minFrac = 0.7){
22082209
22092210 all_cmpds <- ftab_annotation $ matched_DB_shorts
22102211 all_cmpd <- sapply(all_cmpds , function (x ){
2212+ if (is.na(x )){return (" " )}
22112213 res <- strsplit(x , " \\ ), \\ (" )
22122214 if (length(res [[1 ]]) == 0 ){
22132215 return (" " )
@@ -2239,6 +2241,7 @@ PerformAsariResultsFormating <- function(minFrac = 0.7){
22392241 }
22402242 })
22412243 all_hmdb <- sapply(all_cmpds , function (x ){
2244+ if (is.na(x )){return (" " )}
22422245 res <- strsplit(x , " \\ ), \\ (" )
22432246 if (length(res [[1 ]]) == 0 ){
22442247 return (" " )
@@ -2270,6 +2273,8 @@ PerformAsariResultsFormating <- function(minFrac = 0.7){
22702273 }
22712274 })
22722275
2276+ ftab_annotation $ matched_DB_records [is.na(ftab_annotation $ matched_DB_records )] <- " "
2277+
22732278 Formula2Cmpd_list <- lapply(1 : length(all_recrds ), function (x ){
22742279 res <- list ()
22752280 if (ftab_annotation $ matched_DB_records [x ] == " " ){
0 commit comments