Skip to content

Commit

Permalink
Deployed 0381a82 with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jinghuazhao committed Dec 27, 2024
1 parent 068ce6c commit 2bb37bb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 20 deletions.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ <h2 id="local-fileweb-browsing">Local file/web browsing</h2>
<ol>
<li>SRCF. The mirror is within the following subdirectory: <code>/srcf</code>.</li>
<li>Web site. This is from <code>/site</code> as above.</li>
<li>Colocalisation. See json/coloc.html.</li>
<li>Isotopes associated with &gt;1 proteins, /dup/json/dup.htm</li>
</ol>
<h2 id="non-csd3-browsers">Non-CSD3 browser(s)</h2>
Expand Down Expand Up @@ -296,5 +297,5 @@ <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>

<!--
MkDocs version : 1.5.3
Build Date UTC : 2024-12-24 17:13:56.631484+00:00
Build Date UTC : 2024-12-27 09:03:09.622568+00:00
-->
38 changes: 20 additions & 18 deletions misc/json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,15 @@ function gtex()
tissue <- Sys.getenv(\"tissue\")
print(paste0(prot,\"-\",tissue))
pGWAS_sumstats <- read.delim(file.path(analysis,\"coloc\",\"sumstats\",paste0(prot,\"-\",snpid,\".gz\"))) %>%
dplyr::mutate(log_pvalue=LP,variant=gsub(\"chr\",\"\",id),ref_allele=REF,alt_allele=ALT,beta=ES,se=SE) %>%
dplyr::select(chromosome,position,variant,ref_allele,alt_allele,log_pvalue,beta,se)
dplyr::mutate(REF=toupper(REF),ALT=toupper(ALT),variant=paste0(chromosome,\":\",position,\"_\",REF,\"/\",ALT)) %>%
dplyr::mutate(log_pvalue=LP,ref_allele=REF,alt_allele=ALT,alt_allele_freq=AF,beta=ES,se=SE) %>%
dplyr::select(chromosome,position,variant,ref_allele,alt_allele,alt_allele_freq,log_pvalue,beta,se)
GTEx_sumstats <- read.delim(file.path(analysis,\"coloc\",\"GTEx\",\"sumstats\",paste0(prot,\"-\",tissue,\".gz\"))) %>%
dplyr::mutate(variant=gsub(\"chr\",\"\",sub(\"_\",\":\",variant)),
log_pvalue=-log10(pvalue),ref_allele=ref,alt_allele=alt) %>%
dplyr::select(chromosome,position,variant,ref_allele,alt_allele,log_pvalue,beta,se)
dplyr::mutate(REF=toupper(ref),ALT=toupper(alt),variant=paste0(chromosome,\":\",position,\"_\",REF,\"/\",ALT)) %>%
dplyr::mutate(log_pvalue=-log10(pvalue),ref_allele=REF,alt_allele=ALT,alt_allele_freq=ac/an) %>%
dplyr::select(chromosome,position,variant,ref_allele,alt_allele,alt_allele_freq,log_pvalue,beta,se)
j <- gzfile(file.path(analysis,\"json\",\"pqtleqtl\",paste0(prot,\"-\",tissue,\".json.gz\")))
combined_json <- jsonlite::toJSON(list(pqtl=pGWAS_sumstats,eqtl=GTEx_sumstats),pretty=FALSE)
combined_json <- jsonlite::toJSON(list(pqtl=pGWAS_sumstats,eqtl=GTEx_sumstats),pretty=TRUE)
write(combined_json,file=j)
close(j)
"
Expand All @@ -133,14 +134,15 @@ function eqtlcatalogue()
tissue <- Sys.getenv(\"tissue\")
print(paste0(prot,\"-\",tissue))
pGWAS_sumstats <- read.delim(file.path(analysis,\"coloc\",\"sumstats\",paste0(prot,\"-\",snpid,\".gz\"))) %>%
dplyr::mutate(log_pvalue=LP,variant=gsub(\"chr\",\"\",id),ref_allele=REF,alt_allele=ALT,beta=ES,se=SE) %>%
dplyr::select(chromosome,position,variant,ref_allele,alt_allele,log_pvalue,beta,se)
eQTLCatalogue_sumstats <- read.delim(file.path(analysis,\"coloc\",\"eQTLCatalogue\",\"sumstats\",paste0(prot,\"-\",tissue,\".gz\"))) %>%
dplyr::mutate(variant=gsub(\"chr\",\"\",sub(\"_\",\":\",variant)),
log_pvalue=-log10(pvalue),ref_allele=ref,alt_allele=alt) %>%
dplyr::select(chromosome,position,variant,ref_allele,alt_allele,log_pvalue,beta,se)
dplyr::mutate(REF=toupper(REF),ALT=toupper(ALT),variant=paste0(chromosome,\":\",position,\"_\",REF,\"/\",ALT)) %>%
dplyr::mutate(log_pvalue=LP,ref_allele=REF,alt_allele=ALT,alt_allele_freq=AF,beta=ES,se=SE) %>%
dplyr::select(chromosome,position,variant,ref_allele,alt_allele,alt_allele_freq,log_pvalue,beta,se)
eQTLCatalogue_sumstats <- read.delim(file.path(analysis,\"coloc\",\"eQTLCatalogue\",\"sumstats\",paste0(prot,\"-\",tissue,\".gz\"))) %>%
dplyr::mutate(REF=toupper(ref),ALT=toupper(alt),variant=paste0(chromosome,\":\",position,\"_\",REF,\"/\",ALT)) %>%
dplyr::mutate(log_pvalue=-log10(pvalue),ref_allele=REF,alt_allele=ALT,alt_allele_freq=ac/an) %>%
dplyr::select(chromosome,position,variant,ref_allele,alt_allele,alt_allele_freq,log_pvalue,beta,se)
j <- gzfile(file.path(analysis,\"json\",\"pqtleqtl\",paste0(prot,\"-\",tissue,\".json.gz\")))
combined_json <- jsonlite::toJSON(list(pqtl=pGWAS_sumstats,eqtl=eQTLCatalogue_sumstats),pretty=FALSE)
combined_json <- jsonlite::toJSON(list(pqtl=pGWAS_sumstats,eqtl=eQTLCatalogue_sumstats),pretty=TRUE)
write(combined_json,file=j)
close(j)
"
Expand All @@ -154,14 +156,14 @@ function coloc()
suppressMessages(library(jsonlite))
analysis <- Sys.getenv("analysis")
GTEx <- read.delim(file.path(analysis,"coloc","GTEx.tsv")) %>%
mutate(source="GTEx",fp=file.path("pqtleqtl",paste0(prot,"-",qtl_id,".json.gz")))
mutate(fp=file.path("pqtleqtl",paste0(prot,"-",qtl_id,".json.gz")))
eQTLCatalogue <- read.delim(file.path(analysis,"coloc","eQTLCatalogue.tsv")) %>%
rename(qtl_id=unique_id) %>%
mutate(source="eQTLCatalogue",fp=file.path("pqtleqtl",paste0(prot,"-",qtl_id,".json.gz")))
mutate(fp=file.path("pqtleqtl",paste0(prot,"-",qtl_id,".json.gz")))
tophits <- rbind(GTEx,eQTLCatalogue) %>%
select(prot,snpid,qtl_id,H4,gene,source,fp) %>%
setNames(c("protein","snpid","eqtl","h4","gene","source","fp"))
json_data <- toJSON(tophits,auto_unbox=TRUE,pretty=FALSE)
select(prot,snpid,qtl_id,H4,gene,fp) %>%
setNames(c("protein","snpid","eqtl","h4","gene","fp"))
json_data <- toJSON(tophits,pretty=TRUE)
write(json_data, file = file.path(analysis,"json","coloc.json"))
gz <- gzfile(file.path(analysis,"json","coloc.json.gz"), "w")
writeLines(json_data, gz)
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit 2bb37bb

Please sign in to comment.