Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #203 #234

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Imports:
methods,
R.utils,
stats
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Suggests:
testthat,
covr,
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions R/fetch_uniprot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
}
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion R/fetch_uniprot_proteome.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
Loading