0

I'm trying to write a script for a pipeline, but I'm having trouble declaring the input of a rule from a directory.

My code in these parts:

rule taco:
    input:
            all_gtf = GTF_DIR + "path_samplesGTF.txt"
    output:
            taco_out = TACO_DIR
    shell:
            "taco_run -v -p 20  -o {output.taco_out} \
            --filter-min-expr 1 --gtf-expr-attr RPKM {input.all_gtf}"

rule feelnc_filter:
    input:
           assembly = TACO_DIR + "assembly.gtf",
           annotation = GTF
    output:
           candidate_lncrna = FEELNC_FILTER + "candidate_lncrna.gtf"
    shell:
          "./FEELnc_filter.pl -i {input.assembly} -a {input.annotation} > {output.candidate_lncrna}"

This is my error:

MissingInputException in line 97 of /workdir/Snakefile:

Missing input files for rule feelnc_filter:

Thank you! /workdir/pipeline-v01/TACO/assembly.gtf

1 Answers1

1

Your script code definitely is smaller than 97 lines, so the exception description is not very useful. Anyway, MissingInputException means that Snakemake has successfully constructed the workflow DAG (which means that there is nothing wrong with your input/output and wildcards) and started the execution of this workflow. At some point it was trying to execute the rule where the expected output of this rule was not present at the end of the rule's shell script.

Now we have the second problem: your script runs your own Perl script and an unknown taco_run executable: I have no clue what do these program do. I guess that taco_run doesn't create the directory that you specify as -o {output.taco_out}.

I advise you to run your Snakemake with the --printshellcmds key. This would show you the exact commands being run, and you could try to run those commands separately. Check that those commands really create the expected outputs.

Dmitry Kuzminov
  • 6,180
  • 6
  • 18
  • 40
  • Thank you Dmitry. The Taco create a directory as a output (and the directory may not have been previously created). I will run the Snakemake with the key and see what I get. – Leandro Boralli Aug 14 '19 at 21:05