From 36148f0f3dc4bd7287502c5ccc8f23d34000bc7d Mon Sep 17 00:00:00 2001 From: OTT Oceane <o22025448@V-PJ-47-021.salsa.univ-amu.fr> Date: Tue, 22 Oct 2024 08:07:19 +0200 Subject: [PATCH] script --- src/tp1.R | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/tp1.R diff --git a/src/tp1.R b/src/tp1.R new file mode 100644 index 0000000..72bdb7e --- /dev/null +++ b/src/tp1.R @@ -0,0 +1,22 @@ +wdir="." +dir.create(wdir, showWarnings = F, recursive = T) +setwd(wdir) + +#library(devtools) + +if (!require("BiocManager", quietly = TRUE)) + install.packages("BiocManager") + +if (!require("snpStats", quietly = TRUE)) + BiocManager::install("snpStats") + +if (!require("SNPRelate", quietly = TRUE)) +BiocManager::install("SNPRelate") + +# Les données analysées nécessitant beaucoup de RAM, nous allons sélectionner aléatoirement 250000 SNPs et réecrire des fichiers bed, bim, fam +penncath_bed_path = "results/data/penncath.bed" +penncath_bim_path = "results/data/penncath.bim" +penncath_fam_path = "results/data/penncath.fam" +geno <- snpStats::read.plink(penncath_bed_path, penncath_bim_path, penncath_fam_path, select.snps=sample(1:861473, 25000, replace = FALSE ), na.strings = ("-9")) + + -- GitLab