Mercurial > repos > saskia-hiltemann > krona_text
changeset 0:ebbb18d665fd draft
Uploaded
author | saskia-hiltemann |
---|---|
date | Thu, 08 Oct 2015 11:21:08 -0400 |
parents | |
children | d6435b34b96b |
files | krona_text.xml runKrona.sh tool_dependencies.xml |
diffstat | 3 files changed, 103 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/krona_text.xml Thu Oct 08 11:21:08 2015 -0400 @@ -0,0 +1,49 @@ +<tool id="krona-text" name="Visualize with Krona" version="1"> + + <description>Visualise any hierarchical data</description> + + <requirements> + <requirement type="package" version="2.6">krona-tools</requirement> + </requirements> + + <!-- the command to run when user hits execute. Run our Rscript and pass the parameter to it --> + <command interpreter="bash"> + runKrona.sh $inputfile $isMothur $outputfile + + + </command> + + + <inputs> + <!-- parameter examples, see https://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax for descriptions --> + + <!-- file from history --> + <param name="inputfile" type="data" label="Select input file" help="Choose input file from history. Format: count - Hierarchy (tab separated)"/> + <param name="isMothur" type="boolean" checked="False" truevalue="Y" falsevalue="N" label="is this output from MOTHUR?" help="e.g. taxonomy file generated from Classify.seqs?"/> + + + </inputs> + + + <outputs> + <data format="html" name="outputfile" from_work_dir="text.krona.html" label="Krona output: HTML"/> + </outputs> + + <help> +Input file must be a tab-delimited file with first column being a count, rest the hierarchy, for example:: + + 2 Fats Saturated fat + 3 Fats Unsaturated fat Monounsaturated fat + 3 Fats Unsaturated fat Polyunsaturated fat + 13 Carbohydrates Sugars + 4 Carbohydrates Dietary fiber + 21 Carbohydrates + 5 Protein + 4 + +Would yield the following graph: http://krona.sourceforge.net/examples/text.krona.html + + + + </help> +</tool> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/runKrona.sh Thu Oct 08 11:21:08 2015 -0400 @@ -0,0 +1,29 @@ +# do krona visualisation +# runKrona.sh $infile $mothurtax $outputfile + +inputfile=$1 +isMothur=$2 + +# preprocess if taxonomy from MOTHUR +echo "starting" +head $inputfile + +if [[ $isMothur == "Y" ]] +then + awk 'BEGIN{FS="\t";OFS="\t"}{print $2,$3}' $inputfile > tempinput + head tempinput + sed -i 's/;/\t/g' tempinput + head tempinput + +else + cp $inputfile tempinput + +fi + +head tempinput + +# run Krona +echo $PATH +ktImportText tempinput + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Thu Oct 08 11:21:08 2015 -0400 @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="krona-tools" version="2.6"> + <install version="1.0"> + <actions> + <action type="download_by_url">https://github.com/marbl/Krona/releases/download/v2.6/KronaTools-2.6.tar</action> + <action type="shell_command"> ./install.pl --prefix=.</action> + <action type="shell_command"> ls </action> + <action type="shell_command"> chmod a+x scripts/* </action> + <action type="shell_command"> cp -R * $INSTALL_DIR </action> + <action type="set_environment"> + <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR</environment_variable> + <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/scripts</environment_variable> + </action> + <action type="shell_command"> cd $INSTALL_DIR/scripts </action> + <action type="shell_command"> ls </action> + <action type="shell_command"> cd $INSTALL_DIR/scripts; for filename in *; do ln -s "$filename" "kt${filename%.pl}"; done; </action> + </actions> + </install> + <readme> + Downloads and installs KronaTools. + </readme> + </package> +</tool_dependency> +