Hello, I am defining some tools for my own galaxy installation and I would like to know if there is a more elegant solution for redirecting error output than the one in the next config file: <tool id="gatk_mio" name="calling with gatk"> <description>calling with gatk</description> <command> ln -s "${input}" input.bam ; samtools index input.bam; java -jar /home/ralonso/software/GenomeAnalysisTK-3.3-0/GenomeAnalysisTK.jar -T UnifiedGenotyper -R /home/ralonso/BiB/Galaxy/data/Cclementina_v1.0_scaffolds.fa -I input.bam -o $output *2>/dev/null;* </command> <inputs> <param format="bam" name="input" type="data" label="bam"/> </inputs> <outputs> <data format="vcf" name="output" /> </outputs> <help> bwa </help> </tool> Best regards many thanks -- Roberto Alonso Functional Genomics Unit Bioinformatics and Genomics Department Prince Felipe Research Center (CIPF) C./Eduardo Primo Yúfera (Científic), nº 3 (junto Oceanografico) 46012 Valencia, Spain Tel: +34 963289680 Ext. 1021 Fax: +34 963289574 E-Mail: ralonso@cipf.es
Two things - if you really want to just hide standard output - you can use the XML CDATA idiom to eliminate the need for escaping < and >. <command><![CDATA[ comand > /dev/null ]]></command If you want to allow the standard error to just be printed and use the exit code of the tool to determine whether the job has failed - you can add the following block to your tool XML: <stdio> <exit_code range="1:" /> </stdio> I think this is a saner default and I would just add this block to all new tools. You may want to check out the planemo tool builder - it will bootstrap new tool definitions that do both of these (use CDATA for the command and set a default stdio). http://planemo.readthedocs.org/en/latest/writing_standalone.html Hope this helps. -John On Thu, Apr 16, 2015 at 6:55 AM, Roberto Alonso CIPF <ralonso@cipf.es> wrote:
Hello,
I am defining some tools for my own galaxy installation and I would like to know if there is a more elegant solution for redirecting error output than the one in the next config file:
<tool id="gatk_mio" name="calling with gatk"> <description>calling with gatk</description> <command> ln -s "${input}" input.bam ; samtools index input.bam; java -jar /home/ralonso/software/GenomeAnalysisTK-3.3-0/GenomeAnalysisTK.jar -T UnifiedGenotyper -R /home/ralonso/BiB/Galaxy/data/Cclementina_v1.0_scaffolds.fa -I input.bam -o $output 2>/dev/null; </command>
<inputs> <param format="bam" name="input" type="data" label="bam"/> </inputs> <outputs> <data format="vcf" name="output" /> </outputs>
<help> bwa </help>
</tool>
Best regards
many thanks
-- Roberto Alonso Functional Genomics Unit Bioinformatics and Genomics Department Prince Felipe Research Center (CIPF) C./Eduardo Primo Yúfera (Científic), nº 3 (junto Oceanografico) 46012 Valencia, Spain Tel: +34 963289680 Ext. 1021 Fax: +34 963289574 E-Mail: ralonso@cipf.es
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: https://lists.galaxyproject.org/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/
participants (2)
-
John Chilton
-
Roberto Alonso CIPF