Skip to content

Commit

Permalink
update replication
Browse files Browse the repository at this point in the history
  • Loading branch information
jeantristanb committed May 9, 2022
1 parent acdd339 commit 66fc3a3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 27 deletions.
39 changes: 18 additions & 21 deletions replication/gwascat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ script using gwas catalog to compared gwas summary statistics to compared gwas s
* `head_A1` ["ALLELE1"]
* `head_A0` ["ALLELE0"]
* gwas catalog : algorithm download version of gwas catalog from ucsc, separate by comma
* `pheno` : un phenotype
* `file_pheno` : file containing list of phenotype extracted from gwas catalog
* `pheno_gc` : phenotype from gwas catalog
* `file_pheno_gc` : file containing list of phenotype extracted from gwas catalog
* `list_chro` : list chro to analyse, separate by x-y (x to y) and comma [1-22]
* `clump_r2` : min pvalue used for clump and ld
* `size_win_kb` : size in kb to analyse used in clump, ld and windows analyse
Expand All @@ -28,11 +28,11 @@ script using gwas catalog to compared gwas summary statistics to compared gwas s
### list of phenotypes available
to obtain list of phenotype without run algorinm
"""
nextflow run h3abionet/h3agwas/replication/gwascat/main.nf --justpheno 1 --output_dir gwascatpheno/ --output gwascatpheno -resume -profile slurm
nextflow run h3abionet/h3agwas/replication/gwascat/main.nf --justpheno_gc 1 --output_dir gwascatpheno/ --output gwascatpheno -resume -profile slurm
"""

### GWAS catalog :
extract from gwas catalog postiion and chromosome relative to `file_pheno` or `pheno` and `list_chro`. computed heritabilite, beta and se for input
extract from gwas catalog postiion and chromosome relative to `file_pheno_gc` or `pheno_gc` and `list_chro`. computed heritabilite, beta and se for input
OR transformed using log2 and defined if column contains information higher than 1


Expand Down Expand Up @@ -101,24 +101,21 @@ z values defined as beta / se

### process

* process dl\_gwascat\_hg19 : optional if gwascat is not give as parameter
* process formatgwascat\_pheno : format gwas catalog, if just\_pheno
* process formatgwascat : format gwast catalog
* process extractgwas\_fromgwascat : extract position from gwas present in positoins of gwas catalog
* process dl\_gwascat\_hg19 : optional if gwascat is not give as parameter
* process formatgwascat\_pheno : format gwas catalog, if just\_pheno
* process formatgwascat : format gwast catalog
* process extractgwas\_fromgwascat : extract position from gwas present in positoins of gwas catalog
* file description
* sub\_plk : sub plink, extracted positions from 1) gwas 2)gwas catalog
process update_rs{
process clump_aroundgwascat{
process computedstat_pos{
process computedstat_windneutre{
process computedstat_win{
process computed_ld{
process computed_ld_stat{
process computed_clump_stat{
process build_ldwind{
process computed_ld2_stat{
process computed_ldext_stat{
process computed_ldwind_stat{
process computed_ldwindext_stat{
* process update\_rs : process to format plink file with specifi rs
* process clump\_aroundgwascat : clump around each gwas cat
* process computedstat\_pos : exraction of position from gwas catalog on summary statistics
* process computedstat\_windneutre :
* process computedstat\_win : computed statistcs by windows
* process computed\_ld :extraction of positions from gwas catalog and summary statistics in LD
* process computed\_ld\_stat : computed statistics from ` computed\_ld`
* process computed\_clump\_stat : computed statistics using clump function from plink
* process build\_ldwind
* process computed\_ldwind\_stat


12 changes: 6 additions & 6 deletions replication/gwascat/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ params.gwascat_format="USCS"

params.gwas_cat_ftp="http://hgdownload.soe.ucsc.edu/goldenPath/hg19/database/gwasCatalog.txt.gz"

params.file_pheno=""
params.file_pheno_gc=""
params.list_chro="1-22"


Expand Down Expand Up @@ -239,17 +239,17 @@ System.exit(-1)
}

listchro=getlistchro(params.list_chro)
if(params.file_pheno!=''){
file_pheno_ch=file(params.file_pheno, checkIfExists:true)
if(params.file_pheno_gc!=''){
file_pheno_gc_ch=file(params.file_pheno_gc, checkIfExists:true)
}else{
file_pheno_ch=file('nofile')
file_pheno_gc_ch=file('nofile')
}
process formatgwascat{
label 'R'
publishDir "${params.output_dir}/gwascat", mode:'copy'
input :
file(gwascat) from gwascat_init_ch
file(filepheno) from file_pheno_ch
file(filepheno) from file_pheno_gc_ch
output :
file("${out}_range.bed") into gwascat_rangebed
file("${out}.pos") into (gwascat_pos_subplk, gwascat_pos_ld2, gwascat_pos, gwascat_poswindneutre)
Expand All @@ -259,7 +259,7 @@ process formatgwascat{
script :
chroparam= (params.list_chro=='') ? "" : " --chro ${listchro.join(',')}"
phenoparam= (params.pheno_gc=='') ? "" : " --pheno \"${params.pheno_gc}\" "
phenoparam= (params.file_pheno=='') ? " $phenoparam " : " --file_pheno $filepheno "
phenoparam= (params.file_pheno_gc=='') ? " $phenoparam " : " --file_pheno_gc $filepheno "
out=params.output+'_gwascat'
"""
format_gwascat.r --file $gwascat $chroparam $phenoparam --out $out --wind ${params.size_win_kb} --chro_head ${params.head_chro_gwascat} --bp_head ${params.head_bp_gwascat} --pheno_head ${params.head_pheno_gwascat} --beta_head ${params.head_beta_gwascat} --ci_head ${params.head_ci_gwascat} --p_head ${params.head_pval_gwascat} --n_head ${params.head_n_gwascat} --freq_head ${params.head_af_gwascat} --rs_head ${params.head_rs_gwascat} --riskall_head ${params.head_riskall_gwascat} --format $format
Expand Down

0 comments on commit 66fc3a3

Please sign in to comment.