Help me :duck: s I am trying to understand why fas...
# rubber-duck
s
Help me 🦆 s I am trying to understand why fastquorum doesn't seem to have igenomes working at the moment. When I try
Copy code
nextflow run main.nf \
--input <https://raw.githubusercontent.com/nf-core/test-datasets/fastquorum/testdata/samplesheets/samplesheet.tiny.csv> \
--genome GRCh38 \
--outdir test \
-profile docker
It won't align anything. It seems to have all the required boilerplate in https://github.com/nf-core/fastquorum/blob/da1148fed20864d5e041d3201560fde74705bcb3/main.nf#L33
Copy code
params.fasta     = getGenomeAttribute('fasta')
params.fasta_fai = getGenomeAttribute('fasta_fai')
params.dict      = getGenomeAttribute('dict')
params.bwa       = getGenomeAttribute('bwa')

// Initialize fasta file with meta map:
fasta = params.fasta ? Channel.fromPath(params.fasta).map{ it -> [ [id:it.baseName], it ] }.collect() : Channel.empty()
and when I try with some
println
action
getGenomeAttribute
seems to be working absolutely fine. But setting params.fasta just doesn't do anything:
Copy code
params.fasta = getGenomeAttribute('fasta')
println params.fasta
gives
null
, but
Copy code
params.fasta2 = getGenomeAttribute('fasta')
println params.fasta2
gives
<s3://ngi-igenomes/igenomes//Homo_sapiens/NCBI/GRCh38/Sequence/WholeGenomeFasta/genome.fa>
What is silently stopping
params.fasta
from being reassigned here? It seems to stop the other
fasta_fai
,
dict
and
bwa
parameters on the next lines too.
m
I think you're hitting the issue we found out with @Ram about using the
getGenomeAtribute
function coming from a Nextflow script instead of the groovy lib
s
Yeah, looks the same issue
If you define it twice in the same script, it will give a warning
`WARN:
params.fasta
is defined multiple times -- Assignments following the first are ignored`
But if they are separate then it won't
n
You have to move the
getGenomeAttribute
code to before you include all other subworkflows/functions 😛
this 1
Those parameters aren't set when you include the subworkflows so they cannot use these 😛
s
It works if I remove them from being set to null in the nextflow.config
m
you should not set them to null in nextflow.config
this 1
s
even being defined after the include statements
Yeah, I've taken out the null now, then it works
🎉 1
n
Awesome 😛
s
still getting the
Access to undefined parameter
though
n
Do you have a PR or repo?
s
yeah, just give me a minute
👍 1
it is working, but giving warnings still
(I have meetings now for the next few hours)
n
have you added all parameters to the JSON schema?
s
I haven't edited the schema, but presumably they were there before?
n
Can you tell me what parameter is undefined? 😛
s
fasta, fasta_fai, dict, bwa
🤔 1
m
Can you check Sarek dev
I managed to get rid of all that
n
I've tried some things but I can't seem to stop the warnings 😕
🙁 1
s
The warnings are coming from this block of code:
Copy code
// Check input path parameters to see if they exist
    def checkPathParamList = [
        params.bwa,
        params.dict,
        params.fasta,
        params.fasta_fai

    ]
Is this bit of code outdated now? I can't find
checkPathParamList
used anywhere, and I can't see it in a few other pipelines.
n
Ah yes you can now add the
exists: true
keyword in your schema to check those parameters
s
Does that mean the
checkPathParamList
can be removed from sarek too?
n
Yes! Just make sure you add
exists
to the schema 🙂
s
exists
in the schema checks that the file exists if it is present?
n
Correct!
👍 1
s
Great, thanks Nicolas
no problem!
🙌 1