diff --git a/DESCRIPTION b/DESCRIPTION index cfee9249..2cce1f20 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -43,7 +43,7 @@ Imports: methods, R.utils, stats -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Suggests: testthat, covr, diff --git a/NEWS.md b/NEWS.md index d5428ba1..dd697d0e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -23,6 +23,10 @@ * `normalise()` now correctly works with grouped data. Previously it would only correctly work with ungrouped data frames. Now you can group the data to calculate group specific normalisations. If you want to compute a global normalisation for the dataset, you need to ungroup the data before using the function as usual. This fixes issue #209. * `qc_sequence_coverage()` now correctly displays medians in faceted plot. This fixes issue #202 and #213. +## Additional changes + +* `fetch_uniprot()` now returns nothing instead of a partial output if some of the requested batches could not be retrieved due to database issues (e.g. timeout because of too many requests). This addresses issue #203, which requests this change, because the warning message regarding the partial output can be easily missed and users might wrongfully assume that all information was retrieved successfully from UniProt. + # protti 0.7.0 ## New features diff --git a/R/fetch_uniprot.R b/R/fetch_uniprot.R index e288bc45..b739755a 100644 --- a/R/fetch_uniprot.R +++ b/R/fetch_uniprot.R @@ -54,9 +54,6 @@ fetch_uniprot <- return(invisible(NULL)) } . <- NULL - if (show_progress) { - message("Please note that some column names have changed due to UniProt updating its API! This might cause errors in your code. You can fix it by replacing the old column names with new ones.") - } if (batchsize > 500) { stop("Please provide a batchsize that is smaller or equal to 500!") } @@ -148,6 +145,11 @@ They were fetched and the original input ID can be found in the "input_id" colum return(invisible(NULL)) } + if (length(error_list) != 0) { + message("Not all of the requested information could be retrieved. Nothing instead of a partial output is returned.") + return(invisible(NULL)) + } + result <- result %>% purrr::map_dfr( .f = ~.x diff --git a/R/fetch_uniprot_proteome.R b/R/fetch_uniprot_proteome.R index 318c0494..fea8eeb6 100644 --- a/R/fetch_uniprot_proteome.R +++ b/R/fetch_uniprot_proteome.R @@ -28,7 +28,6 @@ fetch_uniprot_proteome <- if (length(organism_id) == 0) { stop("No valid organism ID found.") } - message("Please note that some column names have changed due to UniProt updating its API! This might cause errors in your code. You can fix it by replacing the old column names with new ones.") if (length(columns) > 4) { warning(strwrap("We suggest to use the fetch_uniprot function to fetch more than four columns.", prefix = "\n", initial = ""