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

issue #27 convert to gwasglue2 summaryset inside gwasvcf package #28

Merged

Conversation

ritarasteiro
Copy link
Collaborator

  • new feature: creating a gwasglue2 SummarySet from a vcf file.
  • added new section to guide

NOTE:

  • There is an error when creating the vignette, related with the as_tibble function.
  • when investigating further, the error was in query_gwas, when proxies = yes. I added name_repair="minimal" to all the calls of as_tibble() in proxy.r without it, but it still is given an error. Need to further investigate.
  • @explodecomputer Am I missing something?

ERRORS:

  • error when running check()
    ``--- re-building ‘guide.Rmd’ using rmarkdown
    /usr/bin/sqlite3

    Quitting from lines 271-273 [unnamed-chunk-28] (guide.Rmd)
    Error: processing vignette 'guide.Rmd' failed with diagnostics:
    The validate argument of as_tibble() was deprecated in tibble 2.0.0
    and is now defunct.
    ℹ Please use the .name_repair argument instead.
    --- failed re-building ‘guide.Rmd’

    SUMMARY: processing the following file failed:
    ‘guide.Rmd’

    Error: Vignette re-building failed.
    Execution halted
    Error in (function (command = NULL, args = character(), error_on_status = TRUE, …:
    ! System command 'R' failed``

  • error when running code in the vignette:
    Error: ! The validateargument ofas_tibble()was deprecated in tibble 2.0.0 and is now defunct. ℹ Please use the.name_repair` argument instead.
    Backtrace:

  1. gwasvcf::query_gwas(...)
  2. tibble:::as_tibble.data.frame(., .data, .name_repair = "minimal")
  3. lifecycle::deprecate_stop(...)
  4. lifecycle:::deprecate_stop0(msg)`

Trying to avoid error in checks:
(still not working)
- Quitting from lines 271-273 [unnamed-chunk-28] (guide.Rmd)
   Error: processing vignette 'guide.Rmd' failed with diagnostics:
   The `validate` argument of
 `as_tibble()` was deprecated in tibble 2.0.0
   and is now defunct.
  Please use the `.name_repair` argument instead.
@ritarasteiro ritarasteiro added the enhancement New feature or request label Aug 9, 2023
@ritarasteiro ritarasteiro linked an issue Aug 9, 2023 that may be closed by this pull request
@ritarasteiro ritarasteiro changed the title 27 convert to gwasglue2 summaryset inside gwasvcf package merge issue #27 convert to gwasglue2 summaryset inside gwasvcf package Aug 9, 2023
@ritarasteiro ritarasteiro changed the title merge issue #27 convert to gwasglue2 summaryset inside gwasvcf package issue #27 convert to gwasglue2 summaryset inside gwasvcf package Aug 9, 2023
R/gwasglue.R Outdated Show resolved Hide resolved
R/gwasglue.R Outdated Show resolved Hide resolved
R/proxy.r Outdated Show resolved Hide resolved
R/proxy.r Outdated Show resolved Hide resolved
@remlapmot
Copy link
Collaborator

Additionally on line 73 of R/proxy.R, as with last 2 comments recommend amending

temp <- do.call(rbind, strsplit(ld[["PHASE"]], "")) %>% dplyr::as_tibble(.data, .name_repair="minimal")

to simply

temp <- do.call(rbind, strsplit(ld[["PHASE"]], "")) %>% dplyr::as_tibble(.name_repair="minimal")

@remlapmot
Copy link
Collaborator

And the same deletion of .data, is needed on lines 109 and 111 of R/proxy.R as well I think.

@remlapmot
Copy link
Collaborator

So I think that's 5 instances of .data, to delete in total.

@remlapmot
Copy link
Collaborator

And I recommend adding yourself to the DESCRIPTION as a ctb at least.

@remlapmot
Copy link
Collaborator

And I recommend bumping the version number in the DESCRIPTION - we need to get better at remembering to do this in PRs.

@ritarasteiro
Copy link
Collaborator Author

Thanks @remlapmot! I made all the changes and also added a NEWS file.

@remlapmot
Copy link
Collaborator

This looks good to me @ritarasteiro .

My last super minor comment is that is usually format the DESCRIPTION by running usethis::use_tidy_description() - which will move gwasglue2 to be in alphabetical order in the Imports list.

Also I think this PR also fixes issue #25. I don't seem to have the rights to add to the Developer pane on this PR page - so I'll put the text below which may hopefully close that issue on merging this.

closes #25

@chenyangsu
Copy link

Hi MRCIEU team, Would it be possible to merge these pull requests soon? I'm using your package for a project for finding LD proxies but this error still remains.

Error:
! The validate argument of as_tibble() was deprecated in tibble 2.0.0 and is now defunct.
ℹ Please use the .name_repair argument instead.

In addition, I was able to bypass the error by installing the branch with the new changes:

library(remotes)
install_github("MRCIEU/gwasvcf@27-convert-to-gwasglue2-summaryset-inside-gwasvcf-package")

However, after running
query_gwas(outcome_vcf, rsid=input_rsid, proxies="only", bfile=ld_file, build = "GRCh38", tag_kb = 1000, tag_r2=0.8) there's another error at the align step:

Determining searchspace...
Proxy lookup...
Finding proxies...
Taking input= as a system command ('gunzip -c /tmp/RtmpnitEtI/file3098e72a46191.targets.ld.gz') and a variable has been used in the expression passed to `input=`. Please use fread(cmd=...). There is a security concern if you are creating an app, and the app could have a malicious user, and the app is not running in a secure environment; e.g. the app is running as root. Please read item 5 in the NEWS file for v1.11.6 for more information and for the option to suppress this message.
Found 24 proxies
Extrating proxies...
Identified proxies for 1 of 1 rsids
Aligning...
Error in all_dims[, 1L] : incorrect number of dimensions

Would it be possible to solve this issue? Thanks a lot!

@remlapmot
Copy link
Collaborator

@ritarasteiro / @explodecomputer please merge #31 (if you're happy to) into this branch then merge this into master.

(Note that both of these still don't fix #26 which we'll have to fix after this).

Copy link
Collaborator

@remlapmot remlapmot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me now.

@remlapmot
Copy link
Collaborator

Thanks for merging #31 @ritarasteiro - note the checks here are just failing because the OpenGWAS server is under heavy load.

Also - it's worth noting I don't have any permissions on this repo - so I can't merge your PRs (even if I approve them - I just checked by approving this one, but I didn't obtain the Merge button). I'd be happy to merge this if you or @explodecomputer want to give me permission in the repo (I could be a backup for Gib when he's busy).

@ritarasteiro
Copy link
Collaborator Author

@remlapmot I just added you with maintainer permissions.

The checks appear to fail when trying to install genetics.binaRies in the guide and in ubuntu. I am also having some problems when trying to install this package locally.

@remlapmot
Copy link
Collaborator

@remlapmot I just added you with maintainer permissions.

thanks

The checks appear to fail when trying to install genetics.binaRies in the guide and in ubuntu. I am also having some problems when trying to install this package locally.

Great spot - the genetics.binaRies download fail is because Gib moved that repo from being under his account to under the MRCIEU org. Usually GitHub automatically redirects URLs of moved repos - and if you go to the old repo address it does indeed redirect. However it seems maybe there are some instances where the redirection doesn't occur. So I will send a little fix to genetics.binaRies to use the new-ish MRCIEU address before merging this.

@ritarasteiro ritarasteiro reopened this Sep 5, 2023
@remlapmot
Copy link
Collaborator

@explodecomputer - merging this as it seems good to me.

@remlapmot remlapmot merged commit 477b365 into master Sep 5, 2023
6 of 10 checks passed
@ritarasteiro ritarasteiro deleted the 27-convert-to-gwasglue2-summaryset-inside-gwasvcf-package branch September 20, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

convert to gwasglue2 summaryset inside gwasvcf package
3 participants