BayesTyper icon indicating copy to clipboard operation
BayesTyper copied to clipboard

ChildIOException: File/directory is a child to another output

Open Parsoa opened this issue 4 years ago • 9 comments

I have installed the latest version along with all the dependencies and have configured it to test run on a single sample using all three tools (Manta, GATK, Platypus). It fails on start with the following error:

snakemake --snakefile=/share/Codes/output/revision/bayestyper/call_candidates_and_genotype.smk  --cores=24
/share/Codes/venv3/lib/python3.5/site-packages/snakemake/workflow.py:14: FutureWarning: read_table is deprecated, use read_csv instead, passing sep='\t'.
  from functools import partial
Building DAG of jobs...
ChildIOException:
File/directory is a child to another output:
/share/Codes/output/revision/bayestyper/manta/HG00514
/share/Codes/output/revision/bayestyper/manta/HG00514/results/variants/candidateSV.vcf.gz

Seems like an error internal to Snakemake. I tried replacing all mkdir command with mkdir -p as suggest here but no such commands are executed by the jobs in the snakefiles. Removing Manta

Parsoa avatar Apr 06 '20 07:04 Parsoa

Thank you for writing. I am adding @lassemaretty who wrote the Snakemake pipeline. Hopefully he can help.

jonassibbesen avatar Apr 06 '20 20:04 jonassibbesen

Any update on this? Thanks.

Parsoa avatar May 07 '20 19:05 Parsoa

Same issue for me with the snakemake workflow I'm currently writing. I never had this before, but, on the other hand, I had rarely had rules whose output was a directory(), so I don't know whether this is a recent issue with snakemake or just me not writing my workflow correctly.

blaiseli avatar May 12 '20 08:05 blaiseli

@Parsoa Thank you for your patience. I have reached out to the author of the Snakemake pipeline again. He is really busy, but hopefully I will hear from him soon.

jonassibbesen avatar May 12 '20 19:05 jonassibbesen

For information, I found that my issue doesn't happen with snakemake version 5.7.4, and happens since at least version 5.8.2. I'm curious to know whether this is the same here.

blaiseli avatar May 13 '20 09:05 blaiseli

Hi blaiseli,

Sorry for the late reply. I am the author of the Snakemake workflow. I am currently on leave and not able to fix the issue right now. I expect to be back in a few weeks and will take a look at your issue as soon as I am back. I am. really sorry for the inconvenience.

Best,

Lasse

lassemaretty avatar May 14 '20 08:05 lassemaretty

@lassemaretty This is not really my issue: my issue was with my own workflow, and I commented here in case it could help understanding the problem, because it looked similar.

For your information, the author of snakemake just made a change that might fix the issue reported in the case of your workflow: https://github.com/snakemake/snakemake/commit/0c289a650803f08f35e68392fb066e8977950b2b

As I understand it, now it should be OK to have a directory and some files within that directory as output of a single rule, but not OK to have the files as output of a different rule than the one having the directory as output.

blaiseli avatar May 25 '20 13:05 blaiseli

With checkpoint and output have the directory() function, I got the same error.

hmkim avatar Aug 17 '21 00:08 hmkim

I found a way to circumvent this error: Just provide your output directory as params instead of output. Then ofc you will need to create the folder if it does not exist. Additionally you will need another output file in that rule instead of the directory.

nicolasgoedert97 avatar May 12 '22 10:05 nicolasgoedert97