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

nf-core template @dev errors (follow-up) #1679

Closed
fmalmeida opened this issue Jul 18, 2022 · 6 comments
Closed

nf-core template @dev errors (follow-up) #1679

fmalmeida opened this issue Jul 18, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@fmalmeida
Copy link

Description of the bug

This issue is a follow-up of #1670.

The previous issue has fixed a part of the code that should be only written when template is created with igenomes . After fixing the previous spot, another part of the code that has the same pattern was spotted again.

custom_config.yml

#
# Using custom templates, nf-core tool wil create the repositories following this pattern:
# repository dir                : ${prefix}-${name}    # different name can be used with "-o"
# repository references in code : ${prefix/${name}
#

name       : nftemplate
description: NF Template built from nf-core template
author     : Felipe Almeida
prefix     : fma
skip:
  - ci                     # skips adding github ci files
  - github_badges          # skips adding nf-core github badges
  - igenomes               # skips adding igenomes configurations lines
  - nf_core_configs        # skips adding nf-core configs check-ups

After some first look-up, I believe the errors are appearing due to the following lines that are still present even after skipping igenomes:

if (!params.fasta) {
log.error "Genome fasta file not specified with e.g. '--fasta genome.fa' or via a detectable config file."
System.exit(1)
}

and

def checkPathParamList = [ params.input, params.multiqc_config, params.fasta ]

Command used and terminal output

# When running the generated pipeline created without `igenomes`, the following errors appear.

$ nf-core create -t custom_config.yml --no-git -o . -f
$ nextflow run main.nf -profile docker,test --outdir .nextflow_results_tests

WARN: Access to undefined parameter `fasta` -- Initialise it to a default value eg. `params.fasta = some_value`
Genome fasta file not specified with e.g. '--fasta genome.fa' or via a detectable config file.

System information

nf-core/tools version 2.5.dev0

@fmalmeida fmalmeida added the bug Something isn't working label Jul 18, 2022
@apeltzer
Copy link
Member

Some more points in #1677

@mirpedrol
Copy link
Member

Hi @fmalmeida, thanks for testing this functionality! :)

If I'm not wrong, when creating a template without igenomes the user will still need to provide a reference fasta file, this is needed for the test pipeline to run. For example:

example_reference.fa

>chr1
ACTGACTG
>chr2
AACCTTGG
nextflow run fma-nftemplate/main.nf -profile docker,test --outdir .nextflow_results_tests --fasta example_reference.fa

What we should do is specify this in the help message :)

@mirpedrol
Copy link
Member

I modified the example command here #1691, let me know if you agree :)

@fmalmeida
Copy link
Author

Hi @mirpedrol, I think this already helps. But, additionally, I really think that the -profile test should be self-sufficient. For example, have a params.fasta already pre-defined in them so users can directly teste and overview a pipeline, in this case, the example template.

@mirpedrol
Copy link
Member

You are right @fmalmeida, I added a fasta file to the test config files :)

@fmalmeida
Copy link
Author

Thanks 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants