-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStarter.R
41 lines (39 loc) · 1.38 KB
/
Starter.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#############################################################################
#Title: G-WASPiper-Starter.R
#Function: Install packages and create folders
#Author: Murat Guler ([email protected], [email protected])
#Date: Dec 29th 2023
#Note: Please let me know if you have any trouble
#############################################################################
# Optinal to clean your memory/workspace
rm(list = ls())
gc()
#############################################################################
# Install and check necessary package(s)
# Vector of package names
packages <- c("tidyverse", "data.table", "dplyr", "ggplot2")
# Install and load packages
for (pkg in packages) {
if (!requireNamespace(pkg, quietly = TRUE)) {
install.packages(pkg)
}
library(pkg, character.only = TRUE)
}
#############################################################################
# Download scripts that needed, please update file names or URL in the scripts
system("git clone https://github.com/biomguler/G-WASPiper.git")
#update if needed
system("unzip G-WASPiper.zip")
# Create folders for outputs
system("mkdir final2plink")
system("mkdir raw_plink")
system("mkdir QCsteps")
system("mkdir 1000G")
system("mkdir results")
system("mkdir final")
system("mkdir topmed")
system("mkdir PGS")
# Optinal to clean your memory/workspace
rm(list = ls())
gc()
#End