Hello!
So I have a python script that I'm integrated in my local galaxy and it outputs 2 files: one pdf created with pdflatex and one csv file. This code works perfectly on the command line, on galaxy the code finishes successfully but the outputs are empty.
Command on the xml:
<command detect_errors="exit_code"><![CDATA[
python '$__tool_directory__/LungCARD_report.py' "$patientID" "$sampleID" "$birthday" "$gender" "$labKit" "$sequencer" "$vcf_file" "$idxstats" "$flagstat" "$fastq1" "$fastq2"
]]></command>
Writting of the pdf file:
with open(filename, 'w') as f:
f.write(content)
#outputs the report as latex
commandLine = subprocess.Popen(['pdflatex', filename])
commandLine.communicate()
os.unlink(filename)
os.unlink(filename[:-4] + '.log')
os.unlink(filename[:-4] + '.aux')
Writting of the csv file:
vcf.getVCF().to_csv(filename)
Planemo wrote the outputs tag as:
<outputs>
<data name="output1" format="pdf" from_work_dir="report.pdf" />
<data name="output2" format="csv" from_work_dir="unknown_variants.csv" />
</outputs>
Please help me get the outputs to the history in galaxy! Thanks!
I never used "from_work_dir" so not sure about that. Maybe it needs to be the full path.
I would use $output1 as parameter for the python script. So:
In the python script I write the result to the $output1 parameter
I changed the xml as you suggested and the result is the same.
How do you do that? I think the problem might be from my script but even after researching about it I was still unaware of what to do..