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

Cannot get property 'fasta' on null object #643

Closed
Thomieh73 opened this issue Jul 26, 2024 · 3 comments
Closed

Cannot get property 'fasta' on null object #643

Thomieh73 opened this issue Jul 26, 2024 · 3 comments

Comments

@Thomieh73
Copy link

Hi, I am trying out the MAG pipeline on a small set of samples, just to check if I can get it to work with my data. I get an error before the pipeline starts and I wonder if that has to do with my input or not.

This is my command:

nextflow run nf-core/mag -r 3.0.2 -profile apptainer \
	-c saga_mag.config -work-dir $USERWORK/nf_mag -resume \
	--input samplesheet_small.csv \
	--outdir /cluster/projects/nn10070k/projects/phagedrive/pd_data_control/results/20240726_MAG_results \
	--reads_minlength 50 \
	--host_genome ../../viral_mask_results/masked_host_db/combined_hosts_phix.fna.gz \
	--bbnorm FALSE \
	--kraken2_db /cluster/projects/nn10070k/databases/kraken2_pluspfp_05.06.2024 \
	--cat_db_generate \
	--save_cat_db \
	--run_virus_identification

and I get this error from nextflow after it has pulled the pipeline:

Nextflow 24.04.3 is available - Please consider updating your version to it
N E X T F L O W  ~  version 23.10.1
Launching `https://github.com/nf-core/mag` [mad_mestorf] DSL2 - revision: bb74c4695d [3.0.2]
ERROR ~ Cannot get property 'fasta' on null object

 -- Check script '/cluster/home/thhaverk/.nextflow/assets/nf-core/mag/./workflows/mag.nf' at line: 87 or see '.nextflow.log' file for more details

in the .nextflow.log I find this:

Jul-26 14:50:44.572 [main] DEBUG nextflow.Session - Session aborted -- Cause: Cannot get property 'fasta' on null object
Jul-26 14:50:44.594 [main] ERROR nextflow.cli.Launcher - @unknown
java.lang.NullPointerException: Cannot get property 'fasta' on null object
        at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)
        at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:190)
        at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:46)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329)
        at Script_a511e04e7e5ccdee.runScript(Script_a511e04e7e5ccdee:87)
        at nextflow.script.BaseScript.run0(BaseScript.groovy:144)
        at nextflow.script.BaseScript.run(BaseScript.groovy:192)
        at nextflow.script.ScriptParser.runScript(ScriptParser.groovy:236)
        at nextflow.script.ScriptParser.runScript(ScriptParser.groovy:222)
        at nextflow.script.IncludeDef.memoizedMethodPriv$loadModule0PathMapSession(IncludeDef.groovy:151)
        at nextflow.script.IncludeDef.access$0(IncludeDef.groovy)
        at nextflow.script.IncludeDef$__clinit__closure2.doCall(IncludeDef.groovy)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1030)
        at groovy.lang.Closure.call(Closure.java:427)
        at org.codehaus.groovy.runtime.memoize.Memoize$MemoizeFunction.lambda$call$0(Memoize.java:137)
        at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:137)
        at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:113)
        at org.codehaus.groovy.runtime.memoize.Memoize$MemoizeFunction.call(Memoize.java:136)
        at nextflow.script.IncludeDef.loadModule0(IncludeDef.groovy)
        at nextflow.script.IncludeDef.load0(IncludeDef.groovy:123)
        at nextflow.script.IncludeDef$load0$1.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
        at Script_976cceeb3c81f6ed.runScript(Script_976cceeb3c81f6ed:20)
        at nextflow.script.BaseScript.run0(BaseScript.groovy:144)
        at nextflow.script.BaseScript.run(BaseScript.groovy:192)
        at nextflow.script.ScriptParser.runScript(ScriptParser.groovy:236)
        at nextflow.script.ScriptRunner.run(ScriptRunner.groovy:242)
        at nextflow.script.ScriptRunner.execute(ScriptRunner.groovy:137)
        at nextflow.cli.CmdRun.run(CmdRun.groovy:372)
        at nextflow.cli.Launcher.run(Launcher.groovy:500)
        at nextflow.cli.Launcher.main(Launcher.groovy:672)
@jfy133
Copy link
Member

jfy133 commented Jul 27, 2024

Hi @Thomieh73 could you try either wrapping your --host_genome in quotes, or giving it a full path?

@Thomieh73
Copy link
Author

I think I solved this by using the launch button on the nf-core page. That created a params.json file that I could use.

I did however, try to run Mag with the test profile, to see if I could get that to work on our HPC cluster with slurm. That fails. It is a bit similar to the problems described here in issue #554.

@jfy133
Copy link
Member

jfy133 commented Jul 27, 2024

I think I solved this by using the launch button on the nf-core page. That created a params.json file that I could use.

Ok interesting. I'm guessing it was due to the paths as I think launch tries to resolve the whole thing(?) or at least quotes itm

I did however, try to run Mag with the test profile, to see if I could get that to work on our HPC cluster with slurm. That fails. It is a bit similar to the problems described here in issue #554.

Feel free to make another issue, the problems on that issue were never entirely clear

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

No branches or pull requests

2 participants