Skip to content

Commit

Permalink
style: fix two lines with too long lines
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Sajid Imami <395482+AliSajid@users.noreply.github.com>
  • Loading branch information
AliSajid committed Nov 16, 2024
1 parent c8e9eb7 commit 4efdebf
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 39 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: drugfindR
Title: Investigate iLINCS for candidate repurposable drugs
Version: 0.99.1016
Version: 0.99.1017
Authors@R: c(
person(given = c("Ali", "Sajid"),
family = "Imami",
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ importFrom(stringr,str_glue)
importFrom(stringr,str_to_lower)
importFrom(tibble,as_tibble)
importFrom(tibble,tibble)
importFrom(utils,packageVersion)
7 changes: 5 additions & 2 deletions R/getConcordants.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@
#' @export
#'
#' @importFrom readr write_tsv
#' @importFrom httr2 request req_method req_url_query req_user_agent req_url_path_append req_perform resp_status resp_body_json resp_body_string
#' @importFrom httr2 request req_method req_url_query req_user_agent
#' @importFrom httr2 req_url_path_append req_perform resp_status
#' @importFrom httr2 resp_body_json resp_body_string
#' @importFrom purrr map flatten_dfr
#' @importFrom dplyr select any_of mutate filter
#' @importFrom tibble tibble
#' @importFrom rlang .data
#' @importFrom stringr str_glue
#' @importFrom curl form_file
#' @importFrom utils packageVersion
#'
#' @examples
#' # Get the L1000 signature for LINCSKD_28
Expand Down Expand Up @@ -64,7 +67,7 @@ getConcordants <- function(signature, ilincsLibrary = "CP") {
httr2::req_url_query(lib = libMap[ilincsLibrary]) |>
httr2::req_body_multipart(file = curl::form_file(signatureFile)) |>
httr2::req_method("POST") |>
httr2::req_user_agent(stringr::str_glue("drugfindR/v{packageVersion('drugfindR')}; https://github.com/CogDisResLab/drugfindR")) |>
httr2::req_user_agent(.return_user_agent()) |>
httr2::req_perform()

if (httr2::resp_status(request) == 200L) {
Expand Down
7 changes: 5 additions & 2 deletions R/getSignature.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@
#' @return a tibble with the L1000 Signature
#' @export
#'
#' @importFrom httr2 request req_method req_url_query req_user_agent req_url_path_append req_perform resp_status resp_body_json resp_body_string
#' @importFrom httr2 request req_method req_url_query req_user_agent
#' @importFrom httr2 req_url_path_append req_perform resp_status
#' @importFrom httr2 resp_body_json resp_body_string
#' @importFrom tibble tibble as_tibble
#' @importFrom rlang .data
#' @importFrom dplyr select
#' @importFrom purrr map_dfr
#' @importFrom S4Vectors DataFrame
#' @importFrom utils packageVersion
#'
#' @examples
#' # Get the L1000 signature for LINCSKD_28
Expand All @@ -38,7 +41,7 @@ getSignature <- function(sigId, l1000 = TRUE) {
httr2::req_url_path_append("downloadSignature") |>
httr2::req_url_query(sigID = sigId, noOfTopGenes = numGenes) |>
httr2::req_method("POST") |>
httr2::req_user_agent("drugfindR/v0.99.980; https://github.com/CogDisResLab/drugfindR") |>
httr2::req_user_agent(.return_user_agent()) |>
httr2::req_perform()


Expand Down
8 changes: 8 additions & 0 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,11 @@ loadMetadata <- function(lib) {

libMap[lib]
}

#' Return a string suitable as a User-Agent for the iLINCS API
#'
#' @keywords internal
#' @return a string
.return_user_agent <- function() {
paste0("drugfindR/", utils::packageVersion("drugfindR"), "; https://github.com/CogDisResLab/drugfindR")
}
41 changes: 7 additions & 34 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"codeRepository": "https://github.com/CogDisResLab/drugfindR",
"issueTracker": "https://github.com/CogDisResLab/drugfindR/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.99.1016",
"version": "0.99.1017",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand All @@ -17,10 +17,7 @@
"author": [
{
"@type": "Person",
"givenName": [
"Ali",
"Sajid"
],
"givenName": ["Ali", "Sajid"],
"familyName": "Imami",
"email": "Ali.Sajid.Imami@gmail.com",
"@id": "https://orcid.org/0000-0003-3684-3539"
Expand All @@ -34,10 +31,7 @@
},
{
"@type": "Person",
"givenName": [
"Justin",
"Fortune"
],
"givenName": ["Justin", "Fortune"],
"familyName": "Creeden",
"email": "Justin.Creeden@rockets.utoledo.edu",
"@id": "https://orcid.org/0000-0003-3123-8401"
Expand All @@ -46,10 +40,7 @@
"maintainer": [
{
"@type": "Person",
"givenName": [
"Ali",
"Sajid"
],
"givenName": ["Ali", "Sajid"],
"familyName": "Imami",
"email": "Ali.Sajid.Imami@gmail.com",
"@id": "https://orcid.org/0000-0003-3684-3539"
Expand Down Expand Up @@ -351,27 +342,9 @@
},
"applicationCategory": "Genomics",
"isPartOf": "https://bioconductor.org",
"keywords": [
"LINCS",
"iLINCS",
"drugrepurposing",
"drugdiscovery",
"transcriptomics",
"geneexpression",
"geneknockdown",
"geneoverexpression",
"chemicalperturbagen",
"drugfindR",
"r",
"ilincs",
"bioinformatics",
"bioinformatics-pipeline"
],
"fileSize": "2087.188KB",
"keywords": ["LINCS", "iLINCS", "drugrepurposing", "drugdiscovery", "transcriptomics", "geneexpression", "geneknockdown", "geneoverexpression", "chemicalperturbagen", "drugfindR", "r", "ilincs", "bioinformatics", "bioinformatics-pipeline"],
"fileSize": "2087.859KB",
"readme": "https://github.com/CogDisResLab/drugfindR/blob/devel/README.md",
"contIntegration": [
"https://github.com/CogDisResLab/drugfindR/actions/workflows/rworkflows.yml",
"https://app.codecov.io/gh/CogDisResLab/drugfindR?branch=devel"
],
"contIntegration": ["https://github.com/CogDisResLab/drugfindR/actions/workflows/rworkflows.yml", "https://app.codecov.io/gh/CogDisResLab/drugfindR?branch=devel"],
"developmentStatus": "https://lifecycle.r-lib.org/articles/stages.html#experimental"
}
15 changes: 15 additions & 0 deletions man/dot-return_user_agent.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4efdebf

Please sign in to comment.