diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..390c873 --- /dev/null +++ b/.gitignore @@ -0,0 +1,104 @@ +# hidden files +.* +!.gitignore + +# History files +.Rhistory +.Rapp.history + +# Session Data files +*.RData +*.rds +*.RDS +*.dictionary.html + +# tag files +tags + +# Example code in package build process +*-Ex.R + +# Output files from R CMD build +/*.tar.gz + +# Output files from R CMD check +/*.Rcheck/ + +# RStudio files +.Rprofile +.Rproj.user +.Rproj.user/ +.Ruserdata + +# produced vignettes +vignettes/*.html +vignettes/*.pdf + +# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 +.httr-oauth + +# knitr and R markdown default cache directories +*_cache/ +/cache/ + +# Temporary files created by R markdown +*.utf8.md +*.knit.md + +# R Environment Variables +.Renviron + +# System files +*.DS_Store + +# vim files +*~ + +# python +venv/ +*.egg-info/* +__pycache__ + +# Results +_archived +*.zip +*.sample + +# Temp files +_gsdata_/ +~ +\~$* + +# Data +*.sav +*.sas7bdat +*.log +*.csv + + +# PolarMorphism +# PolarMorphism/eur_w_ld_chr* +# PolarMorphism/proxySearch_CAC_CAD* + +.Rhistory +.Rprofile +*.csv +*.sav +*.sas7bdat +*.xlsx +*.xls +*.pdf +*.fff +*.log +*.tex +.Rhistory +.Rprofile +*.csv +*.sav +*.sas7bdat +*.xlsx +*.xls +*.pdf +*.fff +*.log +*.tex diff --git a/EndoMT_in_AE.Rproj b/EndoMT_in_AE.Rproj new file mode 100644 index 0000000..8e3c2eb --- /dev/null +++ b/EndoMT_in_AE.Rproj @@ -0,0 +1,13 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cfe676c --- /dev/null +++ b/LICENSE @@ -0,0 +1,403 @@ +Attribution-NonCommercial-NoDerivatives 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 +International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-NonCommercial-NoDerivatives 4.0 International Public +License ("Public License"). To the extent this Public License may be +interpreted as a contract, You are granted the Licensed Rights in +consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the +Licensor receives from making the Licensed Material available under +these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + c. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + d. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + e. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + f. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + g. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + h. NonCommercial means not primarily intended for or directed towards + commercial advantage or monetary compensation. For purposes of + this Public License, the exchange of the Licensed Material for + other material subject to Copyright and Similar Rights by digital + file-sharing or similar means is NonCommercial provided there is + no payment of monetary compensation in connection with the + exchange. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part, for NonCommercial purposes only; and + + b. produce and reproduce, but not Share, Adapted Material + for NonCommercial purposes only. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties, including when + the Licensed Material is used other than for NonCommercial + purposes. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material, You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + For the avoidance of doubt, You do not have permission under + this Public License to Share Adapted Material. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database for NonCommercial purposes + only and provided You do not Share Adapted Material; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. + diff --git a/README.md b/README.md index f42fd9c..2164b68 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,24 @@ -# Readme +# EndoMT in the Athero-Express. + +*Athero-Express Team* + +Lotte Slenders, +Sander W. van der Laan, +Michal Mokry, +Dominique de Kleijn, +Gert Jan de Borst. + +**Project ID** [`EndoMT_in_AE`] + + +## Background + +Here we study endoMT in carotid plaques from the Athero-Express. + +## Study design + + + @@ -9,22 +29,16 @@ You can load this project in RStudio by opening the file called 'EndoMT_in_AE.Rp ## Project structure -File | Description | Usage ------------------- | -------------------------- | -------------- -README.md | Description of project | Human editable -EndoMT_in_AE.Rproj | Project file | Loads project -LICENSE | User permissions | Read only -.worcs | WORCS metadata YAML | Read only -prepare_data.R | Script to process raw data | Human editable -renv.lock | Reproducible R environment | Read only -File | Description | Usage ------------------- | -------------------------- | -------------- -README.md | Description of project | Human editable -EndoMT_in_AE.Rproj | Project file | Loads project -LICENSE | User permissions | Read only -.worcs | WORCS metadata YAML | Read only -prepare_data.R | Script to process raw data | Human editable -renv.lock | Reproducible R environment | Read only +File | Description | Usage +---------------------------| ----------------------------------- | -------------- +README.md | Description of project | Human editable +EndoMT_in_AE.Rproj | Project file | Loads project +LICENSE | User permissions | Read only +.worcs | WORCS metadata YAML | Read only +renv.lock | Reproducible R environment | Read only +images | image directory for project | Human editable +scripts | Scripts directory | Human editable + @@ -52,3 +66,53 @@ Please refer to the vignette on [reproducing a WORCS project]() for step by step + +# Acknowledgements + +Dr. Sander W. van der Laan is funded through grants from the Netherlands CardioVascular Research Initiative of the Netherlands Heart Foundation (CVON 2011/B019 and CVON 2017-20: Generating the best evidence-based pharmaceutical targets for atherosclerosis [GENIUS I&II]). We are thankful for the support of the ERA-CVD program ‘druggable-MI-targets’ (grant number: 01KL1802), the EU H2020 TO_AITION (grant number: 848146), and the Leducq Fondation ‘PlaqOmics’. + +Plaque samples are derived from carotid endarterectomies as part of the [Athero-Express Biobank Study](https://doi.org/10.1007/s10564-004-2304-6) which is an ongoing study in the UMC Utrecht. + +The framework was based on the [`WORCS` package](https://osf.io/zcvbs/). + + + +#### Changes log + + _Version:_ v1.0.0
+ _Last update:_ 2022-11-08
+ _Written by:_ Lotte Slenders; Sander W. van der Laan (s.w.vanderlaan-2[at]umcutrecht.nl). + + **MoSCoW To-Do List** + The things we Must, Should, Could, and Would have given the time we have. + _M_ + + _S_ + + _C_ + + _W_ + + **Changes log** + * v1.0.0 Initial version. + +-------------- + +#### Creative Commons BY-NC-ND 4.0 +##### Copyright (c) 1979-2022 Lotte Slenders | Sander W. van der Laan | s.w.vanderlaan [at] gmail [dot] com. + +This is a human-readable summary of (and not a substitute for) the [license](LICENSE). +
+You are free to share, copy and redistribute the material in any medium or format. The licencor cannot revoke these freedoms as long as you follow the license terms.
+
+Under the following terms:
+- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
+- NonCommercial — You may not use the material for commercial purposes.
+- NoDerivatives — If you remix, transform, or build upon the material, you may not distribute the modified material.
+- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
+
+Notices:
+You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material. + + diff --git a/Scripts/colors.R b/Scripts/colors.R new file mode 100755 index 0000000..e0c7651 --- /dev/null +++ b/Scripts/colors.R @@ -0,0 +1,65 @@ +################################################################################ +# PROJECT COLORS # +################################################################################ + +### UtrechtScienceParkColoursScheme +### +### WebsitetoconvertHEXtoRGB:http://hex.colorrrs.com. +### Forsomefunctionsyoushoulddividethesenumbersby255. +### +### No. Color HEX (RGB) CHR MAF/INFO +###--------------------------------------------------------------------------------------- +### 1 yellow #FBB820 (251,184,32) => 1 or 1.0>INFO +### 2 gold #F59D10 (245,157,16) => 2 +### 3 salmon #E55738 (229,87,56) => 3 or 0.05 4 +### 5 lightpink #E35493 (227,84,147) => 5 or 0.8 6 +### 7 hardpink #CC0071 (204,0,113) => 7 +### 8 lightpurple #A8448A (168,68,138) => 8 +### 9 purple #9A3480 (154,52,128) => 9 +### 10 lavendel #8D5B9A (141,91,154) => 10 +### 11 bluepurple #705296 (112,82,150) => 11 +### 12 purpleblue #686AA9 (104,106,169) => 12 +### 13 lightpurpleblue #6173AD (97,115,173/101,120,180) => 13 +### 14 seablue #4C81BF (76,129,191) => 14 +### 15 skyblue #2F8BC9 (47,139,201) => 15 +### 16 azurblue #1290D9 (18,144,217) => 16 or 0.01 17 +### 18 greenblue #15A6C1 (21,166,193) => 18 +### 19 seaweedgreen #5EB17F (94,177,127) => 19 +### 20 yellowgreen #86B833 (134,184,51) => 20 +### 21 lightmossgreen #C5D220 (197,210,32) => 21 +### 22 mossgreen #9FC228 (159,194,40) => 22 or MAF>0.20 or 0.6 23/X +### 24 green #49A01D (73,160,29) => 24/Y +### 25 grey #595A5C (89,90,92) => 25/XY or MAF<0.01 or 0.0 26/MT +### +### ADDITIONAL COLORS +### 27 midgrey #D7D8D7 +### 28 verylightgrey #ECECEC" +### 29 white #FFFFFF +### 30 black #000000 +###---------------------------------------------------------------------------------------------- + +uithof_color = c("#FBB820","#F59D10","#E55738","#DB003F","#E35493","#D5267B", + "#CC0071","#A8448A","#9A3480","#8D5B9A","#705296","#686AA9", + "#6173AD","#4C81BF","#2F8BC9","#1290D9","#1396D8","#15A6C1", + "#5EB17F","#86B833","#C5D220","#9FC228","#78B113","#49A01D", + "#595A5C","#A2A3A4", "#D7D8D7", "#ECECEC", "#FFFFFF", "#000000") + +uithof_color_legend = c("#FBB820", "#F59D10", "#E55738", "#DB003F", "#E35493", + "#D5267B", "#CC0071", "#A8448A", "#9A3480", "#8D5B9A", + "#705296", "#686AA9", "#6173AD", "#4C81BF", "#2F8BC9", + "#1290D9", "#1396D8", "#15A6C1", "#5EB17F", "#86B833", + "#C5D220", "#9FC228", "#78B113", "#49A01D", "#595A5C", + "#A2A3A4", "#D7D8D7", "#ECECEC", "#FFFFFF", "#000000") + +#ggplot2 default color palette +gg_color_hue <- function(n) { + hues = seq(15, 375, length = n + 1) + hcl(h = hues, l = 65, c = 100)[1:n] +} + +### ---------------------------------------------------------------------------- \ No newline at end of file diff --git a/Scripts/create_worcs.R b/Scripts/create_worcs.R new file mode 100644 index 0000000..6914ef4 --- /dev/null +++ b/Scripts/create_worcs.R @@ -0,0 +1,9 @@ +worcs::worcs_project( + path = ".", # the current folder + manuscript = "none", # edit this if you want a manuscript + preregistration = "none", # edit this if you want a preregistration + add_license = "CC_BY-NC-ND_4.0", + use_renv = TRUE, + remote_repo = "git@github.com:CirculatoryHealth/EndoMT_in_AE.git", # add git repo + verbose = TRUE +) \ No newline at end of file diff --git a/Scripts/functions.R b/Scripts/functions.R new file mode 100755 index 0000000..0ad7749 --- /dev/null +++ b/Scripts/functions.R @@ -0,0 +1,550 @@ +################################################################################ +# GENERAL FUNCTIONS +################################################################################ + +# Auto installer +install.packages.auto <- function(x) { + x <- as.character(substitute(x)) + if(isTRUE(x %in% .packages(all.available = TRUE))) { + eval(parse(text = sprintf("require(\"%s\")", x))) + } else { + # Update installed packages - this may mean a full upgrade of R, which in turn + # may not be warrented. + #update.install.packages.auto(ask = FALSE) + eval(parse(text = sprintf("install.packages(\"%s\", dependencies = TRUE, repos = \"https://cloud.r-project.org/\")", x))) + } + if(isTRUE(x %in% .packages(all.available = TRUE))) { + eval(parse(text = sprintf("require(\"%s\")", x))) + } else { + if (!requireNamespace("BiocManager")) + install.packages("BiocManager") + BiocManager::install() # this would entail updating installed packages, which in turned may not be warrented + + # Code for older versions of R (<3.5.0) + # source("http://bioconductor.org/biocLite.R") + # Update installed packages - this may mean a full upgrade of R, which in turn + # may not be warrented. + # biocLite(character(), ask = FALSE) + eval(parse(text = sprintf("BiocManager::install(\"%s\")", x))) + eval(parse(text = sprintf("require(\"%s\")", x))) + } +} + + +################################################################################ +# (GENERAL) LINEAR/LOGISTIC MODELING +################################################################################ +# Function to grep data from glm()/lm() + +### CONTINUOUS TRAITS +GLM.CON <- function(fit, DATASET, x_name, y, verbose=c(TRUE,FALSE)){ + cat("Analyzing in dataset '", DATASET ,"' the association of '", x_name ,"' with '", y ,"' .\n") + if (nrow(summary(fit)$coefficients) == 1) { + output = c(DATASET, x_name, y, rep(NA,8)) + cat("Model not fitted; probably singular.\n") + }else { + cat("Collecting data.\n\n") + effectsize = summary(fit)$coefficients[2,1] + SE = summary(fit)$coefficients[2,2] + OReffect = exp(summary(fit)$coefficients[2,1]) + CI_low = exp(effectsize - 1.96 * SE) + CI_up = exp(effectsize + 1.96 * SE) + tvalue = summary(fit)$coefficients[2,3] + pvalue = summary(fit)$coefficients[2,4] + R = summary(fit)$r.squared + R.adj = summary(fit)$adj.r.squared + sample_size = nrow(model.frame(fit)) + N = study.samplesize + Perc_Miss = 100 - ((sample_size * 100)/N) + + output = c(DATASET, x_name, y, effectsize, SE, OReffect, CI_low, CI_up, tvalue, pvalue, R, R.adj, N, sample_size, Perc_Miss) + + if (verbose == TRUE) { + cat("We have collected the following and summarize it in an object:\n") + cat("Dataset...................:", DATASET, "\n") + cat("Score/Exposure/biomarker..:", x_name, "\n") + cat("Trait/outcome.............:", y, "\n") + cat("Effect size...............:", round(effectsize, 6), "\n") + cat("Standard error............:", round(SE, 6), "\n") + cat("Odds ratio (effect size)..:", round(OReffect, 3), "\n") + cat("Lower 95% CI..............:", round(CI_low, 3), "\n") + cat("Upper 95% CI..............:", round(CI_up, 3), "\n") + cat("T-value...................:", round(tvalue, 6), "\n") + cat("P-value...................:", signif(pvalue, 8), "\n") + cat("R^2.......................:", round(R, 6), "\n") + cat("Adjusted r^2..............:", round(R.adj, 6), "\n") + cat("Sample size of AE DB......:", N, "\n") + cat("Sample size of model......:", sample_size, "\n") + cat("Missing data %............:", round(Perc_Miss, 6), "\n") + } else { + cat("Collecting data in summary object.\n") + } + } + return(output) + print(output) +} + +### BINARY TRAITS +GLM.BIN <- function(fit, DATASET, x_name, y, verbose=c(TRUE,FALSE)){ + cat("Analyzing in dataset '", DATASET ,"' the association of '", x_name ,"' with '", y ,"' ...\n") + if (nrow(summary(fit)$coefficients) == 1) { + output = c(DATASET, x_name, y, rep(NA,9)) + cat("Model not fitted; probably singular.\n") + }else { + cat("Collecting data...\n") + effectsize = summary(fit)$coefficients[2,1] + SE = summary(fit)$coefficients[2,2] + OReffect = exp(summary(fit)$coefficients[2,1]) + CI_low = exp(effectsize - 1.96 * SE) + CI_up = exp(effectsize + 1.96 * SE) + zvalue = summary(fit)$coefficients[2,3] + pvalue = summary(fit)$coefficients[2,4] + dev <- fit$deviance + nullDev <- fit$null.deviance + modelN <- length(fit$fitted.values) + R.l <- 1 - dev / nullDev + R.cs <- 1 - exp(-(nullDev - dev) / modelN) + R.n <- R.cs / (1 - (exp(-nullDev/modelN))) + sample_size = nrow(model.frame(fit)) + N = study.samplesize + Perc_Miss = 100 - ((sample_size * 100)/N) + + output = c(DATASET, x_name, y, effectsize, SE, OReffect, CI_low, CI_up, zvalue, pvalue, R.l, R.cs, R.n, N, sample_size, Perc_Miss) + if (verbose == TRUE) { + cat("We have collected the following and summarize it in an object:\n") + cat("Dataset...................:", DATASET, "\n") + cat("Score/Exposure/biomarker..:", x_name, "\n") + cat("Trait/outcome.............:", y, "\n") + cat("Effect size...............:", round(effectsize, 6), "\n") + cat("Standard error............:", round(SE, 6), "\n") + cat("Odds ratio (effect size)..:", round(OReffect, 3), "\n") + cat("Lower 95% CI..............:", round(CI_low, 3), "\n") + cat("Upper 95% CI..............:", round(CI_up, 3), "\n") + cat("Z-value...................:", round(zvalue, 6), "\n") + cat("P-value...................:", signif(pvalue, 8), "\n") + cat("Hosmer and Lemeshow r^2...:", round(R.l, 6), "\n") + cat("Cox and Snell r^2.........:", round(R.cs, 6), "\n") + cat("Nagelkerke's pseudo r^2...:", round(R.n, 6), "\n") + cat("Sample size of AE DB......:", N, "\n") + cat("Sample size of model......:", sample_size, "\n") + cat("Missing data %............:", round(Perc_Miss, 6), "\n") + } else { + cat("Collecting data in summary object.\n") + } + } + return(output) + print(output) +} + + +################################################################################ +# REGIONAL ASSOCIATION PLOTTING +################################################################################ + + +# RACER singleRegionalAssocPlot +singlePlotRACER2 <- function (assoc_data, chr, build = "hg19", set = "protein_coding", + plotby, gene_plot = NULL, snp_plot = NULL, start_plot = NULL, + end_plot = NULL, label_lead = FALSE, + grey_colors = FALSE, + cred_set = FALSE, + gene_track_h = 3, gene_name_s = 2.5) { + if (missing(assoc_data)) { + stop("Please provide a data set to plot.") + } + else if (missing(chr)) { + stop("Please specify which chromosome you wish to plot.") + } + else if (missing(plotby)) { + stop("Please specify the method by which you wish to plot.") + } + else if (plotby == "gene") { + if (is.null(gene_plot)) { + stop("Please specify a gene to plot by.") + } + } + else if (plotby == "snp") { + if (is.null(snp_plot)) { + stop("Please specify a snp to plot by.") + } + } + else if (plotby == "coord") { + if (is.null(start_plot) | is.null(end_plot)) { + stop("Please specify start coordinate for plot.") + } + } + else { + message("All inputs are go.") + } + reqs = c("CHR", "POS", "LOG10P") + cols = colnames(assoc_data) + if (sum(reqs %in% cols) == 3) { + } + else { + stop("Association Data Set is missing a required column, please format your data set using formatRACER.R.") + } + reqs_2 = c("LD", "LD_BIN") + if (sum(reqs_2 %in% cols) == 2) { + } + else { + message("Association Data Set is missing LD data, the resulting plot won't have LD information, but you can add it using the ldRACER.R function.") + } + `%>%` <- magrittr::`%>%` + if (build == "hg38") { + utils::data(hg38) + chr_in = chr + colnames(hg38) = c("GENE_ID", "CHR", "TRX_START", "TRX_END", + "LENGTH", "GENE_NAME", "TYPE") + gene_sub = hg38[hg38$CHR == chr_in, ] + } + else if (build == "hg19") { + utils::data(hg19) + chr_in = chr + colnames(hg19) = c("GENE_ID", "CHR", "TRX_START", "TRX_END", + "LENGTH", "GENE_NAME", "TYPE") + gene_sub = hg19[hg19$CHR == chr_in, ] + } + if (set == "protein_coding") { + gene_sub = gene_sub[gene_sub$TYPE == "protein_coding", + ] + } + else { + gene_sub = gene_sub + } + if (sum(is.null(plotby)) == 1) { + stop("Please specify a method by which to plot.") + } + if (sum(is.null(plotby)) == 0) { + message("Plotting by...") + if ((plotby == "coord") == TRUE) { + message("coord") + start = start_plot + end = end_plot + } + else if ((plotby == "gene") == TRUE) { + message(paste("gene:", gene_plot)) + if (sum(is.null(gene_plot)) == 0) { + p = subset(gene_sub, gene_sub$GENE_NAME == gene_plot) + start = min(p$TRX_START) - 5e+05 + end = max(p$TRX_END) + 5e+05 + } + else { + message("No gene specified.") + } + } + else if ((plotby == "snp") == TRUE) { + message(paste("snp", snp_plot)) + q = assoc_data[assoc_data$RS_ID == snp_plot, ] + w = q$POS + w = as.numeric(as.character(w)) + start = w - 5e+05 + end = w + 5e+05 + } + } + gene_sub = subset(gene_sub, gene_sub$TRX_START > (start - + 50000)) + gene_sub = subset(gene_sub, gene_sub$TRX_END < (end + 50000)) + gene_sub = gene_sub[, c(3, 4, 6)] + gene_sub = reshape2::melt(gene_sub, id.vars = "GENE_NAME") + gene_sub$y_value = as.numeric(as.factor(gene_sub$GENE_NAME)) + plot_lab = subset(gene_sub, gene_sub$variable == "TRX_END") + message("Reading in association data") + in.dt <- as.data.frame(assoc_data) + in.dt$POS = as.numeric(as.character(in.dt$POS)) + in.dt$LOG10P = as.numeric(as.character(in.dt$LOG10P)) + in.dt$CHR = as.numeric(as.character(in.dt$CHR)) + in.dt = dplyr::filter(in.dt, .data$CHR == chr_in) + in.dt = dplyr::filter(in.dt, .data$POS > start) %>% dplyr::filter(.data$POS < + end) + if (label_lead == TRUE) { + message("Determining lead SNP") + lsnp_row = which(in.dt$LABEL == "LEAD") + label_data = in.dt[lsnp_row, ] + if (dim(label_data)[1] == 0) { + lsnp_row = in.dt[in.dt$LOG10P == max(in.dt$LOG10P), ] + label_data = lsnp_row[1, ] + } + } + + if (cred_set == TRUE) { + message("Collecting posterior probabilities") + ppsnp_row = which(in.dt$Posterior_Prob >= 0) + pp_data = in.dt[ppsnp_row, ] + if (dim(pp_data)[1] == 0) { + ppsnp_row = in.dt[in.dt$LOG10P == max(in.dt$LOG10P), ] + pp_data = ppsnp_row[1, ] + } + } + + + message("Generating Plot") + if ("LD" %in% colnames(in.dt) && "LD_BIN" %in% colnames(in.dt)) { + c = ggplot2::ggplot(gene_sub, ggplot2::aes_string(x = "value", + y = "y_value")) + ggplot2::geom_line(ggplot2::aes_string(group = "GENE_NAME"), + size = 2) + ggplot2::theme_minimal() + + ggplot2::geom_text(data = plot_lab, + ggplot2::aes_string(x = "value", y = "y_value", label = "GENE_NAME"), + hjust = -0.1, vjust = 0.3, + size = gene_name_s) + + ggplot2::theme(axis.title.y = ggplot2::element_text(color = "transparent", size = 28), + axis.text.y = ggplot2::element_blank(), + axis.ticks.y = ggplot2::element_blank(), + panel.border = element_blank(), + panel.grid.major = element_blank(), + panel.grid.minor = element_blank(), + axis.line.x = element_line(colour = "#595A5C")) + + ggplot2::xlab(paste0("chromosome ", + chr_in, " position")) + ggplot2::coord_cartesian(xlim = c(start, + end), ylim = c(0, (max(gene_sub$y_value) + 0.25))) + b = ggplot2::ggplot(in.dt, ggplot2::aes_string(x = "POS", + y = "LOG10P", color = "LD_BIN")) + ggplot2::geom_point() + + ggplot2::scale_colour_manual(values = c(`1.0-0.8` = "#DC0000FF", # "#DB003F", #"red", + `0.8-0.6` = "#F39B7FFF", # "#F59D10", #"darkorange1", + `0.6-0.4` = "#00A087FF", # "#49A01D", #"green1", + `0.4-0.2` = "#4DBBD5FF", # "#1290D9", #"skyblue1", + `0.2-0.0` = "#3C5488FF", # "#4C81BF", #"navyblue", + `NA` = "#A2A3A4" # "grey" + ), + drop = FALSE) + + labs(color = bquote(LD~r^2)) + + ggplot2::theme(panel.border = element_blank(), + panel.grid.major = element_blank(), + panel.grid.minor = element_blank(), + axis.line.x = element_blank(), + axis.line.y = element_line(colour = "#595A5C"), + axis.title.x=element_blank(), + axis.text.x=element_blank(), + axis.ticks.x=element_blank()) + + # ggplot2::xlab("Chromosome Position") + + # ggplot2::ylab("-log10(p-value)") + + ggplot2::ylab(bquote(-log[10]~(p-value))) + + ggplot2::coord_cartesian(xlim = c(start, end), ylim = c(min(in.dt$LOG10P), + max(in.dt$LOG10P))) + } + else { + c = ggplot2::ggplot(gene_sub, ggplot2::aes_string(x = "value", + y = "y_value")) + ggplot2::geom_line(ggplot2::aes_string(group = "GENE_NAME"), + size = 2) + ggplot2::theme_minimal() + + ggplot2::geom_text(data = plot_lab, + ggplot2::aes_string(x = "value", y = "y_value", label = "GENE_NAME"), + hjust = -0.1, vjust = 0.3, + size = gene_name_s) + + ggplot2::theme(axis.title.y = ggplot2::element_blank(), #ggplot2::element_text(color = "white", size = 28), + axis.text.y = ggplot2::element_blank(), + axis.ticks.y = ggplot2::element_blank(), + panel.border = element_blank(), + panel.grid.major = element_blank(), + panel.grid.minor = element_blank(), + axis.line.x = element_line(colour = "#595A5C")) + + ggplot2::xlab(paste0("chromosome ", + chr_in, " position")) + ggplot2::coord_cartesian(xlim = c(start, + end), ylim = c(0, (max(gene_sub$y_value) + 0.25))) + b = ggplot2::ggplot(in.dt, ggplot2::aes_string(x = "POS", + y = "LOG10P")) + ggplot2::geom_point() + ggplot2::theme(panel.border = element_blank(), + panel.grid.major = element_blank(), + panel.grid.minor = element_blank(), + axis.line.x = element_blank(), + axis.line.y = element_line(colour = "#595A5C"), + axis.title.x=element_blank(), + axis.text.x=element_blank(), + axis.ticks.x=element_blank()) + + # ggplot2::xlab("Chromosome Position") + + # ggplot2::ylab("-log10(p-value)") + + ggplot2::ylab(bquote(-log[10]~(p-value))) + + ggplot2::coord_cartesian(xlim = c(start, end), ylim = c(min(in.dt$LOG10P), + max(in.dt$LOG10P))) + } + if (label_lead == TRUE) { + b = b + geom_point(data = label_data, + aes_string(x = "POS", + y = "LOG10P"), + color = "#8491B4FF", # "#9A3480", #"purple") + fill = "#8491B4FF", # "#9A3480", + size = 4, shape = 23) + + b = b + geom_text(data = label_data, + aes_string(label = "RS_ID"), + color = "black", + size = 4, hjust = 1.25) + } + if (grey_colors == TRUE) { + b = b + geom_point(color = "#A2A3A4", fill = "#A2A3A4") + } + + if (cred_set == TRUE) { + + b = b + geom_point(data = pp_data, + aes_string(x = "POS", + y = "LOG10P")) + + geom_point(aes(colour = Posterior_Prob)) + + scale_colour_gradient( + low = "#F39B7FFF", # "#132B43", + high = "#DC0000FF", # "#56B1F7", + space = "Lab", + na.value = "#A2A3A4", # "grey50", + guide = "colourbar", + aesthetics = "colour" + ) + scale_fill_gradient( + low = "#F39B7FFF", # "#132B43", + high = "#DC0000FF", # "#56B1F7", + space = "Lab", + na.value = "#A2A3A4", # "grey50", + guide = "colourbar", + aesthetics = "colour" + ) + + } + + ggpubr::ggarrange(b, c, heights = c(gene_track_h, 1), nrow = 2, ncol = 1, + common.legend = TRUE, legend = "right") +} + + +################################################################################ +# MANHATTAN PLOTTING +################################################################################ +# based on the qqman package by Stephen Turner + + +manhattan_uu <- function (x, chr = "CHR", bp = "BP", p = "P", snp = "SNP", col = c("gray10", "gray60"), chrlabs = NULL, suggestiveline = -log10(1e-05), + genomewideline = -log10(5e-08), highlight = NULL, logp = TRUE, + annotatePval = NULL, annotateTop = TRUE, ...) { + CHR = BP = P = index = NULL + if (!(chr %in% names(x))) + stop(paste("Column", chr, "not found!")) + if (!(bp %in% names(x))) + stop(paste("Column", bp, "not found!")) + if (!(p %in% names(x))) + stop(paste("Column", p, "not found!")) + if (!(snp %in% names(x))) + warning(paste("No SNP column found. OK unless you're trying to highlight.")) + if (!is.numeric(x[[chr]])) + stop(paste(chr, "column should be numeric. Do you have 'X', 'Y', 'MT', etc? If so change to numbers and try again.")) + if (!is.numeric(x[[bp]])) + stop(paste(bp, "column should be numeric.")) + if (!is.numeric(x[[p]])) + stop(paste(p, "column should be numeric.")) + if (!is.null(x[[snp]])) + d = data.frame(CHR = x[[chr]], BP = x[[bp]], P = x[[p]], + pos = NA, index = NA, SNP = x[[snp]], stringsAsFactors = FALSE) + else d = data.frame(CHR = x[[chr]], BP = x[[bp]], P = x[[p]], + pos = NA, index = NA) + d <- d[order(d$CHR, d$BP), ] + if (logp) { + d$logp <- -log10(d$P) + } + else { + d$logp <- d$P + } + d$index = rep.int(seq_along(unique(d$CHR)), times = tapply(d$SNP, + d$CHR, length)) + nchr = length(unique(d$CHR)) + if (nchr == 1) { + d$pos = d$BP + xlabel = paste("Chromosome", unique(d$CHR), "position") + } + else { + lastbase = 0 + ticks = NULL + for (i in unique(d$index)) { + if (i == 1) { + d[d$index == i, ]$pos = d[d$index == i, ]$BP + } + else { + lastbase = lastbase + max(d[d$index == (i - 1), + "BP"]) + d[d$index == i, "BP"] = d[d$index == i, "BP"] - + min(d[d$index == i, "BP"]) + 1 + d[d$index == i, "pos"] = d[d$index == i, "BP"] + + lastbase + } + } + ticks <- tapply(d$pos, d$index, quantile, probs = 0.5) + xlabel = "Chromosome" + labs <- unique(d$CHR) + } + xmax = ceiling(max(d$pos) * 1.03) + xmin = floor(max(d$pos) * -0.03) + def_args <- list(xaxt = "n", bty = "n", xaxs = "i", yaxs = "i", + las = 1, pch = 20, xlim = c(xmin, xmax), ylim = c(0, + ceiling(max(d$logp))), xlab = xlabel, ylab = expression(-log[10](italic(p)))) + dotargs <- list(...) + do.call("plot", c(NA, dotargs, def_args[!names(def_args) %in% + names(dotargs)])) + if (!is.null(chrlabs)) { + if (is.character(chrlabs)) { + if (length(chrlabs) == length(labs)) { + labs <- chrlabs + } + else { + warning("You're trying to specify chromosome labels but the number of labels != number of chromosomes.") + } + } + else { + warning("If you're trying to specify chromosome labels, chrlabs must be a character vector") + } + } + if (nchr == 1) { + axis(1, ...) + } + else { + axis(1, at = ticks, labels = labs, ...) + } + col = rep_len(col, max(d$index)) + if (nchr == 1) { + with(d, points(pos, logp, pch = 20, col = col[1], ...)) + } + else { + icol = 1 + for (i in unique(d$index)) { + points(d[d$index == i, "pos"], d[d$index == i, "logp"], + col = col[icol], pch = 20, ...) + icol = icol + 1 + } + } + if (suggestiveline) + # abline(h = suggestiveline, col = "blue") # original + abline(h = suggestiveline, col = "#595A5C", lty = "dashed") # original + if (genomewideline) + # abline(h = genomewideline, col = "red") # original + abline(h = genomewideline, col = "#E55738", lty = "dashed") # original + if (!is.null(highlight)) { + if (any(!(highlight %in% d$SNP))) + warning("You're trying to highlight SNPs that don't exist in your results.") + d.highlight = d[which(d$SNP %in% highlight), ] + # with(d.highlight, points(pos, logp, col = "green3", pch = 20, ...)) # original + with(d.highlight, points(pos, logp, col = "#9FC228", pch = 20, ...)) + } + if (!is.null(annotatePval)) { + if (logp) { + topHits = subset(d, P <= annotatePval) + } + else topHits = subset(d, P >= annotatePval) + par(xpd = TRUE) + if (annotateTop == FALSE) { + if (logp) { + with(subset(d, P <= annotatePval), textxy(pos, + -log10(P), offset = 0.625, labs = topHits$SNP, + cex = 0.45), ...) + } + else with(subset(d, P >= annotatePval), textxy(pos, + P, offset = 0.625, labs = topHits$SNP, cex = 0.45), + ...) + } + else { + topHits <- topHits[order(topHits$P), ] + topSNPs <- NULL + for (i in unique(topHits$CHR)) { + chrSNPs <- topHits[topHits$CHR == i, ] + topSNPs <- rbind(topSNPs, chrSNPs[1, ]) + } + if (logp) { + textxy(topSNPs$pos, -log10(topSNPs$P), offset = 0.625, + labs = topSNPs$SNP, cex = 0.5, ...) + } + else textxy(topSNPs$pos, topSNPs$P, offset = 0.625, + labs = topSNPs$SNP, cex = 0.5, ...) + } + } + par(xpd = FALSE) +} \ No newline at end of file diff --git a/Scripts/local.system.R b/Scripts/local.system.R new file mode 100644 index 0000000..1b81417 --- /dev/null +++ b/Scripts/local.system.R @@ -0,0 +1,99 @@ +################################################################################ +# LOCAL SYSTEM # +################################################################################ + +### Operating System Version +### MacBook Pro +# ROOT_loc = "/Users/swvanderlaan" +# STORAGE_loc = "/Users/swvanderlaan" +# CLOUD_loc = "/Users/swvanderlaan/Library/Mobile Documents/com~apple~CloudDocs/" +# ONEDRIVE_loc = "/Users/swvanderlaan/Library/CloudStorage/OneDrive-UMCUtrecht/Genomics" + +### MacBook Air +ROOT_loc = "/Users/slaan3" +STORAGE_loc = "/Users/slaan3" +CLOUD_loc = "/Users/slaan3/Library/Mobile Documents/com~apple~CloudDocs/" +ONEDRIVE_loc = "/Users/slaan3/Library/CloudStorage/OneDrive-UMCUtrecht/Genomics" + +# STORAGE_loc = "/Volumes/LaCie" + +### Generic +LAB_loc = paste0(CLOUD_loc, "/Genomics/LabBusiness") + +AEDB_loc = paste0(ONEDRIVE_loc, "/Athero-Express/AE-AAA_GS_DBs") + +### Genetic and genomic data +PLINK_loc=paste0(STORAGE_loc,"/PLINK") +GWAS_loc=paste0(PLINK_loc,"/_GWAS_Datasets/_CHARGE_CAC") + +# genetic +AEGSQC_loc = paste0(PLINK_loc, "/_AE_ORIGINALS/AEGS_COMBINED_QC2018") +MICHIMP_loc=paste0(PLINK_loc,"/_AE_ORIGINALS/AEGS_COMBINED_EAGLE2_1000Gp3v5HRCr11") + +# sc rna +AESCRNA_loc = paste0(PLINK_loc, "/_AE_ORIGINALS/AESCRNA/prepped_data") + +# bulk rna +AERNA_loc = paste0(PLINK_loc, "/_AE_ORIGINALS/AERNA") + +### Project +# PROJECT_loc = paste0(PLINK_loc, "/analyses/grants/telomeregrant2022") +PROJECT_loc = paste0(STORAGE_loc, "/git/CirculatoryHealth/Asympt_vs_Ocular") + +# use this if there is relevant information here. +ifelse(!dir.exists(file.path(PROJECT_loc, "/targets")), + dir.create(file.path(PROJECT_loc, "/targets")), + FALSE) +TARGET_loc = paste0(PROJECT_loc,"/targets") + +### SOME VARIABLES WE NEED DOWN THE LINE +TRAIT_OF_INTEREST = "PCSK9" # Phenotype +PROJECTNAME = "PCSK9" + +cat("\nCreate a new analysis directories.\n") + +cat("\n- general directory\n") +ifelse(!dir.exists(file.path(PROJECT_loc)), + dir.create(file.path(PROJECT_loc)), + FALSE) +ANALYSIS_loc = paste0(PROJECT_loc) + +cat("\n- for plots\n") +ifelse(!dir.exists(file.path(ANALYSIS_loc, "/PLOTS")), + dir.create(file.path(ANALYSIS_loc, "/PLOTS")), + FALSE) +PLOT_loc = paste0(ANALYSIS_loc,"/PLOTS") + +ifelse(!dir.exists(file.path(PLOT_loc, "/QC")), + dir.create(file.path(PLOT_loc, "/QC")), + FALSE) +QC_loc = paste0(PLOT_loc,"/QC") + +cat("\n- for output of summary results\n") +ifelse(!dir.exists(file.path(ANALYSIS_loc, "/OUTPUT")), + dir.create(file.path(ANALYSIS_loc, "/OUTPUT")), + FALSE) +OUT_loc = paste0(ANALYSIS_loc, "/OUTPUT") + +cat("\n- for baseline tables\n") +ifelse(!dir.exists(file.path(ANALYSIS_loc, "/BASELINE")), + dir.create(file.path(ANALYSIS_loc, "/BASELINE")), + FALSE) +BASELINE_loc = paste0(ANALYSIS_loc, "/BASELINE") + +cat("\n- for genetic analyses\n") +ifelse(!dir.exists(file.path(ANALYSIS_loc, "/SNP")), + dir.create(file.path(ANALYSIS_loc, "/SNP")), + FALSE) +SNP_loc = paste0(ANALYSIS_loc, "/SNP") + +cat("\n- for Cox regression results\n") +ifelse(!dir.exists(file.path(PLOT_loc, "/COX")), + dir.create(file.path(PLOT_loc, "/COX")), + FALSE) +COX_loc = paste0(PLOT_loc, "/COX") + + +setwd(paste0(PROJECT_loc)) +getwd() +list.files() \ No newline at end of file diff --git a/Scripts/pack01.packages.R b/Scripts/pack01.packages.R new file mode 100644 index 0000000..6340bde --- /dev/null +++ b/Scripts/pack01.packages.R @@ -0,0 +1,50 @@ +################################################################################ +# PACKAGES TO LOAD # +################################################################################ + +cat("\n* General packages...\n") +install.packages.auto("credentials") +library("credentials") +credentials::set_github_pat() + +install.packages.auto("R.utils") + +install.packages.auto("worcs") + +install.packages.auto("readr") +install.packages.auto("optparse") +install.packages.auto("tools") +install.packages.auto("dplyr") +install.packages.auto("tidyr") +install.packages.auto("naniar") + +# To get 'data.table' with 'fwrite' to be able to directly write gzipped-files +# Ref: https://stackoverflow.com/questions/42788401/is-possible-to-use-fwrite-from-data-table-with-gzfile +# install.packages("data.table", repos = "https://Rdatatable.gitlab.io/data.table") +library(data.table) + +install.packages.auto("tidyverse") +install.packages.auto("knitr") +install.packages.auto("DT") +install.packages.auto("eeptools") + +install.packages.auto("haven") +install.packages.auto("tableone") + +install.packages.auto("BlandAltmanLeh") + +# Install the devtools package from Hadley Wickham +install.packages.auto('devtools') + +# for plotting +install.packages.auto("pheatmap") +install.packages.auto("forestplot") +install.packages.auto("ggplot2") + +install.packages.auto("ggpubr") + +install.packages.auto("UpSetR") + +devtools::install_github("thomasp85/patchwork") +library("patchwork") +install.packages.auto("sjPlot") diff --git a/Scripts/pack02.packages.R b/Scripts/pack02.packages.R new file mode 100644 index 0000000..192cd88 --- /dev/null +++ b/Scripts/pack02.packages.R @@ -0,0 +1,91 @@ +################################################################################ +# PACKAGES TO LOAD # +################################################################################ + +cat("\n* General packages...\n") +install.packages.auto("credentials") +library("credentials") +# credentials::set_github_pat() + +install.packages.auto("R.utils") + +install.packages.auto('pander') +install.packages.auto('openxlsx') + +install.packages.auto("readr") +install.packages.auto("optparse") +install.packages.auto("tools") +install.packages.auto("dplyr") +install.packages.auto("tidyr") +install.packages.auto("tidylog") +library("tidylog", warn.conflicts = FALSE) +install.packages.auto("naniar") + +# To get 'data.table' with 'fwrite' to be able to directly write gzipped-files +# Ref: https://stackoverflow.com/questions/42788401/is-possible-to-use-fwrite-from-data-table-with-gzfile +# install.packages("data.table", repos = "https://Rdatatable.gitlab.io/data.table") +library(data.table) + +install.packages.auto("tidyverse") +install.packages.auto("knitr") +install.packages.auto("DT") + +# for plotting +install.packages.auto("qqman") +install.packages.auto("forestplot") +install.packages.auto("pheatmap") +# for meta-analysis +install.packages.auto("meta") +install.packages.auto("bacon") + +install.packages.auto("reshape2") + +install.packages.auto("ggpubr") +install.packages.auto("patchwork") +install.packages.auto("corrr") + +install.packages.auto("haven") +install.packages.auto("tableone") + +# Install the devtools package from Hadley Wickham +install.packages.auto('devtools') + +cat("\n* Genomic packages...\n") +install.packages.auto("GenomicFeatures") +install.packages.auto("GenomicRanges") +install.packages.auto("SummarizedExperiment") +install.packages.auto("DESeq2") +install.packages.auto("org.Hs.eg.db") +install.packages.auto("mygene") +install.packages.auto("TxDb.Hsapiens.UCSC.hg19.knownGene") +install.packages.auto("org.Hs.eg.db") +install.packages.auto("AnnotationDbi") + +# required for EnsDb.Hsapiens.v86 +# install.packages("minqa") + +# install.packages.auto("EnsDb.Hsapiens.v86") +# if (!require("BiocManager", quietly = TRUE)) +# install.packages("BiocManager") +# +# BiocManager::install("EnsDb.Hsapiens.v86") +library("EnsDb.Hsapiens.v86") + +install.packages.auto("EnhancedVolcano") + +# Install the annotation tables +library("devtools") +# devtools::install_github("stephenturner/annotables") +library(dplyr) +library(annotables) + +# alternative chart of a correlation matrix +# -------------------------------- +# Alternative solution https://www.r-graph-gallery.com/199-correlation-matrix-with-ggally.html +# install.packages.auto("GGally") + +# Quick display of two cabapilities of GGally, to assess the distribution and correlation of variables +library(GGally) + + + diff --git a/Scripts/pack03.packages.R b/Scripts/pack03.packages.R new file mode 100644 index 0000000..5b6a2ec --- /dev/null +++ b/Scripts/pack03.packages.R @@ -0,0 +1,47 @@ +################################################################################ +# PACKAGES TO LOAD # +################################################################################ + +install.packages.auto("readr") +install.packages.auto("optparse") +install.packages.auto("tools") +install.packages.auto("dplyr") +install.packages.auto("tidyr") +install.packages.auto("tidylog") +library("tidylog", warn.conflicts = FALSE) +install.packages.auto("naniar") + +# To get 'data.table' with 'fwrite' to be able to directly write gzipped-files +# Ref: https://stackoverflow.com/questions/42788401/is-possible-to-use-fwrite-from-data-table-with-gzfile +# install.packages("data.table", repos = "https://Rdatatable.gitlab.io/data.table") +library(data.table) + +install.packages.auto("tidyverse") +install.packages.auto("knitr") +install.packages.auto("DT") + +install.packages.auto("org.Hs.eg.db") +install.packages.auto("mygene") +install.packages.auto("EnhancedVolcano") + +install.packages.auto("haven") +install.packages.auto("tableone") + +# For a more efficient implementation of the Wilcoxon Rank Sum Test, +# (default method for FindMarkers) please install the limma package +# -------------------------------------------- +install.packages('BiocManager') +BiocManager::install('limma') +# -------------------------------------------- +# After installation of limma, Seurat will automatically use the more +# efficient implementation (no further action necessary). +# This message will be shown once per session + +# Install the devtools package from Hadley Wickham +install.packages.auto('devtools') +# Replace '2.3.4' with your desired version +# devtools::install_version(package = 'Seurat', version = package_version('2.3.4')) +install.packages.auto("Seurat") +library("Seurat") + + diff --git a/images/AE_Genomics_2010.png b/images/AE_Genomics_2010.png new file mode 100755 index 0000000..bb2425a Binary files /dev/null and b/images/AE_Genomics_2010.png differ diff --git a/images/ERA_CVD_Logo_CMYK.png b/images/ERA_CVD_Logo_CMYK.png new file mode 100644 index 0000000..ce58b63 Binary files /dev/null and b/images/ERA_CVD_Logo_CMYK.png differ diff --git a/images/leducq-logo-large.png b/images/leducq-logo-large.png new file mode 100755 index 0000000..ec8df58 Binary files /dev/null and b/images/leducq-logo-large.png differ diff --git a/images/leducq-logo-small.png b/images/leducq-logo-small.png new file mode 100755 index 0000000..ccc774b Binary files /dev/null and b/images/leducq-logo-small.png differ diff --git a/images/to_aition.png b/images/to_aition.png new file mode 100644 index 0000000..8268e3e Binary files /dev/null and b/images/to_aition.png differ diff --git a/images/worcs_icon.png b/images/worcs_icon.png new file mode 100644 index 0000000..2e54ae4 Binary files /dev/null and b/images/worcs_icon.png differ diff --git a/prepare_data.R b/prepare_data.R new file mode 100644 index 0000000..4b0396f --- /dev/null +++ b/prepare_data.R @@ -0,0 +1,6 @@ +# In this file, write the R-code necessary to load your original data file +# (e.g., an SPSS, Excel, or SAS-file), and convert it to a data.frame. Then, +# use the function open_data(your_data_frame) or closed_data(your_data_frame) +# to store the data. + +library(worcs) diff --git a/renv.lock b/renv.lock new file mode 100644 index 0000000..c134d8e --- /dev/null +++ b/renv.lock @@ -0,0 +1,3189 @@ +{ + "R": { + "Version": "4.2.1", + "Repositories": [ + { + "Name": "CRAN", + "URL": "https://cran.rstudio.com" + } + ] + }, + "Packages": { + "AnnotationDbi": { + "Package": "AnnotationDbi", + "Version": "1.58.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/AnnotationDbi", + "git_branch": "RELEASE_3_15", + "git_last_commit": "05fcf7a", + "git_last_commit_date": "2022-04-26", + "Hash": "106e57984a3dd77bd060133fa4cccf58", + "Requirements": [ + "Biobase", + "BiocGenerics", + "DBI", + "IRanges", + "KEGGREST", + "RSQLite", + "S4Vectors" + ] + }, + "AnnotationFilter": { + "Package": "AnnotationFilter", + "Version": "1.20.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/AnnotationFilter", + "git_branch": "RELEASE_3_15", + "git_last_commit": "2818aff", + "git_last_commit_date": "2022-04-26", + "Hash": "ecc8df33742300e5d69003d7f308226a", + "Requirements": [ + "GenomicRanges", + "lazyeval" + ] + }, + "BH": { + "Package": "BH", + "Version": "1.78.0-0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4e348572ffcaa2fb1e610e7a941f6f3a", + "Requirements": [] + }, + "Biobase": { + "Package": "Biobase", + "Version": "2.56.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/Biobase", + "git_branch": "RELEASE_3_15", + "git_last_commit": "3b2dd91", + "git_last_commit_date": "2022-04-26", + "Hash": "b58c1eb25be406d1a35dd4cff0e9ba2e", + "Requirements": [ + "BiocGenerics" + ] + }, + "BiocFileCache": { + "Package": "BiocFileCache", + "Version": "2.4.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/BiocFileCache", + "git_branch": "RELEASE_3_15", + "git_last_commit": "2c00eee", + "git_last_commit_date": "2022-04-26", + "Hash": "450e5bba6c68cbab059b39f88b740ade", + "Requirements": [ + "DBI", + "RSQLite", + "curl", + "dbplyr", + "dplyr", + "filelock", + "httr", + "rappdirs" + ] + }, + "BiocGenerics": { + "Package": "BiocGenerics", + "Version": "0.42.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/BiocGenerics", + "git_branch": "RELEASE_3_15", + "git_last_commit": "3582d47", + "git_last_commit_date": "2022-04-26", + "Hash": "37348ee784e82c0a6b650146275b459d", + "Requirements": [] + }, + "BiocIO": { + "Package": "BiocIO", + "Version": "1.6.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/BiocIO", + "git_branch": "RELEASE_3_15", + "git_last_commit": "60c8aa1", + "git_last_commit_date": "2022-04-26", + "Hash": "2f96961b653e126bfca131ede146a613", + "Requirements": [ + "BiocGenerics", + "S4Vectors" + ] + }, + "BiocManager": { + "Package": "BiocManager", + "Version": "1.30.18", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b1a93bed5debda5775636086fdca017b", + "Requirements": [] + }, + "BiocParallel": { + "Package": "BiocParallel", + "Version": "1.30.4", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/BiocParallel", + "git_branch": "RELEASE_3_15", + "git_last_commit": "3f8bbc2", + "git_last_commit_date": "2022-10-11", + "Hash": "979598ec1228a442839526dc8578be36", + "Requirements": [ + "BH", + "codetools", + "futile.logger", + "snow" + ] + }, + "Biostrings": { + "Package": "Biostrings", + "Version": "2.64.1", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/Biostrings", + "git_branch": "RELEASE_3_15", + "git_last_commit": "ffe263e", + "git_last_commit_date": "2022-08-17", + "Hash": "f2695988e34d82e7ed97371fb7d66170", + "Requirements": [ + "BiocGenerics", + "GenomeInfoDb", + "IRanges", + "S4Vectors", + "XVector", + "crayon" + ] + }, + "DBI": { + "Package": "DBI", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b2866e62bab9378c3cc9476a1954226b", + "Requirements": [] + }, + "DelayedArray": { + "Package": "DelayedArray", + "Version": "0.22.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/DelayedArray", + "git_branch": "RELEASE_3_15", + "git_last_commit": "4a5afd1", + "git_last_commit_date": "2022-04-26", + "Hash": "c83a6e282a9669d4e04eb2d2ce8660a8", + "Requirements": [ + "BiocGenerics", + "IRanges", + "Matrix", + "MatrixGenerics", + "S4Vectors" + ] + }, + "EnsDb.Hsapiens.v86": { + "Package": "EnsDb.Hsapiens.v86", + "Version": "2.99.0", + "Source": "Bioconductor", + "Hash": "626af36a8d6de3c44779ff2a073952e6", + "Requirements": [ + "ensembldb" + ] + }, + "FNN": { + "Package": "FNN", + "Version": "1.1.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a774898dbc05ccf03ed4ca93fa7a71f4", + "Requirements": [] + }, + "GGally": { + "Package": "GGally", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "022f78c8698724b326f1838b1a98cafa", + "Requirements": [ + "RColorBrewer", + "dplyr", + "forcats", + "ggplot2", + "gtable", + "lifecycle", + "plyr", + "progress", + "reshape", + "rlang", + "scales", + "tidyr" + ] + }, + "GenomeInfoDb": { + "Package": "GenomeInfoDb", + "Version": "1.32.4", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/GenomeInfoDb", + "git_branch": "RELEASE_3_15", + "git_last_commit": "69df6a5", + "git_last_commit_date": "2022-09-06", + "Hash": "45eeade5241cbc976f2114f62b90d81d", + "Requirements": [ + "BiocGenerics", + "GenomeInfoDbData", + "IRanges", + "RCurl", + "S4Vectors" + ] + }, + "GenomeInfoDbData": { + "Package": "GenomeInfoDbData", + "Version": "1.2.8", + "Source": "Bioconductor", + "Hash": "b0e605ca22c2a5c6a65a3960729462da", + "Requirements": [] + }, + "GenomicAlignments": { + "Package": "GenomicAlignments", + "Version": "1.32.1", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/GenomicAlignments", + "git_branch": "RELEASE_3_15", + "git_last_commit": "2553580", + "git_last_commit_date": "2022-07-21", + "Hash": "7d2a019a8c54d79b3455fe320cb11059", + "Requirements": [ + "BiocGenerics", + "BiocParallel", + "Biostrings", + "GenomeInfoDb", + "GenomicRanges", + "IRanges", + "Rsamtools", + "S4Vectors", + "SummarizedExperiment" + ] + }, + "GenomicFeatures": { + "Package": "GenomicFeatures", + "Version": "1.48.4", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/GenomicFeatures", + "git_branch": "RELEASE_3_15", + "git_last_commit": "06e37dc", + "git_last_commit_date": "2022-09-19", + "Hash": "9eb9e31d6cd6569646758f5dac50f1f0", + "Requirements": [ + "AnnotationDbi", + "Biobase", + "BiocGenerics", + "BiocIO", + "Biostrings", + "DBI", + "GenomeInfoDb", + "GenomicRanges", + "IRanges", + "RCurl", + "RSQLite", + "S4Vectors", + "XVector", + "biomaRt", + "rtracklayer" + ] + }, + "GenomicRanges": { + "Package": "GenomicRanges", + "Version": "1.48.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/GenomicRanges", + "git_branch": "RELEASE_3_15", + "git_last_commit": "2bce608", + "git_last_commit_date": "2022-04-26", + "Hash": "07625db342974bca20a6d82dfc34386d", + "Requirements": [ + "BiocGenerics", + "GenomeInfoDb", + "IRanges", + "S4Vectors", + "XVector" + ] + }, + "IRanges": { + "Package": "IRanges", + "Version": "2.30.1", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/IRanges", + "git_branch": "RELEASE_3_15", + "git_last_commit": "ead506a", + "git_last_commit_date": "2022-08-17", + "Hash": "98cde49c4d8c69377a05cf9a81053254", + "Requirements": [ + "BiocGenerics", + "S4Vectors" + ] + }, + "KEGGREST": { + "Package": "KEGGREST", + "Version": "1.36.3", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/KEGGREST", + "git_branch": "RELEASE_3_15", + "git_last_commit": "1827cde", + "git_last_commit_date": "2022-07-08", + "Hash": "9dbc4322a75ffc55734070311369a8bb", + "Requirements": [ + "Biostrings", + "httr", + "png" + ] + }, + "KernSmooth": { + "Package": "KernSmooth", + "Version": "2.23-20", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8dcfa99b14c296bc9f1fd64d52fd3ce7", + "Requirements": [] + }, + "MASS": { + "Package": "MASS", + "Version": "7.3-58.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "762e1804143a332333c054759f89a706", + "Requirements": [] + }, + "Matrix": { + "Package": "Matrix", + "Version": "1.5-1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "539dc0c0c05636812f1080f473d2c177", + "Requirements": [ + "lattice" + ] + }, + "MatrixGenerics": { + "Package": "MatrixGenerics", + "Version": "1.8.1", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/MatrixGenerics", + "git_branch": "RELEASE_3_15", + "git_last_commit": "a4a2108", + "git_last_commit_date": "2022-06-23", + "Hash": "0b6a466982071e55981cf5dd8d1c3ceb", + "Requirements": [ + "matrixStats" + ] + }, + "MatrixModels": { + "Package": "MatrixModels", + "Version": "0.5-1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "963ab8fbaf980a5b081ed40419081439", + "Requirements": [ + "Matrix" + ] + }, + "ProtGenerics": { + "Package": "ProtGenerics", + "Version": "1.28.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/ProtGenerics", + "git_branch": "RELEASE_3_15", + "git_last_commit": "cfcd0a9", + "git_last_commit_date": "2022-04-26", + "Hash": "6c29e31b2944baca5cc86276803e5a49", + "Requirements": [] + }, + "R6": { + "Package": "R6", + "Version": "2.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "470851b6d5d0ac559e9d01bb352b4021", + "Requirements": [] + }, + "RANN": { + "Package": "RANN", + "Version": "2.6.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d128ea05a972d3e67c6f39de52c72bd7", + "Requirements": [] + }, + "RColorBrewer": { + "Package": "RColorBrewer", + "Version": "1.1-3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "45f0398006e83a5b10b72a90663d8d8c", + "Requirements": [] + }, + "RCurl": { + "Package": "RCurl", + "Version": "1.98-1.9", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ea2f19dade6bd911b29b9bbb115d08f6", + "Requirements": [ + "bitops" + ] + }, + "ROCR": { + "Package": "ROCR", + "Version": "1.0-11", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "cc151930e20e16427bc3d0daec62b4a9", + "Requirements": [ + "gplots" + ] + }, + "RSQLite": { + "Package": "RSQLite", + "Version": "2.2.18", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a4a3bcd8a9380e04c86876d73a085b8f", + "Requirements": [ + "DBI", + "Rcpp", + "bit64", + "blob", + "memoise", + "pkgconfig", + "plogr" + ] + }, + "Rcpp": { + "Package": "Rcpp", + "Version": "1.0.9", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e9c08b94391e9f3f97355841229124f2", + "Requirements": [] + }, + "RcppAnnoy": { + "Package": "RcppAnnoy", + "Version": "0.0.19", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5681153e3eb103725e35ac5f7ebca910", + "Requirements": [ + "Rcpp" + ] + }, + "RcppArmadillo": { + "Package": "RcppArmadillo", + "Version": "0.11.4.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "411952f0aca6398392dad34f225753b9", + "Requirements": [ + "Rcpp" + ] + }, + "RcppEigen": { + "Package": "RcppEigen", + "Version": "0.3.3.9.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4c86baed78388ceb06f88e3e9a1d87f5", + "Requirements": [ + "Matrix", + "Rcpp" + ] + }, + "RcppProgress": { + "Package": "RcppProgress", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1c0aa18b97e6aaa17f93b8b866c0ace5", + "Requirements": [] + }, + "RcppTOML": { + "Package": "RcppTOML", + "Version": "0.1.7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f8a578aa91321ecec1292f1e2ffadeda", + "Requirements": [ + "Rcpp" + ] + }, + "Rhtslib": { + "Package": "Rhtslib", + "Version": "1.28.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/Rhtslib", + "git_branch": "RELEASE_3_15", + "git_last_commit": "214fde2", + "git_last_commit_date": "2022-04-26", + "Hash": "6cda0d827f065bf128b75e8a88473c10", + "Requirements": [ + "zlibbioc" + ] + }, + "Rsamtools": { + "Package": "Rsamtools", + "Version": "2.12.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/Rsamtools", + "git_branch": "RELEASE_3_15", + "git_last_commit": "d6a65dd", + "git_last_commit_date": "2022-04-26", + "Hash": "4665745352d449bb37eedb7f860ce22f", + "Requirements": [ + "BiocGenerics", + "BiocParallel", + "Biostrings", + "GenomeInfoDb", + "GenomicRanges", + "IRanges", + "Rhtslib", + "S4Vectors", + "XVector", + "bitops", + "zlibbioc" + ] + }, + "Rtsne": { + "Package": "Rtsne", + "Version": "0.16", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e921b89ef921905fc89b95886675706d", + "Requirements": [ + "Rcpp" + ] + }, + "S4Vectors": { + "Package": "S4Vectors", + "Version": "0.34.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/S4Vectors", + "git_branch": "RELEASE_3_15", + "git_last_commit": "f590de3", + "git_last_commit_date": "2022-04-26", + "Hash": "90677cc888563927cecacd4067ccad45", + "Requirements": [ + "BiocGenerics" + ] + }, + "Seurat": { + "Package": "Seurat", + "Version": "4.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f186dd1d740213b601da121489ad0e41", + "Requirements": [ + "KernSmooth", + "MASS", + "Matrix", + "RANN", + "RColorBrewer", + "ROCR", + "Rcpp", + "RcppAnnoy", + "RcppEigen", + "RcppProgress", + "Rtsne", + "SeuratObject", + "cluster", + "cowplot", + "fitdistrplus", + "future", + "future.apply", + "ggplot2", + "ggrepel", + "ggridges", + "httr", + "ica", + "igraph", + "irlba", + "jsonlite", + "leiden", + "lmtest", + "matrixStats", + "miniUI", + "patchwork", + "pbapply", + "plotly", + "png", + "reticulate", + "rlang", + "scales", + "scattermore", + "sctransform", + "shiny", + "spatstat.core", + "spatstat.geom", + "tibble", + "uwot" + ] + }, + "SeuratObject": { + "Package": "SeuratObject", + "Version": "4.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6487e82c447a7d343de624f5d3c0b24e", + "Requirements": [ + "Matrix", + "Rcpp", + "RcppEigen", + "future", + "future.apply", + "progressr", + "rgeos", + "rlang", + "sp" + ] + }, + "SparseM": { + "Package": "SparseM", + "Version": "1.81", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2042cd9759cc89a453c4aefef0ce9aae", + "Requirements": [] + }, + "SummarizedExperiment": { + "Package": "SummarizedExperiment", + "Version": "1.26.1", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/SummarizedExperiment", + "git_branch": "RELEASE_3_15", + "git_last_commit": "c8cbd3b", + "git_last_commit_date": "2022-04-28", + "Hash": "7cbcf1fe7236f18f1a961877fbf2d78c", + "Requirements": [ + "Biobase", + "BiocGenerics", + "DelayedArray", + "GenomeInfoDb", + "GenomicRanges", + "IRanges", + "Matrix", + "MatrixGenerics", + "S4Vectors" + ] + }, + "XML": { + "Package": "XML", + "Version": "3.99-0.11", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1b8a72068e9137d4dcd1df27d092e3cc", + "Requirements": [] + }, + "XVector": { + "Package": "XVector", + "Version": "0.36.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/XVector", + "git_branch": "RELEASE_3_15", + "git_last_commit": "ff6f818", + "git_last_commit_date": "2022-04-26", + "Hash": "03b87ac645463f29d04c2461d5de9610", + "Requirements": [ + "BiocGenerics", + "IRanges", + "S4Vectors", + "zlibbioc" + ] + }, + "abind": { + "Package": "abind", + "Version": "1.4-5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4f57884290cc75ab22f4af9e9d4ca862", + "Requirements": [] + }, + "annotables": { + "Package": "annotables", + "Version": "0.1.91", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "annotables", + "RemoteUsername": "stephenturner", + "RemoteRef": "HEAD", + "RemoteSha": "631423c3a99d8a72100bf5eef06df934a69e2224", + "Hash": "134c6def1f9d1fc0342a5a1826a3f97e", + "Requirements": [ + "tibble" + ] + }, + "askpass": { + "Package": "askpass", + "Version": "1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e8a22846fff485f0be3770c2da758713", + "Requirements": [ + "sys" + ] + }, + "assertthat": { + "Package": "assertthat", + "Version": "0.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "50c838a310445e954bc13f26f26a6ecf", + "Requirements": [] + }, + "backports": { + "Package": "backports", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c39fbec8a30d23e721980b8afb31984c", + "Requirements": [] + }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "543776ae6848fde2f48ff3816d0628bc", + "Requirements": [] + }, + "biomaRt": { + "Package": "biomaRt", + "Version": "2.52.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/biomaRt", + "git_branch": "RELEASE_3_15", + "git_last_commit": "cf4932a", + "git_last_commit_date": "2022-04-26", + "Hash": "afebc123951ea8778af2d67042737948", + "Requirements": [ + "AnnotationDbi", + "BiocFileCache", + "XML", + "digest", + "httr", + "progress", + "rappdirs", + "stringr", + "xml2" + ] + }, + "bit": { + "Package": "bit", + "Version": "4.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f36715f14d94678eea9933af927bc15d", + "Requirements": [] + }, + "bit64": { + "Package": "bit64", + "Version": "4.0.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9fe98599ca456d6552421db0d6772d8f", + "Requirements": [ + "bit" + ] + }, + "bitops": { + "Package": "bitops", + "Version": "1.0-7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b7d8d8ee39869c18d8846a184dd8a1af", + "Requirements": [] + }, + "blob": { + "Package": "blob", + "Version": "1.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "10d231579bc9c06ab1c320618808d4ff", + "Requirements": [ + "rlang", + "vctrs" + ] + }, + "boot": { + "Package": "boot", + "Version": "1.3-28", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0baa960e3b49c6176a4f42addcbacc59", + "Requirements": [] + }, + "brew": { + "Package": "brew", + "Version": "1.0-8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d69a786e85775b126bddbee185ae6084", + "Requirements": [] + }, + "brio": { + "Package": "brio", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "976cf154dfb043c012d87cddd8bca363", + "Requirements": [] + }, + "broom": { + "Package": "broom", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c90ff735b7812b60f067a3f7a3b4de63", + "Requirements": [ + "backports", + "dplyr", + "ellipsis", + "generics", + "ggplot2", + "glue", + "purrr", + "rlang", + "stringr", + "tibble", + "tidyr" + ] + }, + "bslib": { + "Package": "bslib", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "be5ee090716ce1671be6cd5d7c34d091", + "Requirements": [ + "cachem", + "htmltools", + "jquerylib", + "jsonlite", + "memoise", + "rlang", + "sass" + ] + }, + "caTools": { + "Package": "caTools", + "Version": "1.18.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "34d90fa5845004236b9eacafc51d07b2", + "Requirements": [ + "bitops" + ] + }, + "cachem": { + "Package": "cachem", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "648c5b3d71e6a37e3043617489a0a0e9", + "Requirements": [ + "fastmap", + "rlang" + ] + }, + "callr": { + "Package": "callr", + "Version": "3.7.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "358689cac9fe93b1bb3a19088d2dbed8", + "Requirements": [ + "R6", + "processx" + ] + }, + "car": { + "Package": "car", + "Version": "3.1-1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0bd175a135f51af0545d4ed4f5632026", + "Requirements": [ + "MASS", + "abind", + "carData", + "lme4", + "mgcv", + "nlme", + "nnet", + "pbkrtest", + "quantreg", + "scales" + ] + }, + "carData": { + "Package": "carData", + "Version": "3.0-5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ac6cdb8552c61bd36b0e54d07cf2aab7", + "Requirements": [] + }, + "cli": { + "Package": "cli", + "Version": "3.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0d297d01734d2bcea40197bd4971a764", + "Requirements": [] + }, + "clipr": { + "Package": "clipr", + "Version": "0.8.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3f038e5ac7f41d4ac41ce658c85e3042", + "Requirements": [] + }, + "clisymbols": { + "Package": "clisymbols", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "96c01552bfd5661b9bbdefbc762f4bcd", + "Requirements": [] + }, + "cluster": { + "Package": "cluster", + "Version": "2.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5edbbabab6ce0bf7900a74fd4358628e", + "Requirements": [] + }, + "codetools": { + "Package": "codetools", + "Version": "0.2-18", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "019388fc48e48b3da0d3a76ff94608a8", + "Requirements": [] + }, + "colorspace": { + "Package": "colorspace", + "Version": "2.0-3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bb4341986bc8b914f0f0acf2e4a3f2f7", + "Requirements": [] + }, + "commonmark": { + "Package": "commonmark", + "Version": "1.8.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b6e3e947d1d7ebf3d2bdcea1bde63fe7", + "Requirements": [] + }, + "corrplot": { + "Package": "corrplot", + "Version": "0.92", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fcf11a91936fd5047b2ee9bc00595e36", + "Requirements": [] + }, + "cowplot": { + "Package": "cowplot", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b418e8423699d11c7f2087c2bfd07da2", + "Requirements": [ + "ggplot2", + "gtable", + "rlang", + "scales" + ] + }, + "cpp11": { + "Package": "cpp11", + "Version": "0.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ed588261931ee3be2c700d22e94a29ab", + "Requirements": [] + }, + "crayon": { + "Package": "crayon", + "Version": "1.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e8a1e41acf02548751f45c718d55aa6a", + "Requirements": [] + }, + "credentials": { + "Package": "credentials", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "93762d0a34d78e6a025efdbfb5c6bb41", + "Requirements": [ + "askpass", + "curl", + "jsonlite", + "openssl", + "sys" + ] + }, + "crosstalk": { + "Package": "crosstalk", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6aa54f69598c32177e920eb3402e8293", + "Requirements": [ + "R6", + "htmltools", + "jsonlite", + "lazyeval" + ] + }, + "curl": { + "Package": "curl", + "Version": "4.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0eb86baa62f06e8855258fa5a8048667", + "Requirements": [] + }, + "data.table": { + "Package": "data.table", + "Version": "1.14.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b9b912b41064aaa79270f24d123c887d", + "Requirements": [] + }, + "dbplyr": { + "Package": "dbplyr", + "Version": "2.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f6c7eb9617e4d2a86bb7182fff99c805", + "Requirements": [ + "DBI", + "R6", + "assertthat", + "blob", + "cli", + "dplyr", + "glue", + "lifecycle", + "magrittr", + "pillar", + "purrr", + "rlang", + "tibble", + "tidyselect", + "vctrs", + "withr" + ] + }, + "deldir": { + "Package": "deldir", + "Version": "1.0-6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "65a3d4e2a1619bb85ae0fb64628da972", + "Requirements": [] + }, + "desc": { + "Package": "desc", + "Version": "1.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6b9602c7ebbe87101a9c8edb6e8b6d21", + "Requirements": [ + "R6", + "cli", + "rprojroot" + ] + }, + "devtools": { + "Package": "devtools", + "Version": "2.4.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ea5bc8b4a6a01e4f12d98b58329930bb", + "Requirements": [ + "cli", + "desc", + "ellipsis", + "fs", + "lifecycle", + "memoise", + "miniUI", + "pkgbuild", + "pkgdown", + "pkgload", + "profvis", + "rcmdcheck", + "remotes", + "rlang", + "roxygen2", + "rversions", + "sessioninfo", + "testthat", + "urlchecker", + "usethis", + "withr" + ] + }, + "diffobj": { + "Package": "diffobj", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8", + "Requirements": [ + "crayon" + ] + }, + "digest": { + "Package": "digest", + "Version": "0.6.30", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bf1cd206a5d170d132ef75c7537b9bdb", + "Requirements": [] + }, + "downlit": { + "Package": "downlit", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "79bf3f66590752ffbba20f8d2da94c7c", + "Requirements": [ + "brio", + "desc", + "digest", + "evaluate", + "fansi", + "memoise", + "rlang", + "vctrs", + "withr", + "yaml" + ] + }, + "dplyr": { + "Package": "dplyr", + "Version": "1.0.10", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "539412282059f7f0c07295723d23f987", + "Requirements": [ + "R6", + "generics", + "glue", + "lifecycle", + "magrittr", + "pillar", + "rlang", + "tibble", + "tidyselect", + "vctrs" + ] + }, + "dqrng": { + "Package": "dqrng", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3ce2af5ead3b01c518fd453c7fe5a51a", + "Requirements": [ + "BH", + "Rcpp", + "sitmo" + ] + }, + "ellipsis": { + "Package": "ellipsis", + "Version": "0.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077", + "Requirements": [ + "rlang" + ] + }, + "ensembldb": { + "Package": "ensembldb", + "Version": "2.20.2", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/ensembldb", + "git_branch": "RELEASE_3_15", + "git_last_commit": "ac1fb83", + "git_last_commit_date": "2022-06-16", + "Hash": "5cc4569320b1f24248705296331ddd10", + "Requirements": [ + "AnnotationDbi", + "AnnotationFilter", + "Biobase", + "BiocGenerics", + "Biostrings", + "DBI", + "GenomeInfoDb", + "GenomicFeatures", + "GenomicRanges", + "IRanges", + "ProtGenerics", + "RSQLite", + "Rsamtools", + "S4Vectors", + "curl", + "rtracklayer" + ] + }, + "evaluate": { + "Package": "evaluate", + "Version": "0.17", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9171b012a55a1ef53f1442b1d798a3b4", + "Requirements": [] + }, + "fansi": { + "Package": "fansi", + "Version": "1.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "83a8afdbe71839506baa9f90eebad7ec", + "Requirements": [] + }, + "farver": { + "Package": "farver", + "Version": "2.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8106d78941f34855c440ddb946b8f7a5", + "Requirements": [] + }, + "fastmap": { + "Package": "fastmap", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "77bd60a6157420d4ffa93b27cf6a58b8", + "Requirements": [] + }, + "filelock": { + "Package": "filelock", + "Version": "1.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "38ec653c2613bed60052ba3787bd8a2c", + "Requirements": [] + }, + "fitdistrplus": { + "Package": "fitdistrplus", + "Version": "1.1-8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9de7bf56c16871adf44dc88a24c7836c", + "Requirements": [ + "MASS", + "survival" + ] + }, + "fontawesome": { + "Package": "fontawesome", + "Version": "0.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a36c4a3eade472039a3ec8cb824e6dc4", + "Requirements": [ + "htmltools", + "rlang" + ] + }, + "forcats": { + "Package": "forcats", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9d95bc88206321cd1bc98480ecfd74bb", + "Requirements": [ + "cli", + "ellipsis", + "glue", + "lifecycle", + "magrittr", + "rlang", + "tibble", + "withr" + ] + }, + "formatR": { + "Package": "formatR", + "Version": "1.12", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e45696cc90f4d5b993fa1a289e01c5df", + "Requirements": [] + }, + "fs": { + "Package": "fs", + "Version": "1.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7c89603d81793f0d5486d91ab1fc6f1d", + "Requirements": [] + }, + "futile.logger": { + "Package": "futile.logger", + "Version": "1.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "99f0ace8c05ec7d3683d27083c4f1e7e", + "Requirements": [ + "futile.options", + "lambda.r" + ] + }, + "futile.options": { + "Package": "futile.options", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0d9bf02413ddc2bbe8da9ce369dcdd2b", + "Requirements": [] + }, + "future": { + "Package": "future", + "Version": "1.28.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f3e26a942d4ee32cec9403e1ddd7000b", + "Requirements": [ + "digest", + "globals", + "listenv", + "parallelly" + ] + }, + "future.apply": { + "Package": "future.apply", + "Version": "1.9.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "77dbef5c63aa92d1c319ad3b6c10eccb", + "Requirements": [ + "future", + "globals" + ] + }, + "generics": { + "Package": "generics", + "Version": "0.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "15e9634c0fcd294799e9b2e929ed1b86", + "Requirements": [] + }, + "gert": { + "Package": "gert", + "Version": "1.9.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9a091a6d2fb91e43afd4337e2dcef2e7", + "Requirements": [ + "askpass", + "credentials", + "openssl", + "rstudioapi", + "sys", + "zip" + ] + }, + "ggplot2": { + "Package": "ggplot2", + "Version": "3.3.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0fb26d0674c82705c6b701d1a61e02ea", + "Requirements": [ + "MASS", + "digest", + "glue", + "gtable", + "isoband", + "mgcv", + "rlang", + "scales", + "tibble", + "withr" + ] + }, + "ggpubr": { + "Package": "ggpubr", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "77089557d374c69db7cb77e65f0d6ab0", + "Requirements": [ + "cowplot", + "dplyr", + "ggplot2", + "ggrepel", + "ggsci", + "ggsignif", + "glue", + "gridExtra", + "magrittr", + "polynom", + "purrr", + "rlang", + "rstatix", + "scales", + "tibble", + "tidyr" + ] + }, + "ggrepel": { + "Package": "ggrepel", + "Version": "0.9.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "08ab869f37e6a7741a64ab9069bcb67d", + "Requirements": [ + "Rcpp", + "ggplot2", + "rlang", + "scales" + ] + }, + "ggridges": { + "Package": "ggridges", + "Version": "0.5.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c76ee8fe60939384b9726128e38caea0", + "Requirements": [ + "ggplot2", + "scales", + "withr" + ] + }, + "ggsci": { + "Package": "ggsci", + "Version": "2.9", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "81ccb8213ed592598210afd10c3a5936", + "Requirements": [ + "ggplot2", + "scales" + ] + }, + "ggsignif": { + "Package": "ggsignif", + "Version": "0.6.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a57f0f5dbcfd0d77ad4ff33032f5dc79", + "Requirements": [ + "ggplot2" + ] + }, + "gh": { + "Package": "gh", + "Version": "1.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b6a12054ee13dce0f6696c019c10e539", + "Requirements": [ + "cli", + "gitcreds", + "httr", + "ini", + "jsonlite" + ] + }, + "gitcreds": { + "Package": "gitcreds", + "Version": "0.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ab08ac61f3e1be454ae21911eb8bc2fe", + "Requirements": [] + }, + "globals": { + "Package": "globals", + "Version": "0.16.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e14798793892c6bebdbe2f144aacf6e6", + "Requirements": [ + "codetools" + ] + }, + "glue": { + "Package": "glue", + "Version": "1.6.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4f2596dfb05dac67b9dc558e5c6fba2e", + "Requirements": [] + }, + "goftest": { + "Package": "goftest", + "Version": "1.2-3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "dbe0201f91eeb15918dd3fbf01ee689a", + "Requirements": [] + }, + "gplots": { + "Package": "gplots", + "Version": "3.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "75437dd4c43599f6e9418ea249495fda", + "Requirements": [ + "KernSmooth", + "caTools", + "gtools" + ] + }, + "gridExtra": { + "Package": "gridExtra", + "Version": "2.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7d7f283939f563670a697165b2cf5560", + "Requirements": [ + "gtable" + ] + }, + "gtable": { + "Package": "gtable", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "36b4265fb818f6a342bed217549cd896", + "Requirements": [] + }, + "gtools": { + "Package": "gtools", + "Version": "3.9.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "32600a0bea839c4d0ac998d7c547ecf7", + "Requirements": [] + }, + "here": { + "Package": "here", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "24b224366f9c2e7534d2344d10d59211", + "Requirements": [ + "rprojroot" + ] + }, + "highr": { + "Package": "highr", + "Version": "0.9", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8eb36c8125038e648e5d111c0d7b2ed4", + "Requirements": [ + "xfun" + ] + }, + "hms": { + "Package": "hms", + "Version": "1.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "41100392191e1244b887878b533eea91", + "Requirements": [ + "ellipsis", + "lifecycle", + "pkgconfig", + "rlang", + "vctrs" + ] + }, + "htmltools": { + "Package": "htmltools", + "Version": "0.5.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6496090a9e00f8354b811d1a2d47b566", + "Requirements": [ + "base64enc", + "digest", + "fastmap", + "rlang" + ] + }, + "htmlwidgets": { + "Package": "htmlwidgets", + "Version": "1.5.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "76147821cd3fcd8c4b04e1ef0498e7fb", + "Requirements": [ + "htmltools", + "jsonlite", + "yaml" + ] + }, + "httpuv": { + "Package": "httpuv", + "Version": "1.6.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fd090e236ae2dc0f0cdf33a9ec83afb6", + "Requirements": [ + "R6", + "Rcpp", + "later", + "promises" + ] + }, + "httr": { + "Package": "httr", + "Version": "1.4.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "57557fac46471f0dbbf44705cc6a5c8c", + "Requirements": [ + "R6", + "curl", + "jsonlite", + "mime", + "openssl" + ] + }, + "ica": { + "Package": "ica", + "Version": "1.0-3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d9b52ced14e24a0e69e228c20eb5eb27", + "Requirements": [] + }, + "igraph": { + "Package": "igraph", + "Version": "1.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "132b06d7060f11ba8b4c7e7f385e9b7a", + "Requirements": [ + "Matrix", + "magrittr", + "pkgconfig", + "rlang" + ] + }, + "ini": { + "Package": "ini", + "Version": "0.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6154ec2223172bce8162d4153cda21f7", + "Requirements": [] + }, + "irlba": { + "Package": "irlba", + "Version": "2.3.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "acb06a47b732c6251afd16e19c3201ff", + "Requirements": [ + "Matrix" + ] + }, + "isoband": { + "Package": "isoband", + "Version": "0.2.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "cfdea9dea85c1a973991c8cbe299f4da", + "Requirements": [] + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5aab57a3bd297eee1c1d862735972182", + "Requirements": [ + "htmltools" + ] + }, + "jsonlite": { + "Package": "jsonlite", + "Version": "1.8.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2e7ed071fd6bd047fe2366d3adf4fe46", + "Requirements": [] + }, + "knitr": { + "Package": "knitr", + "Version": "1.40", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "caea8b0f899a0b1738444b9bc47067e7", + "Requirements": [ + "evaluate", + "highr", + "stringr", + "xfun", + "yaml" + ] + }, + "labeling": { + "Package": "labeling", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3d5108641f47470611a32d0bdf357a72", + "Requirements": [] + }, + "lambda.r": { + "Package": "lambda.r", + "Version": "1.2.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b1e925c4b9ffeb901bacf812cbe9a6ad", + "Requirements": [ + "formatR" + ] + }, + "later": { + "Package": "later", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7e7b457d7766bc47f2a5f21cc2984f8e", + "Requirements": [ + "Rcpp", + "rlang" + ] + }, + "lattice": { + "Package": "lattice", + "Version": "0.20-45", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b64cdbb2b340437c4ee047a1f4c4377b", + "Requirements": [] + }, + "lazyeval": { + "Package": "lazyeval", + "Version": "0.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d908914ae53b04d4c0c0fd72ecc35370", + "Requirements": [] + }, + "leiden": { + "Package": "leiden", + "Version": "0.4.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3ddd87b156152001d3ab82979808af00", + "Requirements": [ + "Matrix", + "igraph", + "reticulate" + ] + }, + "lifecycle": { + "Package": "lifecycle", + "Version": "1.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "001cecbeac1cff9301bdc3775ee46a86", + "Requirements": [ + "cli", + "glue", + "rlang" + ] + }, + "listenv": { + "Package": "listenv", + "Version": "0.8.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0bde42ee282efb18c7c4e63822f5b4f7", + "Requirements": [] + }, + "lme4": { + "Package": "lme4", + "Version": "1.1-30", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d9d5f45b57f68785c350504c0329d285", + "Requirements": [ + "MASS", + "Matrix", + "Rcpp", + "RcppEigen", + "boot", + "lattice", + "minqa", + "nlme", + "nloptr" + ] + }, + "lmtest": { + "Package": "lmtest", + "Version": "0.9-40", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c6fafa6cccb1e1dfe7f7d122efd6e6a7", + "Requirements": [ + "zoo" + ] + }, + "magrittr": { + "Package": "magrittr", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7ce2733a9826b3aeb1775d56fd305472", + "Requirements": [] + }, + "matrixStats": { + "Package": "matrixStats", + "Version": "0.62.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "36ad89a805c436c5316c22490079da67", + "Requirements": [] + }, + "memoise": { + "Package": "memoise", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c", + "Requirements": [ + "cachem", + "rlang" + ] + }, + "mgcv": { + "Package": "mgcv", + "Version": "1.8-40", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c6b2fdb18cf68ab613bd564363e1ba0d", + "Requirements": [ + "Matrix", + "nlme" + ] + }, + "mime": { + "Package": "mime", + "Version": "0.12", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "18e9c28c1d3ca1560ce30658b22ce104", + "Requirements": [] + }, + "miniUI": { + "Package": "miniUI", + "Version": "0.1.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fec5f52652d60615fdb3957b3d74324a", + "Requirements": [ + "htmltools", + "shiny" + ] + }, + "minqa": { + "Package": "minqa", + "Version": "1.2.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "eaee7d2a6f3ed4491df868611cb064cc", + "Requirements": [ + "Rcpp" + ] + }, + "munsell": { + "Package": "munsell", + "Version": "0.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6dfe8bf774944bd5595785e3229d8771", + "Requirements": [ + "colorspace" + ] + }, + "nlme": { + "Package": "nlme", + "Version": "3.1-160", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "02e3c6e7df163aafa8477225e6827bc5", + "Requirements": [ + "lattice" + ] + }, + "nloptr": { + "Package": "nloptr", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "277c67a08f358f42b6a77826e4492f79", + "Requirements": [ + "testthat" + ] + }, + "nnet": { + "Package": "nnet", + "Version": "7.3-18", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "170da2130d5332bea7d6ede01875ba1d", + "Requirements": [] + }, + "numDeriv": { + "Package": "numDeriv", + "Version": "2016.8-1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "df58958f293b166e4ab885ebcad90e02", + "Requirements": [] + }, + "openssl": { + "Package": "openssl", + "Version": "2.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e86c5ffeb8474a9e03d75f5d2919683e", + "Requirements": [ + "askpass" + ] + }, + "parallelly": { + "Package": "parallelly", + "Version": "1.32.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9e3d8d65cb9c5ca5966340a6bfec60b2", + "Requirements": [] + }, + "patchwork": { + "Package": "patchwork", + "Version": "1.1.2.9000", + "Source": "GitHub", + "RemoteType": "github", + "RemoteHost": "api.github.com", + "RemoteRepo": "patchwork", + "RemoteUsername": "thomasp85", + "RemoteRef": "HEAD", + "RemoteSha": "c14c9606902909810fb5903850c701f4d9a8535e", + "Hash": "051f836efe03141dc67ee9aa1c74dea4", + "Requirements": [ + "ggplot2", + "gtable" + ] + }, + "pbapply": { + "Package": "pbapply", + "Version": "1.5-0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "11359a5bb73622ab3f4136bf57108b64", + "Requirements": [] + }, + "pbkrtest": { + "Package": "pbkrtest", + "Version": "0.5.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b304ff5955f37b48bd30518faf582929", + "Requirements": [ + "MASS", + "Matrix", + "broom", + "dplyr", + "knitr", + "lme4", + "magrittr", + "numDeriv" + ] + }, + "pillar": { + "Package": "pillar", + "Version": "1.8.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f2316df30902c81729ae9de95ad5a608", + "Requirements": [ + "cli", + "fansi", + "glue", + "lifecycle", + "rlang", + "utf8", + "vctrs" + ] + }, + "pkgbuild": { + "Package": "pkgbuild", + "Version": "1.3.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "66d2adfed274daf81ccfe77d974c3b9b", + "Requirements": [ + "R6", + "callr", + "cli", + "crayon", + "desc", + "prettyunits", + "rprojroot", + "withr" + ] + }, + "pkgconfig": { + "Package": "pkgconfig", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "01f28d4278f15c76cddbea05899c5d6f", + "Requirements": [] + }, + "pkgdown": { + "Package": "pkgdown", + "Version": "2.0.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f958d0b2a5dabc5ffd414f062b1ffbe7", + "Requirements": [ + "bslib", + "callr", + "cli", + "desc", + "digest", + "downlit", + "fs", + "httr", + "jsonlite", + "magrittr", + "memoise", + "purrr", + "ragg", + "rlang", + "rmarkdown", + "tibble", + "whisker", + "withr", + "xml2", + "yaml" + ] + }, + "pkgload": { + "Package": "pkgload", + "Version": "1.3.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4b20f937a363c78a5730265c1925f54a", + "Requirements": [ + "cli", + "crayon", + "desc", + "fs", + "glue", + "rlang", + "rprojroot", + "withr" + ] + }, + "plogr": { + "Package": "plogr", + "Version": "0.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "09eb987710984fc2905c7129c7d85e65", + "Requirements": [] + }, + "plotly": { + "Package": "plotly", + "Version": "4.10.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fbb11e44d057996ca5fe40d959cacfb0", + "Requirements": [ + "RColorBrewer", + "base64enc", + "crosstalk", + "data.table", + "digest", + "dplyr", + "ggplot2", + "htmltools", + "htmlwidgets", + "httr", + "jsonlite", + "lazyeval", + "magrittr", + "promises", + "purrr", + "rlang", + "scales", + "tibble", + "tidyr", + "vctrs", + "viridisLite" + ] + }, + "plyr": { + "Package": "plyr", + "Version": "1.8.7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9c17c6ee41639ebdc1d7266546d3b627", + "Requirements": [ + "Rcpp" + ] + }, + "png": { + "Package": "png", + "Version": "0.1-7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "03b7076c234cb3331288919983326c55", + "Requirements": [] + }, + "polyclip": { + "Package": "polyclip", + "Version": "1.10-0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "cb167f328b3ada4ec5cf67a7df4c900a", + "Requirements": [] + }, + "polynom": { + "Package": "polynom", + "Version": "1.4-1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ceb5c2a59ba33d42d051285a3e8a5118", + "Requirements": [] + }, + "praise": { + "Package": "praise", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a555924add98c99d2f411e37e7d25e9f", + "Requirements": [] + }, + "prereg": { + "Package": "prereg", + "Version": "0.6.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "067f9c808e9beed351ceb96dc09b60f0", + "Requirements": [ + "rmarkdown" + ] + }, + "prettyunits": { + "Package": "prettyunits", + "Version": "1.1.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "95ef9167b75dde9d2ccc3c7528393e7e", + "Requirements": [] + }, + "processx": { + "Package": "processx", + "Version": "3.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f91df0f5f31ffdf88bc0b624f5ebab0f", + "Requirements": [ + "R6", + "ps" + ] + }, + "profvis": { + "Package": "profvis", + "Version": "0.3.7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e9d21e79848e02e524bea6f5bd53e7e4", + "Requirements": [ + "htmlwidgets", + "stringr" + ] + }, + "progress": { + "Package": "progress", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061", + "Requirements": [ + "R6", + "crayon", + "hms", + "prettyunits" + ] + }, + "progressr": { + "Package": "progressr", + "Version": "0.11.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2d004de7f34cd30956e95265f56a8bb6", + "Requirements": [ + "digest" + ] + }, + "promises": { + "Package": "promises", + "Version": "1.2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4ab2c43adb4d4699cf3690acd378d75d", + "Requirements": [ + "R6", + "Rcpp", + "later", + "magrittr", + "rlang" + ] + }, + "ps": { + "Package": "ps", + "Version": "1.7.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8b93531308c01ad0e56d9eadcc0c4fcd", + "Requirements": [] + }, + "purrr": { + "Package": "purrr", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "54842a2443c76267152eface28d9e90a", + "Requirements": [ + "magrittr", + "rlang" + ] + }, + "quantreg": { + "Package": "quantreg", + "Version": "5.94", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b8b2b861526c344a7e16e5991fa5a4ab", + "Requirements": [ + "MASS", + "Matrix", + "MatrixModels", + "SparseM", + "survival" + ] + }, + "ragg": { + "Package": "ragg", + "Version": "1.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a7b1a8b453c5385786cdfa75aba57483", + "Requirements": [ + "systemfonts", + "textshaping" + ] + }, + "ranger": { + "Package": "ranger", + "Version": "0.14.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fd61f8408066c5a659c6a95c5a73bfc7", + "Requirements": [ + "Matrix", + "Rcpp", + "RcppEigen" + ] + }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5e3c5dc0b071b21fa128676560dbe94d", + "Requirements": [] + }, + "rcmdcheck": { + "Package": "rcmdcheck", + "Version": "1.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8f25ebe2ec38b1f2aef3b0d2ef76f6c4", + "Requirements": [ + "R6", + "callr", + "cli", + "curl", + "desc", + "digest", + "pkgbuild", + "prettyunits", + "rprojroot", + "sessioninfo", + "withr", + "xopen" + ] + }, + "rematch2": { + "Package": "rematch2", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "76c9e04c712a05848ae7a23d2f170a40", + "Requirements": [ + "tibble" + ] + }, + "remotes": { + "Package": "remotes", + "Version": "2.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "227045be9aee47e6dda9bb38ac870d67", + "Requirements": [] + }, + "renv": { + "Package": "renv", + "Version": "0.16.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c9e8442ab69bc21c9697ecf856c1e6c7", + "Requirements": [] + }, + "reshape": { + "Package": "reshape", + "Version": "0.8.9", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "603d56041d7d4fa3ceb1864b3f6ee6b1", + "Requirements": [ + "plyr" + ] + }, + "reshape2": { + "Package": "reshape2", + "Version": "1.4.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bb5996d0bd962d214a11140d77589917", + "Requirements": [ + "Rcpp", + "plyr", + "stringr" + ] + }, + "restfulr": { + "Package": "restfulr", + "Version": "0.0.15", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "44651c1e68eda9d462610aca9f15a815", + "Requirements": [ + "RCurl", + "S4Vectors", + "XML", + "rjson", + "yaml" + ] + }, + "reticulate": { + "Package": "reticulate", + "Version": "1.26", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "91c176c84a2e3558572d2cbaddc08bd4", + "Requirements": [ + "Matrix", + "Rcpp", + "RcppTOML", + "here", + "jsonlite", + "png", + "rappdirs", + "withr" + ] + }, + "rgeos": { + "Package": "rgeos", + "Version": "0.5-9", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7cfa4f73a070042ecf141d5c1d1bfcae", + "Requirements": [ + "sp" + ] + }, + "rjson": { + "Package": "rjson", + "Version": "0.2.21", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f9da75e6444e95a1baf8ca24909d63b9", + "Requirements": [] + }, + "rlang": { + "Package": "rlang", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4ed1f8336c8d52c3e750adcdc57228a7", + "Requirements": [] + }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.17", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e97c8be593e010f93520e8215c0f9189", + "Requirements": [ + "bslib", + "evaluate", + "htmltools", + "jquerylib", + "jsonlite", + "knitr", + "stringr", + "tinytex", + "xfun", + "yaml" + ] + }, + "roxygen2": { + "Package": "roxygen2", + "Version": "7.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "da1f278262e563c835345872f2fef537", + "Requirements": [ + "R6", + "brew", + "cli", + "commonmark", + "cpp11", + "desc", + "digest", + "knitr", + "pkgload", + "purrr", + "rlang", + "stringi", + "stringr", + "withr", + "xml2" + ] + }, + "rpart": { + "Package": "rpart", + "Version": "4.1.16", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ea3ca1d9473daabb3cd0f1b4f974c1ed", + "Requirements": [] + }, + "rprojroot": { + "Package": "rprojroot", + "Version": "2.0.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1de7ab598047a87bba48434ba35d497d", + "Requirements": [] + }, + "rstatix": { + "Package": "rstatix", + "Version": "0.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "aa020f8efde649badd0b2b5456e942fe", + "Requirements": [ + "broom", + "car", + "corrplot", + "dplyr", + "generics", + "magrittr", + "purrr", + "rlang", + "tibble", + "tidyr", + "tidyselect" + ] + }, + "rstudioapi": { + "Package": "rstudioapi", + "Version": "0.14", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "690bd2acc42a9166ce34845884459320", + "Requirements": [] + }, + "rticles": { + "Package": "rticles", + "Version": "0.24", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "cb84b88016fa556ff9476b71d8d5e3f0", + "Requirements": [ + "knitr", + "rmarkdown", + "tinytex", + "xfun", + "yaml" + ] + }, + "rtracklayer": { + "Package": "rtracklayer", + "Version": "1.56.1", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/rtracklayer", + "git_branch": "RELEASE_3_15", + "git_last_commit": "4c6d220", + "git_last_commit_date": "2022-06-22", + "Hash": "b0b85c053f94f15a6987993debd70763", + "Requirements": [ + "BiocGenerics", + "BiocIO", + "Biostrings", + "GenomeInfoDb", + "GenomicAlignments", + "GenomicRanges", + "IRanges", + "RCurl", + "Rsamtools", + "S4Vectors", + "XML", + "XVector", + "restfulr", + "zlibbioc" + ] + }, + "rversions": { + "Package": "rversions", + "Version": "2.1.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a9881dfed103e83f9de151dc17002cd1", + "Requirements": [ + "curl", + "xml2" + ] + }, + "sass": { + "Package": "sass", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1b191143d7d3444d504277843f3a95fe", + "Requirements": [ + "R6", + "fs", + "htmltools", + "rappdirs", + "rlang" + ] + }, + "scales": { + "Package": "scales", + "Version": "1.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "906cb23d2f1c5680b8ce439b44c6fa63", + "Requirements": [ + "R6", + "RColorBrewer", + "farver", + "labeling", + "lifecycle", + "munsell", + "rlang", + "viridisLite" + ] + }, + "scattermore": { + "Package": "scattermore", + "Version": "0.8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "77ef398f338597b86a3d6853c585ce38", + "Requirements": [ + "ggplot2", + "scales" + ] + }, + "sctransform": { + "Package": "sctransform", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "e70cffc72eb877eb06e86a20097e93af", + "Requirements": [ + "MASS", + "Matrix", + "Rcpp", + "RcppArmadillo", + "dplyr", + "future", + "future.apply", + "ggplot2", + "gridExtra", + "magrittr", + "matrixStats", + "reshape2", + "rlang" + ] + }, + "sessioninfo": { + "Package": "sessioninfo", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "3f9796a8d0a0e8c6eb49a4b029359d1f", + "Requirements": [ + "cli" + ] + }, + "shiny": { + "Package": "shiny", + "Version": "1.7.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "4f7970a3edb0a153ac6b376785a1944a", + "Requirements": [ + "R6", + "bslib", + "cachem", + "commonmark", + "crayon", + "ellipsis", + "fastmap", + "fontawesome", + "glue", + "htmltools", + "httpuv", + "jsonlite", + "later", + "lifecycle", + "mime", + "promises", + "rlang", + "sourcetools", + "withr", + "xtable" + ] + }, + "sitmo": { + "Package": "sitmo", + "Version": "2.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c956d93f6768a9789edbc13072b70c78", + "Requirements": [ + "Rcpp" + ] + }, + "snow": { + "Package": "snow", + "Version": "0.4-4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "40b74690debd20c57d93d8c246b305d4", + "Requirements": [] + }, + "sourcetools": { + "Package": "sourcetools", + "Version": "0.1.7", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "947e4e02a79effa5d512473e10f41797", + "Requirements": [] + }, + "sp": { + "Package": "sp", + "Version": "1.5-0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "2a118bdd2db0a301711e0a9e3e3206d5", + "Requirements": [ + "lattice" + ] + }, + "spatstat.core": { + "Package": "spatstat.core", + "Version": "2.4-4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "545286d6a69ff647be18aab77306fa54", + "Requirements": [ + "Matrix", + "abind", + "goftest", + "mgcv", + "nlme", + "rpart", + "spatstat.data", + "spatstat.geom", + "spatstat.random", + "spatstat.sparse", + "spatstat.utils", + "tensor" + ] + }, + "spatstat.data": { + "Package": "spatstat.data", + "Version": "2.2-0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5b4f6c12d1a222680579070a045786bb", + "Requirements": [ + "Matrix", + "spatstat.utils" + ] + }, + "spatstat.geom": { + "Package": "spatstat.geom", + "Version": "2.4-0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "33f4612dc27fa9228cac4713bb2edfd7", + "Requirements": [ + "deldir", + "polyclip", + "spatstat.data", + "spatstat.utils" + ] + }, + "spatstat.random": { + "Package": "spatstat.random", + "Version": "2.2-0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c08d6e00855f11e04ac863dce8d6779e", + "Requirements": [ + "spatstat.data", + "spatstat.geom", + "spatstat.utils" + ] + }, + "spatstat.sparse": { + "Package": "spatstat.sparse", + "Version": "2.1-1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "cde91679dea4a2fb53833a86f32c94f5", + "Requirements": [ + "Matrix", + "abind", + "spatstat.utils", + "tensor" + ] + }, + "spatstat.utils": { + "Package": "spatstat.utils", + "Version": "2.3-1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "cd59e2bcc05a5e34c00fe4760f118960", + "Requirements": [] + }, + "stringi": { + "Package": "stringi", + "Version": "1.7.8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a68b980681bcbc84c7a67003fa796bfb", + "Requirements": [] + }, + "stringr": { + "Package": "stringr", + "Version": "1.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a66ad12140cd34d4f9dfcc19e84fc2a5", + "Requirements": [ + "glue", + "magrittr", + "stringi" + ] + }, + "survival": { + "Package": "survival", + "Version": "3.4-0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "04411ae66ab4659230c067c32966fc20", + "Requirements": [ + "Matrix" + ] + }, + "sys": { + "Package": "sys", + "Version": "3.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "34c16f1ef796057bfa06d3f4ff818a5d", + "Requirements": [] + }, + "systemfonts": { + "Package": "systemfonts", + "Version": "1.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "90b28393209827327de889f49935140a", + "Requirements": [ + "cpp11" + ] + }, + "tensor": { + "Package": "tensor", + "Version": "1.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "25cfab6cf405c15bccf7e69ec39df090", + "Requirements": [] + }, + "testthat": { + "Package": "testthat", + "Version": "3.1.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6e3c4843f1ed0d3d90f35498671a001c", + "Requirements": [ + "R6", + "brio", + "callr", + "cli", + "desc", + "digest", + "ellipsis", + "evaluate", + "jsonlite", + "lifecycle", + "magrittr", + "pkgload", + "praise", + "processx", + "ps", + "rlang", + "waldo", + "withr" + ] + }, + "textshaping": { + "Package": "textshaping", + "Version": "0.3.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1ab6223d3670fac7143202cb6a2d43d5", + "Requirements": [ + "cpp11", + "systemfonts" + ] + }, + "tibble": { + "Package": "tibble", + "Version": "3.1.8", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "56b6934ef0f8c68225949a8672fe1a8f", + "Requirements": [ + "fansi", + "lifecycle", + "magrittr", + "pillar", + "pkgconfig", + "rlang", + "vctrs" + ] + }, + "tidylog": { + "Package": "tidylog", + "Version": "1.0.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a55d41e241dbe858d1456d952ce3301f", + "Requirements": [ + "clisymbols", + "dplyr", + "glue", + "tidyr" + ] + }, + "tidyr": { + "Package": "tidyr", + "Version": "1.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "cdb403db0de33ccd1b6f53b83736efa8", + "Requirements": [ + "cpp11", + "dplyr", + "ellipsis", + "glue", + "lifecycle", + "magrittr", + "purrr", + "rlang", + "tibble", + "tidyselect", + "vctrs" + ] + }, + "tidyselect": { + "Package": "tidyselect", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "79540e5fcd9e0435af547d885f184fd5", + "Requirements": [ + "cli", + "glue", + "lifecycle", + "rlang", + "vctrs", + "withr" + ] + }, + "tinytex": { + "Package": "tinytex", + "Version": "0.42", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7629c6c1540835d5248e6e7df265fa74", + "Requirements": [ + "xfun" + ] + }, + "urlchecker": { + "Package": "urlchecker", + "Version": "1.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "409328b8e1253c8d729a7836fe7f7a16", + "Requirements": [ + "cli", + "curl", + "xml2" + ] + }, + "usethis": { + "Package": "usethis", + "Version": "2.1.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a67a22c201832b12c036cc059f1d137d", + "Requirements": [ + "cli", + "clipr", + "crayon", + "curl", + "desc", + "fs", + "gert", + "gh", + "glue", + "jsonlite", + "lifecycle", + "purrr", + "rappdirs", + "rlang", + "rprojroot", + "rstudioapi", + "whisker", + "withr", + "yaml" + ] + }, + "utf8": { + "Package": "utf8", + "Version": "1.2.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c9c462b759a5cc844ae25b5942654d13", + "Requirements": [] + }, + "uwot": { + "Package": "uwot", + "Version": "0.1.14", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c40f4dbc76dd87140045b37a3150a0f1", + "Requirements": [ + "FNN", + "Matrix", + "Rcpp", + "RcppAnnoy", + "RcppProgress", + "dqrng", + "irlba" + ] + }, + "vctrs": { + "Package": "vctrs", + "Version": "0.4.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0e3dfc070b2a8f0478fcdf86fb33355d", + "Requirements": [ + "cli", + "glue", + "rlang" + ] + }, + "viridisLite": { + "Package": "viridisLite", + "Version": "0.4.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "62f4b5da3e08d8e5bcba6cac15603f70", + "Requirements": [] + }, + "waldo": { + "Package": "waldo", + "Version": "0.4.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "035fba89d0c86e2113120f93301b98ad", + "Requirements": [ + "cli", + "diffobj", + "fansi", + "glue", + "rematch2", + "rlang", + "tibble" + ] + }, + "whisker": { + "Package": "whisker", + "Version": "0.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "ca970b96d894e90397ed20637a0c1bbe", + "Requirements": [] + }, + "withr": { + "Package": "withr", + "Version": "2.5.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c0e49a9760983e81e55cdd9be92e7182", + "Requirements": [] + }, + "worcs": { + "Package": "worcs", + "Version": "0.1.10", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "d6f0b99aebde4d2c30ca73e09686fbd2", + "Requirements": [ + "credentials", + "digest", + "gert", + "gh", + "prereg", + "ranger", + "renv", + "rmarkdown", + "rticles", + "tinytex", + "usethis", + "yaml" + ] + }, + "xfun": { + "Package": "xfun", + "Version": "0.34", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9eba2411b0b1f879797141bd24df7407", + "Requirements": [] + }, + "xml2": { + "Package": "xml2", + "Version": "1.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "40682ed6a969ea5abfd351eb67833adc", + "Requirements": [] + }, + "xopen": { + "Package": "xopen", + "Version": "1.0.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6c85f015dee9cc7710ddd20f86881f58", + "Requirements": [ + "processx" + ] + }, + "xtable": { + "Package": "xtable", + "Version": "1.8-4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2", + "Requirements": [] + }, + "yaml": { + "Package": "yaml", + "Version": "2.3.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9b570515751dcbae610f29885e025b41", + "Requirements": [] + }, + "zip": { + "Package": "zip", + "Version": "2.2.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "a7e91189fa51d9029a30eba3831ce53f", + "Requirements": [] + }, + "zlibbioc": { + "Package": "zlibbioc", + "Version": "1.42.0", + "Source": "Bioconductor", + "git_url": "https://git.bioconductor.org/packages/zlibbioc", + "git_branch": "RELEASE_3_15", + "git_last_commit": "aa074d7", + "git_last_commit_date": "2022-04-26", + "Hash": "908694d02f7332d0576e7c881e572c5a", + "Requirements": [] + }, + "zoo": { + "Package": "zoo", + "Version": "1.8-11", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "874a5b77fe0cfacf2a3450069ae70926", + "Requirements": [ + "lattice" + ] + } + } +} diff --git a/renv/.gitignore b/renv/.gitignore new file mode 100644 index 0000000..0ec0cbb --- /dev/null +++ b/renv/.gitignore @@ -0,0 +1,7 @@ +library/ +local/ +cellar/ +lock/ +python/ +sandbox/ +staging/ diff --git a/renv/activate.R b/renv/activate.R new file mode 100644 index 0000000..019b5a6 --- /dev/null +++ b/renv/activate.R @@ -0,0 +1,994 @@ + +local({ + + # the requested version of renv + version <- "0.16.0" + + # the project directory + project <- getwd() + + # figure out whether the autoloader is enabled + enabled <- local({ + + # first, check config option + override <- getOption("renv.config.autoloader.enabled") + if (!is.null(override)) + return(override) + + # next, check environment variables + # TODO: prefer using the configuration one in the future + envvars <- c( + "RENV_CONFIG_AUTOLOADER_ENABLED", + "RENV_AUTOLOADER_ENABLED", + "RENV_ACTIVATE_PROJECT" + ) + + for (envvar in envvars) { + envval <- Sys.getenv(envvar, unset = NA) + if (!is.na(envval)) + return(tolower(envval) %in% c("true", "t", "1")) + } + + # enable by default + TRUE + + }) + + if (!enabled) + return(FALSE) + + # avoid recursion + if (identical(getOption("renv.autoloader.running"), TRUE)) { + warning("ignoring recursive attempt to run renv autoloader") + return(invisible(TRUE)) + } + + # signal that we're loading renv during R startup + options(renv.autoloader.running = TRUE) + on.exit(options(renv.autoloader.running = NULL), add = TRUE) + + # signal that we've consented to use renv + options(renv.consent = TRUE) + + # load the 'utils' package eagerly -- this ensures that renv shims, which + # mask 'utils' packages, will come first on the search path + library(utils, lib.loc = .Library) + + # unload renv if it's already been loaded + if ("renv" %in% loadedNamespaces()) + unloadNamespace("renv") + + # load bootstrap tools + `%||%` <- function(x, y) { + if (is.environment(x) || length(x)) x else y + } + + bootstrap <- function(version, library) { + + # attempt to download renv + tarball <- tryCatch(renv_bootstrap_download(version), error = identity) + if (inherits(tarball, "error")) + stop("failed to download renv ", version) + + # now attempt to install + status <- tryCatch(renv_bootstrap_install(version, tarball, library), error = identity) + if (inherits(status, "error")) + stop("failed to install renv ", version) + + } + + renv_bootstrap_tests_running <- function() { + getOption("renv.tests.running", default = FALSE) + } + + renv_bootstrap_repos <- function() { + + # check for repos override + repos <- Sys.getenv("RENV_CONFIG_REPOS_OVERRIDE", unset = NA) + if (!is.na(repos)) + return(repos) + + # check for lockfile repositories + repos <- tryCatch(renv_bootstrap_repos_lockfile(), error = identity) + if (!inherits(repos, "error") && length(repos)) + return(repos) + + # if we're testing, re-use the test repositories + if (renv_bootstrap_tests_running()) + return(getOption("renv.tests.repos")) + + # retrieve current repos + repos <- getOption("repos") + + # ensure @CRAN@ entries are resolved + repos[repos == "@CRAN@"] <- getOption( + "renv.repos.cran", + "https://cloud.r-project.org" + ) + + # add in renv.bootstrap.repos if set + default <- c(FALLBACK = "https://cloud.r-project.org") + extra <- getOption("renv.bootstrap.repos", default = default) + repos <- c(repos, extra) + + # remove duplicates that might've snuck in + dupes <- duplicated(repos) | duplicated(names(repos)) + repos[!dupes] + + } + + renv_bootstrap_repos_lockfile <- function() { + + lockpath <- Sys.getenv("RENV_PATHS_LOCKFILE", unset = "renv.lock") + if (!file.exists(lockpath)) + return(NULL) + + lockfile <- tryCatch(renv_json_read(lockpath), error = identity) + if (inherits(lockfile, "error")) { + warning(lockfile) + return(NULL) + } + + repos <- lockfile$R$Repositories + if (length(repos) == 0) + return(NULL) + + keys <- vapply(repos, `[[`, "Name", FUN.VALUE = character(1)) + vals <- vapply(repos, `[[`, "URL", FUN.VALUE = character(1)) + names(vals) <- keys + + return(vals) + + } + + renv_bootstrap_download <- function(version) { + + # if the renv version number has 4 components, assume it must + # be retrieved via github + nv <- numeric_version(version) + components <- unclass(nv)[[1]] + + # if this appears to be a development version of 'renv', we'll + # try to restore from github + dev <- length(components) == 4L + + # begin collecting different methods for finding renv + methods <- c( + renv_bootstrap_download_tarball, + if (dev) + renv_bootstrap_download_github + else c( + renv_bootstrap_download_cran_latest, + renv_bootstrap_download_cran_archive + ) + ) + + for (method in methods) { + path <- tryCatch(method(version), error = identity) + if (is.character(path) && file.exists(path)) + return(path) + } + + stop("failed to download renv ", version) + + } + + renv_bootstrap_download_impl <- function(url, destfile) { + + mode <- "wb" + + # https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17715 + fixup <- + Sys.info()[["sysname"]] == "Windows" && + substring(url, 1L, 5L) == "file:" + + if (fixup) + mode <- "w+b" + + args <- list( + url = url, + destfile = destfile, + mode = mode, + quiet = TRUE + ) + + if ("headers" %in% names(formals(utils::download.file))) + args$headers <- renv_bootstrap_download_custom_headers(url) + + do.call(utils::download.file, args) + + } + + renv_bootstrap_download_custom_headers <- function(url) { + + headers <- getOption("renv.download.headers") + if (is.null(headers)) + return(character()) + + if (!is.function(headers)) + stopf("'renv.download.headers' is not a function") + + headers <- headers(url) + if (length(headers) == 0L) + return(character()) + + if (is.list(headers)) + headers <- unlist(headers, recursive = FALSE, use.names = TRUE) + + ok <- + is.character(headers) && + is.character(names(headers)) && + all(nzchar(names(headers))) + + if (!ok) + stop("invocation of 'renv.download.headers' did not return a named character vector") + + headers + + } + + renv_bootstrap_download_cran_latest <- function(version) { + + spec <- renv_bootstrap_download_cran_latest_find(version) + type <- spec$type + repos <- spec$repos + + message("* Downloading renv ", version, " ... ", appendLF = FALSE) + + baseurl <- utils::contrib.url(repos = repos, type = type) + ext <- if (identical(type, "source")) + ".tar.gz" + else if (Sys.info()[["sysname"]] == "Windows") + ".zip" + else + ".tgz" + name <- sprintf("renv_%s%s", version, ext) + url <- paste(baseurl, name, sep = "/") + + destfile <- file.path(tempdir(), name) + status <- tryCatch( + renv_bootstrap_download_impl(url, destfile), + condition = identity + ) + + if (inherits(status, "condition")) { + message("FAILED") + return(FALSE) + } + + # report success and return + message("OK (downloaded ", type, ")") + destfile + + } + + renv_bootstrap_download_cran_latest_find <- function(version) { + + # check whether binaries are supported on this system + binary <- + getOption("renv.bootstrap.binary", default = TRUE) && + !identical(.Platform$pkgType, "source") && + !identical(getOption("pkgType"), "source") && + Sys.info()[["sysname"]] %in% c("Darwin", "Windows") + + types <- c(if (binary) "binary", "source") + + # iterate over types + repositories + for (type in types) { + for (repos in renv_bootstrap_repos()) { + + # retrieve package database + db <- tryCatch( + as.data.frame( + utils::available.packages(type = type, repos = repos), + stringsAsFactors = FALSE + ), + error = identity + ) + + if (inherits(db, "error")) + next + + # check for compatible entry + entry <- db[db$Package %in% "renv" & db$Version %in% version, ] + if (nrow(entry) == 0) + next + + # found it; return spec to caller + spec <- list(entry = entry, type = type, repos = repos) + return(spec) + + } + } + + # if we got here, we failed to find renv + fmt <- "renv %s is not available from your declared package repositories" + stop(sprintf(fmt, version)) + + } + + renv_bootstrap_download_cran_archive <- function(version) { + + name <- sprintf("renv_%s.tar.gz", version) + repos <- renv_bootstrap_repos() + urls <- file.path(repos, "src/contrib/Archive/renv", name) + destfile <- file.path(tempdir(), name) + + message("* Downloading renv ", version, " ... ", appendLF = FALSE) + + for (url in urls) { + + status <- tryCatch( + renv_bootstrap_download_impl(url, destfile), + condition = identity + ) + + if (identical(status, 0L)) { + message("OK") + return(destfile) + } + + } + + message("FAILED") + return(FALSE) + + } + + renv_bootstrap_download_tarball <- function(version) { + + # if the user has provided the path to a tarball via + # an environment variable, then use it + tarball <- Sys.getenv("RENV_BOOTSTRAP_TARBALL", unset = NA) + if (is.na(tarball)) + return() + + # allow directories + info <- file.info(tarball, extra_cols = FALSE) + if (identical(info$isdir, TRUE)) { + name <- sprintf("renv_%s.tar.gz", version) + tarball <- file.path(tarball, name) + } + + # bail if it doesn't exist + if (!file.exists(tarball)) { + + # let the user know we weren't able to honour their request + fmt <- "* RENV_BOOTSTRAP_TARBALL is set (%s) but does not exist." + msg <- sprintf(fmt, tarball) + warning(msg) + + # bail + return() + + } + + fmt <- "* Bootstrapping with tarball at path '%s'." + msg <- sprintf(fmt, tarball) + message(msg) + + tarball + + } + + renv_bootstrap_download_github <- function(version) { + + enabled <- Sys.getenv("RENV_BOOTSTRAP_FROM_GITHUB", unset = "TRUE") + if (!identical(enabled, "TRUE")) + return(FALSE) + + # prepare download options + pat <- Sys.getenv("GITHUB_PAT") + if (nzchar(Sys.which("curl")) && nzchar(pat)) { + fmt <- "--location --fail --header \"Authorization: token %s\"" + extra <- sprintf(fmt, pat) + saved <- options("download.file.method", "download.file.extra") + options(download.file.method = "curl", download.file.extra = extra) + on.exit(do.call(base::options, saved), add = TRUE) + } else if (nzchar(Sys.which("wget")) && nzchar(pat)) { + fmt <- "--header=\"Authorization: token %s\"" + extra <- sprintf(fmt, pat) + saved <- options("download.file.method", "download.file.extra") + options(download.file.method = "wget", download.file.extra = extra) + on.exit(do.call(base::options, saved), add = TRUE) + } + + message("* Downloading renv ", version, " from GitHub ... ", appendLF = FALSE) + + url <- file.path("https://api.github.com/repos/rstudio/renv/tarball", version) + name <- sprintf("renv_%s.tar.gz", version) + destfile <- file.path(tempdir(), name) + + status <- tryCatch( + renv_bootstrap_download_impl(url, destfile), + condition = identity + ) + + if (!identical(status, 0L)) { + message("FAILED") + return(FALSE) + } + + message("OK") + return(destfile) + + } + + renv_bootstrap_install <- function(version, tarball, library) { + + # attempt to install it into project library + message("* Installing renv ", version, " ... ", appendLF = FALSE) + dir.create(library, showWarnings = FALSE, recursive = TRUE) + + # invoke using system2 so we can capture and report output + bin <- R.home("bin") + exe <- if (Sys.info()[["sysname"]] == "Windows") "R.exe" else "R" + r <- file.path(bin, exe) + + args <- c( + "--vanilla", "CMD", "INSTALL", "--no-multiarch", + "-l", shQuote(path.expand(library)), + shQuote(path.expand(tarball)) + ) + + output <- system2(r, args, stdout = TRUE, stderr = TRUE) + message("Done!") + + # check for successful install + status <- attr(output, "status") + if (is.numeric(status) && !identical(status, 0L)) { + header <- "Error installing renv:" + lines <- paste(rep.int("=", nchar(header)), collapse = "") + text <- c(header, lines, output) + writeLines(text, con = stderr()) + } + + status + + } + + renv_bootstrap_platform_prefix <- function() { + + # construct version prefix + version <- paste(R.version$major, R.version$minor, sep = ".") + prefix <- paste("R", numeric_version(version)[1, 1:2], sep = "-") + + # include SVN revision for development versions of R + # (to avoid sharing platform-specific artefacts with released versions of R) + devel <- + identical(R.version[["status"]], "Under development (unstable)") || + identical(R.version[["nickname"]], "Unsuffered Consequences") + + if (devel) + prefix <- paste(prefix, R.version[["svn rev"]], sep = "-r") + + # build list of path components + components <- c(prefix, R.version$platform) + + # include prefix if provided by user + prefix <- renv_bootstrap_platform_prefix_impl() + if (!is.na(prefix) && nzchar(prefix)) + components <- c(prefix, components) + + # build prefix + paste(components, collapse = "/") + + } + + renv_bootstrap_platform_prefix_impl <- function() { + + # if an explicit prefix has been supplied, use it + prefix <- Sys.getenv("RENV_PATHS_PREFIX", unset = NA) + if (!is.na(prefix)) + return(prefix) + + # if the user has requested an automatic prefix, generate it + auto <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", unset = NA) + if (auto %in% c("TRUE", "True", "true", "1")) + return(renv_bootstrap_platform_prefix_auto()) + + # empty string on failure + "" + + } + + renv_bootstrap_platform_prefix_auto <- function() { + + prefix <- tryCatch(renv_bootstrap_platform_os(), error = identity) + if (inherits(prefix, "error") || prefix %in% "unknown") { + + msg <- paste( + "failed to infer current operating system", + "please file a bug report at https://github.com/rstudio/renv/issues", + sep = "; " + ) + + warning(msg) + + } + + prefix + + } + + renv_bootstrap_platform_os <- function() { + + sysinfo <- Sys.info() + sysname <- sysinfo[["sysname"]] + + # handle Windows + macOS up front + if (sysname == "Windows") + return("windows") + else if (sysname == "Darwin") + return("macos") + + # check for os-release files + for (file in c("/etc/os-release", "/usr/lib/os-release")) + if (file.exists(file)) + return(renv_bootstrap_platform_os_via_os_release(file, sysinfo)) + + # check for redhat-release files + if (file.exists("/etc/redhat-release")) + return(renv_bootstrap_platform_os_via_redhat_release()) + + "unknown" + + } + + renv_bootstrap_platform_os_via_os_release <- function(file, sysinfo) { + + # read /etc/os-release + release <- utils::read.table( + file = file, + sep = "=", + quote = c("\"", "'"), + col.names = c("Key", "Value"), + comment.char = "#", + stringsAsFactors = FALSE + ) + + vars <- as.list(release$Value) + names(vars) <- release$Key + + # get os name + os <- tolower(sysinfo[["sysname"]]) + + # read id + id <- "unknown" + for (field in c("ID", "ID_LIKE")) { + if (field %in% names(vars) && nzchar(vars[[field]])) { + id <- vars[[field]] + break + } + } + + # read version + version <- "unknown" + for (field in c("UBUNTU_CODENAME", "VERSION_CODENAME", "VERSION_ID", "BUILD_ID")) { + if (field %in% names(vars) && nzchar(vars[[field]])) { + version <- vars[[field]] + break + } + } + + # join together + paste(c(os, id, version), collapse = "-") + + } + + renv_bootstrap_platform_os_via_redhat_release <- function() { + + # read /etc/redhat-release + contents <- readLines("/etc/redhat-release", warn = FALSE) + + # infer id + id <- if (grepl("centos", contents, ignore.case = TRUE)) + "centos" + else if (grepl("redhat", contents, ignore.case = TRUE)) + "redhat" + else + "unknown" + + # try to find a version component (very hacky) + version <- "unknown" + + parts <- strsplit(contents, "[[:space:]]")[[1L]] + for (part in parts) { + + nv <- tryCatch(numeric_version(part), error = identity) + if (inherits(nv, "error")) + next + + version <- nv[1, 1] + break + + } + + paste(c("linux", id, version), collapse = "-") + + } + + renv_bootstrap_library_root_name <- function(project) { + + # use project name as-is if requested + asis <- Sys.getenv("RENV_PATHS_LIBRARY_ROOT_ASIS", unset = "FALSE") + if (asis) + return(basename(project)) + + # otherwise, disambiguate based on project's path + id <- substring(renv_bootstrap_hash_text(project), 1L, 8L) + paste(basename(project), id, sep = "-") + + } + + renv_bootstrap_library_root <- function(project) { + + prefix <- renv_bootstrap_profile_prefix() + + path <- Sys.getenv("RENV_PATHS_LIBRARY", unset = NA) + if (!is.na(path)) + return(paste(c(path, prefix), collapse = "/")) + + path <- renv_bootstrap_library_root_impl(project) + if (!is.null(path)) { + name <- renv_bootstrap_library_root_name(project) + return(paste(c(path, prefix, name), collapse = "/")) + } + + renv_bootstrap_paths_renv("library", project = project) + + } + + renv_bootstrap_library_root_impl <- function(project) { + + root <- Sys.getenv("RENV_PATHS_LIBRARY_ROOT", unset = NA) + if (!is.na(root)) + return(root) + + type <- renv_bootstrap_project_type(project) + if (identical(type, "package")) { + userdir <- renv_bootstrap_user_dir() + return(file.path(userdir, "library")) + } + + } + + renv_bootstrap_validate_version <- function(version) { + + loadedversion <- utils::packageDescription("renv", fields = "Version") + if (version == loadedversion) + return(TRUE) + + # assume four-component versions are from GitHub; three-component + # versions are from CRAN + components <- strsplit(loadedversion, "[.-]")[[1]] + remote <- if (length(components) == 4L) + paste("rstudio/renv", loadedversion, sep = "@") + else + paste("renv", loadedversion, sep = "@") + + fmt <- paste( + "renv %1$s was loaded from project library, but this project is configured to use renv %2$s.", + "Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.", + "Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", + sep = "\n" + ) + + msg <- sprintf(fmt, loadedversion, version, remote) + warning(msg, call. = FALSE) + + FALSE + + } + + renv_bootstrap_hash_text <- function(text) { + + hashfile <- tempfile("renv-hash-") + on.exit(unlink(hashfile), add = TRUE) + + writeLines(text, con = hashfile) + tools::md5sum(hashfile) + + } + + renv_bootstrap_load <- function(project, libpath, version) { + + # try to load renv from the project library + if (!requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) + return(FALSE) + + # warn if the version of renv loaded does not match + renv_bootstrap_validate_version(version) + + # load the project + renv::load(project) + + TRUE + + } + + renv_bootstrap_profile_load <- function(project) { + + # if RENV_PROFILE is already set, just use that + profile <- Sys.getenv("RENV_PROFILE", unset = NA) + if (!is.na(profile) && nzchar(profile)) + return(profile) + + # check for a profile file (nothing to do if it doesn't exist) + path <- renv_bootstrap_paths_renv("profile", profile = FALSE, project = project) + if (!file.exists(path)) + return(NULL) + + # read the profile, and set it if it exists + contents <- readLines(path, warn = FALSE) + if (length(contents) == 0L) + return(NULL) + + # set RENV_PROFILE + profile <- contents[[1L]] + if (!profile %in% c("", "default")) + Sys.setenv(RENV_PROFILE = profile) + + profile + + } + + renv_bootstrap_profile_prefix <- function() { + profile <- renv_bootstrap_profile_get() + if (!is.null(profile)) + return(file.path("profiles", profile, "renv")) + } + + renv_bootstrap_profile_get <- function() { + profile <- Sys.getenv("RENV_PROFILE", unset = "") + renv_bootstrap_profile_normalize(profile) + } + + renv_bootstrap_profile_set <- function(profile) { + profile <- renv_bootstrap_profile_normalize(profile) + if (is.null(profile)) + Sys.unsetenv("RENV_PROFILE") + else + Sys.setenv(RENV_PROFILE = profile) + } + + renv_bootstrap_profile_normalize <- function(profile) { + + if (is.null(profile) || profile %in% c("", "default")) + return(NULL) + + profile + + } + + renv_bootstrap_path_absolute <- function(path) { + + substr(path, 1L, 1L) %in% c("~", "/", "\\") || ( + substr(path, 1L, 1L) %in% c(letters, LETTERS) && + substr(path, 2L, 3L) %in% c(":/", ":\\") + ) + + } + + renv_bootstrap_paths_renv <- function(..., profile = TRUE, project = NULL) { + renv <- Sys.getenv("RENV_PATHS_RENV", unset = "renv") + root <- if (renv_bootstrap_path_absolute(renv)) NULL else project + prefix <- if (profile) renv_bootstrap_profile_prefix() + components <- c(root, renv, prefix, ...) + paste(components, collapse = "/") + } + + renv_bootstrap_project_type <- function(path) { + + descpath <- file.path(path, "DESCRIPTION") + if (!file.exists(descpath)) + return("unknown") + + desc <- tryCatch( + read.dcf(descpath, all = TRUE), + error = identity + ) + + if (inherits(desc, "error")) + return("unknown") + + type <- desc$Type + if (!is.null(type)) + return(tolower(type)) + + package <- desc$Package + if (!is.null(package)) + return("package") + + "unknown" + + } + + renv_bootstrap_user_dir <- function() { + dir <- renv_bootstrap_user_dir_impl() + path.expand(chartr("\\", "/", dir)) + } + + renv_bootstrap_user_dir_impl <- function() { + + # use local override if set + override <- getOption("renv.userdir.override") + if (!is.null(override)) + return(override) + + # use R_user_dir if available + tools <- asNamespace("tools") + if (is.function(tools$R_user_dir)) + return(tools$R_user_dir("renv", "cache")) + + # try using our own backfill for older versions of R + envvars <- c("R_USER_CACHE_DIR", "XDG_CACHE_HOME") + for (envvar in envvars) { + root <- Sys.getenv(envvar, unset = NA) + if (!is.na(root)) + return(file.path(root, "R/renv")) + } + + # use platform-specific default fallbacks + if (Sys.info()[["sysname"]] == "Windows") + file.path(Sys.getenv("LOCALAPPDATA"), "R/cache/R/renv") + else if (Sys.info()[["sysname"]] == "Darwin") + "~/Library/Caches/org.R-project.R/R/renv" + else + "~/.cache/R/renv" + + } + + + renv_json_read <- function(file = NULL, text = NULL) { + + # if jsonlite is loaded, use that instead + if ("jsonlite" %in% loadedNamespaces()) + renv_json_read_jsonlite(file, text) + else + renv_json_read_default(file, text) + + } + + renv_json_read_jsonlite <- function(file = NULL, text = NULL) { + text <- paste(text %||% read(file), collapse = "\n") + jsonlite::fromJSON(txt = text, simplifyVector = FALSE) + } + + renv_json_read_default <- function(file = NULL, text = NULL) { + + # find strings in the JSON + text <- paste(text %||% read(file), collapse = "\n") + pattern <- '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + locs <- gregexpr(pattern, text, perl = TRUE)[[1]] + + # if any are found, replace them with placeholders + replaced <- text + strings <- character() + replacements <- character() + + if (!identical(c(locs), -1L)) { + + # get the string values + starts <- locs + ends <- locs + attr(locs, "match.length") - 1L + strings <- substring(text, starts, ends) + + # only keep those requiring escaping + strings <- grep("[[\\]{}:]", strings, perl = TRUE, value = TRUE) + + # compute replacements + replacements <- sprintf('"\032%i\032"', seq_along(strings)) + + # replace the strings + mapply(function(string, replacement) { + replaced <<- sub(string, replacement, replaced, fixed = TRUE) + }, strings, replacements) + + } + + # transform the JSON into something the R parser understands + transformed <- replaced + transformed <- gsub("{}", "`names<-`(list(), character())", transformed, fixed = TRUE) + transformed <- gsub("[[{]", "list(", transformed, perl = TRUE) + transformed <- gsub("[]}]", ")", transformed, perl = TRUE) + transformed <- gsub(":", "=", transformed, fixed = TRUE) + text <- paste(transformed, collapse = "\n") + + # parse it + json <- parse(text = text, keep.source = FALSE, srcfile = NULL)[[1L]] + + # construct map between source strings, replaced strings + map <- as.character(parse(text = strings)) + names(map) <- as.character(parse(text = replacements)) + + # convert to list + map <- as.list(map) + + # remap strings in object + remapped <- renv_json_remap(json, map) + + # evaluate + eval(remapped, envir = baseenv()) + + } + + renv_json_remap <- function(json, map) { + + # fix names + if (!is.null(names(json))) { + lhs <- match(names(json), names(map), nomatch = 0L) + rhs <- match(names(map), names(json), nomatch = 0L) + names(json)[rhs] <- map[lhs] + } + + # fix values + if (is.character(json)) + return(map[[json]] %||% json) + + # handle true, false, null + if (is.name(json)) { + text <- as.character(json) + if (text == "true") + return(TRUE) + else if (text == "false") + return(FALSE) + else if (text == "null") + return(NULL) + } + + # recurse + if (is.recursive(json)) { + for (i in seq_along(json)) { + json[i] <- list(renv_json_remap(json[[i]], map)) + } + } + + json + + } + + # load the renv profile, if any + renv_bootstrap_profile_load(project) + + # construct path to library root + root <- renv_bootstrap_library_root(project) + + # construct library prefix for platform + prefix <- renv_bootstrap_platform_prefix() + + # construct full libpath + libpath <- file.path(root, prefix) + + # attempt to load + if (renv_bootstrap_load(project, libpath, version)) + return(TRUE) + + # load failed; inform user we're about to bootstrap + prefix <- paste("# Bootstrapping renv", version) + postfix <- paste(rep.int("-", 77L - nchar(prefix)), collapse = "") + header <- paste(prefix, postfix) + message(header) + + # perform bootstrap + bootstrap(version, libpath) + + # exit early if we're just testing bootstrap + if (!is.na(Sys.getenv("RENV_BOOTSTRAP_INSTALL_ONLY", unset = NA))) + return(TRUE) + + # try again to load + if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { + message("* Successfully installed and loaded renv ", version, ".") + return(renv::load()) + } + + # failed to download or load renv; warn the user + msg <- c( + "Failed to find an renv installation: the project will not be loaded.", + "Use `renv::activate()` to re-initialize the project." + ) + + warning(paste(msg, collapse = "\n"), call. = FALSE) + +}) diff --git a/renv/settings.dcf b/renv/settings.dcf new file mode 100644 index 0000000..169d82f --- /dev/null +++ b/renv/settings.dcf @@ -0,0 +1,10 @@ +bioconductor.version: +external.libraries: +ignored.packages: +package.dependency.fields: Imports, Depends, LinkingTo +r.version: +snapshot.type: implicit +use.cache: TRUE +vcs.ignore.cellar: TRUE +vcs.ignore.library: TRUE +vcs.ignore.local: TRUE diff --git a/run_me.R b/run_me.R new file mode 100644 index 0000000..40c0d44 --- /dev/null +++ b/run_me.R @@ -0,0 +1,6 @@ +library("worcs") +# We recommend that you prepare your raw data for analysis in 'prepare_data.R', +# and end that file with either open_data(yourdata), or closed_data(yourdata). +# Then, uncomment the line below to load the original or synthetic data +# (whichever is available), to allow anyone to reproduce your code: +# load_data()