Skip to content

Add regenie/step1 module#11008

Open
lyh970817 wants to merge 1 commit intonf-core:masterfrom
lyh970817:modules/regenie-step1-create
Open

Add regenie/step1 module#11008
lyh970817 wants to merge 1 commit intonf-core:masterfrom
lyh970817:modules/regenie-step1-create

Conversation

@lyh970817
Copy link
Copy Markdown

This PR adds the regenie/step1 module, which runs REGENIE Step 1 whole-genome regression to fit LOCO ridge models for downstream association testing workflows.

Merge dependencies: none. This PR is self-contained and does not require any other split REGENIE PR to merge first.

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Broadcast software version numbers to topic: versions - See version_topics
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • nf-core modules test regenie/step1 --profile docker
  • nf-core modules test regenie/step1 --profile singularity
  • nf-core modules test regenie/step1 --profile conda

Copy link
Copy Markdown
Contributor

@famosab famosab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good a few comments

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be needed

@@ -0,0 +1,55 @@
process REGENIE_STEP1 {
tag "${meta.id}:${meta2.pheno_col}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tag "${meta.id}:${meta2.pheno_col}"
tag "${meta.id}"

val(bsize)

output:
tuple val(meta2), path("*_pred.list"), path("*.loco.gz"), emit: predictions
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one output per file


output:
tuple val(meta2), path("*_pred.list"), path("*.loco.gz"), emit: predictions
tuple val(meta2), path("*.log"), emit: log
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tuple val(meta2), path("*.log"), emit: log
tuple val(meta), path("*.log"), emit: log

def genotype_flag = plink_genotype_file.name.endsWith('.pgen') ? '--pgen' : '--bed'
def prefix = task.ext.prefix ?: "${meta.id}"
def bsize_arg = bsize ?: 1000

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_pred.list
printf '' | gzip > ${prefix}_1.loco.gz
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
printf '' | gzip > ${prefix}_1.loco.gz
echo | gzip > ${prefix}_1.loco.gz

output:
tuple val(meta2), path("*_pred.list"), path("*.loco.gz"), emit: predictions
tuple val(meta2), path("*.log"), emit: log
tuple val("${task.process}"), val('regenie'), eval("regenie --version 2>&1 | head -n 1"), topic: versions, emit: versions_regenie
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tuple val("${task.process}"), val('regenie'), eval("regenie --version 2>&1 | head -n 1"), topic: versions, emit: versions_regenie
tuple val("${task.process}"), val('regenie'), eval("regenie --version | head -n 1"), topic: versions, emit: versions_regenie

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and please update the statement so only the bare version ends up in the output
in this case 4.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants