jiarong / VirSorter2

customizable pipeline to identify viral sequences from (meta)genomic data
GNU General Public License v2.0
227 stars 31 forks source link

Snakemake missing output files reason while using Slurm #75

Closed paulaistvan closed 3 years ago

paulaistvan commented 3 years ago

Command:

Screenshot 2021-07-04 at 11 54 13

Error

Screenshot 2021-07-04 at 11 53 13

While running normally without submitting job, snakemake is working fine but if i use slurm to submit job via sbatch, then it give missing output files in reason and then job fails.

Tried putting latency wait variable for snakemake also as per internet results that suggested will wait for output files to generate but no luck, any insights on this?

Have tried reducing mem per cpu, no of nodes, cpus etc but no luck.

This is the snakemake rule, pls note it work perfect if we don't submit job via slurm.

Screenshot 2021-07-04 at 11 57 38
jiarong commented 3 years ago

Hi, this is more of a snakemake Q. The issues I can spot are:

paulaistvan commented 3 years ago

Thank you for you quick answer. I added both of your suggestions, but got some other error.

name 'wildcards' is not defined.

and if i simply do the old one in params section but with f added, like this: dir=f"virsorter_output2/{sample}"

then it says, name 'sample' is not defined.

Can you suggest what could be the reason.

jiarong commented 3 years ago

I recommend removing the params, change the shell command to:

virsorter run -i {input.fasta} -d {config[db]} -w virsorter_output2/{wildcards.sample} -j {threads} --min-length 1500 --use-conda-off all
paulaistvan commented 3 years ago

Have changed as per your suggestions, below is final one. It's still giving same error.

Screenshot 2021-07-06 at 17 27 16

Error:

Screenshot 2021-07-06 at 17 27 22
jiarong commented 3 years ago

Are there files produced in virsorter_output2/sample/?

paulaistvan commented 3 years ago

Yes, only this:

Screenshot 2021-07-07 at 08 01 17
paulaistvan commented 3 years ago

But the folder name is "sample" should be the name of the scaffold right?

jiarong commented 3 years ago

Name should be whatever is under "SampleData2". Any message produced from VS2?

paulaistvan commented 3 years ago

yes name is fine, and by message you mean log folder or on the terminal output that you have already seen above? In the log folder, there is only one empty file.

Screenshot 2021-07-08 at 19 03 48
jiarong commented 3 years ago

Hi, sorry that I have not clue what's the issue. The snakemake syntax looks good to me and the VS2 runs OK without snakemake. . It will require the data and some testing to figure out. But I wont be able to solve this snakemake slurm issue for you here.

erosix commented 2 years ago

I have the same issue. Was a solution found? I see that this happens when the rule outputs are not specified in the shell commands directly. Like if the output is a produced file but in the shell command one only specifies the output folder and not the internal files.

jgroh commented 2 years ago

Experiencing a similar issue here.

ETAOIK commented 1 year ago

Experiencing a similar issue here.