Skip to content
Snippets Groups Projects
Select Git revision
  • 6ffc322932ce212b6c8ca2069243c14d281ddd05
  • main default protected
2 results

.gitkeep

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    tp2.R 910 B
    wdir="/amuhome/t20006223/m2bsgreprod/src"
    dir.create(wdir)
    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")
    
    library(snpStats)
    
    library(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 = "/amuhome/t20006223/m2bsgreprod/results/data/penncath.bed"
    penncath_bim_path = "/amuhome/t20006223/m2bsgreprod/results/data/penncath.bim"
    penncath_fam_path = "/amuhome/t20006223/m2bsgreprod/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"))