Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solution for gene-level chromosome separated files input #71

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add support for multiple chromosome files for gene level analysis
  • Loading branch information
filosi committed Jun 19, 2023
commit b3f4b2bb3b0cb0f2df3b8aa452b401188eb098c5
5 changes: 2 additions & 3 deletions modules/local/regenie_step2_gene_tests.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process REGENIE_STEP2_GENE_TESTS {

input:
path step1_out
tuple val(filename), path(genotyped_plink_file_bim), path(genotyped_plink_file_bed), path(genotyped_plink_file_fam)
tuple val(filename), path(genotyped_plink_file_bed), path(genotyped_plink_file_bim), path(genotyped_plink_file_fam)
val assoc_format
path phenotypes_file
path covariates_file
Expand Down Expand Up @@ -39,11 +39,10 @@ process REGENIE_STEP2_GENE_TESTS {
def writeMasks = params.regenie_write_bed_masks ? "--write-mask" : ''
def joint = params.regenie_gene_joint ? "--joint ${params.regenie_gene_joint}":''
def condition_list = params.regenie_condition_list ? "--condition-list $condition_list_file" : ''

"""
regenie \
--step 2 \
$format ${genotyped_plink_file_bed} \
$format ${filename}${extension} \
--phenoFile ${phenotypes_file} \
--phenoColList ${params.phenotypes_columns} \
--bsize ${params.regenie_bsize_step2} \
Expand Down
6 changes: 2 additions & 4 deletions workflows/nf_gwas.nf
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,10 @@ workflow NF_GWAS {

if (genotypes_association_format == 'bed') {

// Channel.fromFilePairs(genotypes_association).set {step2_gene_tests_ch}
Channel.fromFilePairs(genotypes_association)
.map {tuple(it[0].baseName, it[0], it[1], it[2])}
Channel.fromFilePairs(genotypes_association, size:3)
.map { tuple(it[1][0].baseName, it[1][0], it[1][1], it[1][2]) }
.set {step2_gene_tests_ch}


}

}
Expand Down