Skip to content
Snippets Groups Projects
Select Git revision
  • e4b0b655e2ca0e17578eba668dda8836523262d8
  • main default protected
  • develop
  • 0.2.0
  • 0.1.0
5 results

tp1.R

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    tp1.R 790 B
    wdir="."
    dir.create(<dir, 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"))