Skip to contents

use vcftools to get ped and map files LD data from /share/apps/vcftools/bin/vcftools --vcf /share/pub/dengcy/Singlecell/COVID19/1000genomes_all_genotypes.vcf --plink-tped --out /share/pub/dengcy/Singlecell/COVID19/1000genomes_all_genotypes/share/pub/dengcy/Singlecell/COVID19/PLINK/plink --tfile /share/pub/dengcy/Singlecell/COVID19/1000genomes_all_genotypes --recode --out /share/pub/dengcy/Singlecell/COVID19/1000genomes_all_genotypes /share/pub/dengcy/Singlecell/COVID19/PLINK/plink --map /share/pub/dengcy/Singlecell/COVID19/1000genomes_all_genotypes.map --ped /share/pub/dengcy/Singlecell/COVID19/1000genomes_all_genotypes.ped --allow-no-sex --autosome --r2 --ld-window-kb 1000 --ld-window-r2 0.2 --out /share/pub/dengcy/Singlecell/COVID19/ld_1000genome covid_ld<-read.delim("/share/pub/dengcy/Singlecell/COVID19/ld_1000genome.ld") covid_ld<-covid_ld[!(covid_ld$ colnames(covid_ld)[7]<-"R" lapply(unique(covid_ld$CHR_A), function(i){ a<-data.table(covid_ld[covid_ld$CHR_A == i,]) file_name <- paste0("/share/pub/dengcy/Singlecell/COVID19/data/LD/",i,".Rds") saveRDS(a, file = file_name) })chrom_ld<-lapply(as.character(1:22),function(chrom){ chrom_ld_file_path <- paste(ld_folder, '/', chrom, '.Rds', sep = '') ld_data <- readRDS(chrom_ld_file_path)[(R**2 > r2_threshold), .(SNP_A, SNP_B, R)] return(ld_data) }) save(chrom_ld,file="/share/pub/dengcy/GWAS_Multiomics/pagwas/data/chrom_ld.RData")

Usage

data(chrom_ld)

Format

a list.

Source

Generated from PLINK 1.90 linux

Examples

data(chrom_ld)
str(chrom_ld)
#> List of 22
#>  $ chr1 :Classes ‘data.table’ and 'data.frame':	523930 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:523930] "rs548419688" "rs575272151" "rs62635286" "rs531646671" ...
#>   ..$ SNP_B: chr [1:523930] "rs568405545" "rs544419019" "rs200579949" "rs541940975" ...
#>   ..$ R    : num [1:523930] 1 1 1 1 0.58 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr2 :Classes ‘data.table’ and 'data.frame':	541488 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:541488] "rs552101438" "rs533902406" "rs533902406" "rs549374620" ...
#>   ..$ SNP_B: chr [1:541488] "rs567175903" "rs549374620" "rs538321555" "rs538321555" ...
#>   ..$ R    : num [1:541488] 0.544 0.666 1 0.666 0.999 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr3 :Classes ‘data.table’ and 'data.frame':	469670 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:469670] "rs183190499" "rs183190499" "rs188073721" "rs9755941" ...
#>   ..$ SNP_B: chr [1:469670] "rs188073721" "rs192023809" "rs192023809" "rs9756992" ...
#>   ..$ R    : num [1:469670] 1 1 1 0.902 1 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr4 :Classes ‘data.table’ and 'data.frame':	527899 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:527899] "rs577504332" "rs186311976" "rs545830862" "rs529058006" ...
#>   ..$ SNP_B: chr [1:527899] "rs186311976" "rs550071552" "rs563917451" "rs556408334" ...
#>   ..$ R    : num [1:527899] 0.994 0.971 1 1 0.672 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr5 :Classes ‘data.table’ and 'data.frame':	409781 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:409781] "rs547354230" "rs570403504" "rs557111298" "rs557111298" ...
#>   ..$ SNP_B: chr [1:409781] "rs562245928" "rs528095804" "rs568993481" "rs563082128" ...
#>   ..$ R    : num [1:409781] 0.555 0.84 1 0.753 0.753 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr6 :Classes ‘data.table’ and 'data.frame':	497374 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:497374] "rs561313667" "rs530559365" "rs546455495" "rs546367294" ...
#>   ..$ SNP_B: chr [1:497374] "rs530120680" "rs550155737" "rs566451461" "rs562984996" ...
#>   ..$ R    : num [1:497374] 0.941 1 1 1 0.73 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr7 :Classes ‘data.table’ and 'data.frame':	401877 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:401877] "rs183052695" "rs534884799" "rs201453340" "rs573113489" ...
#>   ..$ SNP_B: chr [1:401877] "rs559579537" "rs574584754" "rs62429385" "rs187952787" ...
#>   ..$ R    : num [1:401877] 1 1 0.674 0.843 0.98 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr8 :Classes ‘data.table’ and 'data.frame':	368594 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:368594] "rs143233250" "rs143233250" "rs564896271" "rs75979472" ...
#>   ..$ SNP_B: chr [1:368594] "rs75979472" "rs138143518" "rs374194469" "rs138143518" ...
#>   ..$ R    : num [1:368594] 0.958 0.955 0.537 0.997 1 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr9 :Classes ‘data.table’ and 'data.frame':	280586 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:280586] "rs535827433" "rs527713335" "rs561207592" "rs561207592" ...
#>   ..$ SNP_B: chr [1:280586] "rs555670059" "rs543039485" "rs531595271" "rs549710705" ...
#>   ..$ R    : num [1:280586] 1 1 1 1 1 1 1 1 1 1 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr10:Classes ‘data.table’ and 'data.frame':	342933 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:342933] "rs575152224" "rs537869321" "rs536439816" "rs558589576" ...
#>   ..$ SNP_B: chr [1:342933] "rs560406661" "rs538894539" "rs558589576" "rs546443136" ...
#>   ..$ R    : num [1:342933] 1 0.839 0.981 0.981 1 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr11:Classes ‘data.table’ and 'data.frame':	334124 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:334124] "rs550957044" "rs550957044" "rs567928095" "rs558796212" ...
#>   ..$ SNP_B: chr [1:334124] "rs567928095" "rs536286399" "rs536286399" "rs575477783" ...
#>   ..$ R    : num [1:334124] 1 1 1 1 0.87 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr12:Classes ‘data.table’ and 'data.frame':	313320 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:313320] "rs537376773" "rs369785183" "rs539189283" "rs546015167" ...
#>   ..$ SNP_B: chr [1:313320] "rs574457226" "rs530183219" "rs546015167" "rs564617523" ...
#>   ..$ R    : num [1:313320] 0.875 1 0.523 1 1 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr13:Classes ‘data.table’ and 'data.frame':	248742 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:248742] "rs12018140" "rs182776109" "rs12381094" "rs58784443" ...
#>   ..$ SNP_B: chr [1:248742] "rs11149434" "rs149988745" "rs12381056" "rs60436648" ...
#>   ..$ R    : num [1:248742] 0.992 1 1 0.567 0.451 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr14:Classes ‘data.table’ and 'data.frame':	220390 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:220390] "rs551865059" "rs551865059" "rs551865059" "rs570094597" ...
#>   ..$ SNP_B: chr [1:220390] "rs570094597" "rs537135209" "rs61973512" "rs537135209" ...
#>   ..$ R    : num [1:220390] 0.571 0.571 0.571 1 1 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr15:Classes ‘data.table’ and 'data.frame':	194020 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:194020] "rs60733375" "rs369201715" "rs369201715" "rs543584092" ...
#>   ..$ SNP_B: chr [1:194020] "rs60723211" "rs543584092" "rs565083980" "rs565083980" ...
#>   ..$ R    : num [1:194020] 0.774 1 1 1 1 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr16:Classes ‘data.table’ and 'data.frame':	202406 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:202406] "rs181534180" "rs190993388" "rs547092078" "rs201731689" ...
#>   ..$ SNP_B: chr [1:202406] "rs375524167" "rs544623727" "rs566683167" "rs572534626" ...
#>   ..$ R    : num [1:202406] 0.519 0.926 1 0.648 0.554 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr17:Classes ‘data.table’ and 'data.frame':	186421 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:186421] "rs62053745" "rs530075600" "rs556217481" "rs557861022" ...
#>   ..$ SNP_B: chr [1:186421] "rs9747082" "rs548643565" "rs574351215" "rs149228065" ...
#>   ..$ R    : num [1:186421] 0.616 1 1 1 1 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr18:Classes ‘data.table’ and 'data.frame':	189285 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:189285] "rs574502329" "rs574502329" "rs550985930" "rs550985930" ...
#>   ..$ SNP_B: chr [1:189285] "rs550985930" "rs530200462" "rs530200462" "rs566603231" ...
#>   ..$ R    : num [1:189285] 1 1 1 1 1 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr19:Classes ‘data.table’ and 'data.frame':	188302 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:188302] "rs530896527" "rs542947521" "rs540059996" "rs576576542" ...
#>   ..$ SNP_B: chr [1:188302] "rs549990280" "rs561126109" "rs544137048" "rs537613516" ...
#>   ..$ R    : num [1:188302] 1 1 0.5 0.737 1 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr20:Classes ‘data.table’ and 'data.frame':	144108 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:144108] "rs578019153" "rs551073389" "rs188652106" "rs75670495" ...
#>   ..$ SNP_B: chr [1:144108] "rs543872993" "rs536670517" "rs565905334" "rs76004960" ...
#>   ..$ R    : num [1:144108] 0.75 1 0.5 1 0.81 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr21:Classes ‘data.table’ and 'data.frame':	102736 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:102736] "rs563044983" "rs565919691" "rs558430818" "rs533498244" ...
#>   ..$ SNP_B: chr [1:102736] "rs564085573" "rs535026321" "rs578215950" "rs573620631" ...
#>   ..$ R    : num [1:102736] 0.5 1 1 1 0.562 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr> 
#>  $ chr22:Classes ‘data.table’ and 'data.frame':	101692 obs. of  3 variables:
#>   ..$ SNP_A: chr [1:101692] "rs587638893" "rs587631814" "rs587751754" "rs3001810" ...
#>   ..$ SNP_B: chr [1:101692] "rs587682556" "rs587639206" "rs587766389" "rs3013001" ...
#>   ..$ R    : num [1:101692] 0.5 1 1 1 1 ...
#>   ..- attr(*, ".internal.selfref")=<externalptr>