Previous changeset 21:728294cecd96 (2016-10-11) Next changeset 23:c7279df3f7ba (2016-10-27) |
Commit message:
Uploaded |
modified:
ALFA/alfa_wrapper.xml ALFA/tool_data_table_conf.xml.sample |
added:
ALFA/ALFA_wrapper.py ALFA/tool-data/alfa_indexes.loc.sample ALFA/tool-data/alfa_indexes.loc.sample~ ALFA/tool_data_table_conf.xml.sample~ |
removed:
ALFA/alfa_wrapper.sh ALFA/tool-data/alfa_genomes_indexes.loc.sample |
b |
diff -r 728294cecd96 -r 1714165f5df0 ALFA/ALFA_wrapper.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ALFA/ALFA_wrapper.py Thu Oct 27 04:42:59 2016 -0400 |
[ |
b'@@ -0,0 +1,194 @@\n+#!/usr/bin/python\n+\n+import argparse\n+import logging\n+import os\n+import re\n+import shutil\n+import subprocess\n+import sys\n+import tempfile\n+\n+def exit_and_explain(msg):\n+ logging.critical(msg)\n+ sys.exit(msg)\n+\n+def cleanup_before_exit(tmp_dir):\n+ if tmp_dir and os.path.exists(tmp_dir):\n+ shutil.rmtree(tmp_dir)\n+\n+def get_arg():\n+ parser = argparse.ArgumentParser()\n+ parser.add_argument(\'--project_name\', dest=\'project_name\', action=\'store\', nargs=1, metavar=\'project_name\', type=str)\n+ #Input 1: Annotation File\n+ parser.add_argument(\'--index\', dest=\'indexes\', action=\'store\', nargs=2, metavar=(\'stranded_index_filename\', \'unstranded_index_filename\'), type=str)\n+ parser.add_argument(\'--bi_index\', dest=\'bi_indexes\', action=\'store\', nargs=1, metavar=\'built_in_indexes_dir_path\', type=str )\n+ parser.add_argument(\'--annotation\', dest=\'annotation_file\', action=\'store\', nargs=1, metavar=\'annotation_gtf_file\', type=str )\n+ #Input 2: Mapped Reads\n+ parser.add_argument(\'--reads_format\', dest=\'reads_format\', action=\'store\', nargs=1, choices=[\'bam\', \'bedgraph\'], metavar=\'reads_format\', type=str)\n+ parser.add_argument(\'--reads\', dest=\'reads\', action=\'store\', nargs=\'+\', metavar=(\'bam_file1 label1\',""), type=str)\n+ parser.add_argument(\'--strandness\', dest=\'strandness\', action=\'store\', nargs=1, default=[\'unstranded\'], choices=[\'unstranded\', \'forward\', \'reverse\'], metavar=\'strandness\', type=str)\n+ #Output files\n+ parser.add_argument(\'--output_pdf\', dest=\'output_pdf\', action=\'store\', nargs=1, metavar=\'output_pdf_filename\', type=str)\n+ parser.add_argument(\'--output_svg\', dest=\'output_svg\', action=\'store\', nargs=2, metavar=(\'categories_svg_filename\', \'biotypes_svg_filename\'), type=str)\n+ parser.add_argument(\'--output_png\', dest=\'output_png\', action=\'store\', nargs=2, metavar=(\'categories_png_filename\', \'biotypes_png_filename\'), type=str)\n+ parser.add_argument(\'--output_count\', dest=\'output_count\', action=\'store\', nargs=1, metavar=\'output_count_filename\', type=str)\n+ parser.add_argument(\'--output_index\', dest=\'output_indexes\', action=\'store\', nargs=2, metavar=(\'output_stranded_index_filename\', \'output_unstranded_index_filename\'), type=str)\n+ #Output Options\n+ parser.add_argument(\'--categories_depth\', dest=\'categories_depth\', action=\'store\', nargs=1, default=[3], choices=range(1,5), metavar=\'categories_depth\', type=int)\n+ parser.add_argument(\'--plot_format\', dest=\'plot_format\', action=\'store\', nargs=1, choices=[\'pdf\', \'png\', \'svg\'], metavar=\'plot_format\', type=str)\n+ parser.add_argument(\'--threshold\', dest=\'threshold\', action=\'store\', nargs=2, metavar=(\'yMin\', \'yMax\'), type=float)\n+ #Internal variables\n+ parser.add_argument(\'--log_report\', dest=\'log_report\', action=\'store\', nargs=1, metavar=\'log_filename\', type=str)\n+ parser.add_argument(\'--galaxy_root\', dest=\'GALAXY_ROOT_DIR\', action=\'store\', nargs=1, metavar=\'galaxy_root_path\', type=str)\n+ parser.add_argument(\'--tool_dir\', dest=\'GALAXY_TOOL_DIR\', action=\'store\', nargs=1, metavar=\'galaxy_tool_dir_path\', type=str)\n+ args = parser.parse_args()\n+ return args\n+\n+def make_tmp_dir(galaxy_root):\n+ parent_dir = os.path.join(galaxy_root, \'database/tmp/\')\n+ if os.path.exists(parent_dir):\n+ tmp_dir = tempfile.mkdtemp(prefix=\'tmp\', suffix=\'\', dir=parent_dir)\n+ else:\n+ tmp_dir = tempfile.mkdtemp(prefix=\'tmp\', suffix=\'\', dir=\'.\')\n+ return tmp_dir\n+\n+def mv_and_rename_user_indexes(stranded_index, unstranded_index):\n+ index=\'index\'\n+ shutil.copy(stranded_index, index + \'.stranded.index\')\n+ shutil.copy(unstranded_index, index + \'.unstranded.index\')\n+ return index\n+\n+def get_input2_args(reads_list, format):\n+ n = len(reads_list)\n+ if n%2 != 0:\n+ exit_and_explain(\'Problem with pairing reads filename and reads label\')\n+ input2_args=\'-i\'\n+ k = 0\n+ reads_filenames = [\'\'] * (n/2)\n+ reads_labels = [\'\'] * (n/2)\n+ for i in range(0, n, 2):\n+ read'..b' return \'count_file.txt\'\n+\n+def main():\n+ args = get_arg()\n+\n+ if not (args.output_pdf or args.output_png or args.output_svg or args.output_indexes or args.output_count):\n+ exit_and_explain(\'Error: no output to return\\nProcess Aborted\\n\')\n+\n+ tmp_dir = make_tmp_dir(args.GALAXY_TOOL_DIR[0])\n+ os.chdir(tmp_dir)\n+\n+ logging.basicConfig(level=logging.INFO, filename=args.log_report[0], filemode="a+", format=\'%(message)s\')\n+\n+ alfa_path = os.path.join(args.GALAXY_TOOL_DIR[0], \'ALFA.py\')\n+\n+ #INPUT1: Annotation File\n+ if args.indexes:\n+ # The indexes submitted by the user must exhibit the suffix \'.(un)stranded.index\' and will be called by alfa by their prefix\n+ index = mv_and_rename_user_indexes(args.indexes[0], args.indexes[1])\n+ input1_args = \'-g %s\' % index\n+ elif args.bi_indexes:\n+ input1_args = \'-g %s\' % args.bi_indexes[0]\n+ elif args.annotation_file:\n+ input1_args = \'-a %s\' % args.annotation_file[0]\n+ else:\n+ exit_and_explain(\'No annotation file submitted !\')\n+\n+ #INPUT 2: Mapped Reads\n+ if args.reads:\n+ input2_args, reads_filenames, reads_labels = get_input2_args(args.reads, args.reads_format[0])\n+ strandness = \'-s %s\' % args.strandness[0]\n+ else:\n+ exit_and_explain(\'No reads submitted !\')\n+\n+ ##Output options\n+ categories_depth = \'-d %s\' % args.categories_depth[0]\n+ if not (args.output_pdf or args.output_png or args.output_svg):\n+ output_args = \'--n\'\n+ else:\n+ if args.output_pdf:\n+ output_args = \'--pdf plot.pdf\'\n+ if args.output_png:\n+ output_args = \'--png plot\'\n+ if args.output_svg:\n+ output_args = \'--svg plot\'\n+ if args.threshold:\n+ output_args = \'%s -t %.3f %.3f\' % (output_args, args.threshold[0], args.threshold[1])\n+\n+ ##Run alfa\n+ cmd = \'python %s %s %s %s %s %s\' % (alfa_path, input1_args, input2_args, strandness, categories_depth, output_args)\n+ logging.info("__________________________________________________________________\\n")\n+ logging.info("Alfa execution")\n+ logging.info("__________________________________________________________________\\n")\n+ logging.info("Command Line:\\n%s\\n" % cmd)\n+ logging.info("------------------------------------------------------------------\\n")\n+ alfa_result = subprocess.Popen(args=cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n+ alfa_out, alfa_err = alfa_result.communicate()\n+\n+ ##Handle stdout, warning, errors...\n+ redirect_errors(alfa_out, alfa_err)\n+\n+ logging.info("Alfa prompt:\\n%s" % alfa_out)\n+\n+ ##Redirect outputs\n+ if args.output_pdf:\n+ shutil.move(\'plot.pdf\', args.output_pdf[0])\n+ if args.output_png:\n+ shutil.move(\'plot\' + \'.categories.png\', args.output_png[0])\n+ shutil.move(\'plot\' + \'.biotypes.png\', args.output_png[1])\n+ if args.output_svg:\n+ shutil.move(\'plot\' + \'.categories.svg\', args.output_svg[0])\n+ shutil.move(\'plot\' + \'.biotypes.svg\', args.output_svg[1])\n+ if args.output_count:\n+ count_filename = merge_count_files(reads_labels)\n+ shutil.move(count_filename, args.output_count[0])\n+ if args.output_indexes:\n+ if args.annotation_file:\n+ indexes_regex = re.compile(\'.*\\.index\')\n+ indexes = filter(indexes_regex.search, os.listdir(\'.\'))\n+ indexes.sort()\n+ shutil.move(indexes[0], args.output_indexes[0])\n+ shutil.move(indexes[1], args.output_indexes[1])\n+ if args.indexes:\n+ shutil.move(index + \'.stranded.index\', args.output_indexes[0])\n+ shutil.move(index + \'.unstranded.index\', args.output_indexes[1])\n+ if args.bi_indexes:\n+ shutil.move(args.bi_indexes[0] + \'.stranded.index\', args.output_index[0])\n+ shutil.move(args.bi_indexes[1] + \'.unstranded.index\', args.output_index[1])\n+\n+ cleanup_before_exit(tmp_dir)\n+main()\n\\ No newline at end of file\n' |
b |
diff -r 728294cecd96 -r 1714165f5df0 ALFA/alfa_wrapper.sh --- a/ALFA/alfa_wrapper.sh Tue Oct 11 11:10:18 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
b'@@ -1,235 +0,0 @@\n-#!usr/bin/bash \n-\n-#########################################################################################################\n-# ARGUMENTS FROM alfa_wrapper.xml #\n-#########################################################################################################\n-galaxyRoot=$1;\n-toolDir=$2\n-configFile=$3;\n-logReport=$4;\n-sed -i -e \'/^$/d; s/\\t//g;\' $configFile;\n-printf "__________________________________________________________________\\n\\n" > $logReport\n-printf " ALFA CONFIG \\n" >> $logReport\n-printf "__________________________________________________________________\\n" >> $logReport\n-cat $configFile >> $logReport\n-\n-#########################################################################################################\n-# INITIALIZATION OF THE VARIABLES from $configFile #\n-#########################################################################################################\n-#_INPUT1\n-annotationSource=`grep -P \'^annotationSource ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-if [ "$annotationSource" == "personal_gtf" ]; then\n-\tannotationFile=`grep -P \'^annotationFile ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-elif [ "$annotationSource" == "built_in_index" ]; then\n-\tbuilt_in_index_prefix=`grep -P \'^built_in_index_prefix ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-else\n-\tstrandedIndex=`grep -P \'^strandedIndex ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\tunstrandedIndex=`grep -P \'^unstrandedIndex ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-fi\n-\n-#_INPUT2\n-readsType=`grep -P \'^readsType ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-readsFileList=`grep -P \'^readsFile\\[[0-9]+\\] ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-readsLabelList=`grep -P \'^readsLabel\\[[0-9]+\\] ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\n-#_OUTPUT CHOICES\n-plotChoice=`grep -P \'^plotChoice ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-countFileChoice=`grep -P \'^countFileChoice ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-indexChoice=`grep -P \'^indexChoice ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\n-#_OUTPUT OPTIONS\n-strandness=`grep -P \'^strandness ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-categoriesDepth=`grep -P \'^categoriesDepth ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-plotFormat=`grep -P \'^plotFormat ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-plotThresholdChoice=`grep -P \'^plotThresholdChoice ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-if [ "$plotThresholdChoice" == "True" ]; then\n-\tyMin=`grep -P \'^yMin ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n- \tyMax=`grep -P \'^yMax ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-fi\n-\n-#_OUTPUT FILES\n-if [ "$plotChoice" == "True" ]; then \n-\tif [ "$plotFormat" == "pdf" ]; then\n-\t\toutputPdf=`grep -P \'^outputPdf ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\telif [ "$plotFormat" == "svg" ]; then\n-\t\toutputCategoriesSvg=`grep -P \'^outputCategoriesSvg ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\t\toutputBiotypesSvg=`grep -P \'^outputBiotypesSvg ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\telse\n-\t\toutputCategoriesPng=`grep -P \'^outputCategoriesPng ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\t\toutputBiotypesPng=`grep -P \'^outputBiotypesPng ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\tfi\n-fi\n-if [ "$countFileChoice" == "True" ]; then \n-\toutputCountFile=`grep -P \'^outputCountFile ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-fi\n-if [ "$indexChoice" == "True" ]; then \n-\toutputStrandedIndex=`grep -P \'^outputStrandedIndex ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-\toutputUnstrandedIndex=`grep -P \'^outputUnstrandedIndex ?=\' $configFile | awk \'BEGIN{FS="= ?"} {print $2}\'`;\n-fi\n-\n-########################'..b'&& [ "$countFileChoice" == "False" ] && [ "$indexChoice" == "False" ]; then\n-cat <<error 1>&2\n-\n-No output to return. \n-Process Aborted\n-error\n-exit 0\n-fi\n-\n-printf "Command:\\n" >> $logReport\n-echo "python ""$scriptPath"ALFA.py $scriptInput $scriptStrandness $scriptCategoriesDepth $scriptPlotOutput >> $logReport;\n-printf "\\n******************************************************************\\n" >> $logReport\n-printf "Temporary Output Directory:\\n" >> $logReport\n-echo $outputDirectory >> $logReport\n-printf "\\n******************************************************************\\n" >> $logReport\n-printf "ALFA prompt:\\n" >> $logReport\n-python "$scriptPath"ALFA.py $scriptInput $scriptStrandness $scriptCategoriesDepth $scriptPlotOutput >> $logReport 2>errorFile;\n-printf "\\n******************************************************************\\n" >> $logReport\n-\n-#########################################################################################################\n-# REDIRECTION OF ERRORS - TMP SOURCE ALFA.PY MUST BE CORRECTED SOON #\n-#########################################################################################################\n-if [[ -s errorFile ]]; then\n-\t#When the option --n is enabled, alfa prints \'### End of the program\' in stderr even if the process worked-\n-\t#The following lines to avoid the tool from crashing in this case\n-\tendProgram=`grep -c \'### End of program\' errorFile`\n-\tif [ "$endProgram" == "0" ]; then\n-\t\t#When alfa prints \'### End of program\' in stdout, all the messages in stderr are considered\n-\t\t#as warnings and not as errors. True errors make the script exits with code "2"\n-\t\tendProgram=`grep -c \'### End of program\' $logReport`\n-\t\tif [ "$endProgram" == "0" ]; then\n- \t\t\t>&2 printf "The script ALFA.py encountered the following error:\\n\\n"\n-\t\t\t>&2 cat errorFile\n-\t\t\tprintf "ALFA error:\\n" >> $logReport\n-\t\t\tcat errorFile >> $logReport\n-\t\t\tprintf "\\n******************************************************************\\n" >> $logReport\n- \t\t\texit 2\n- \t\telse\n- \t\t\t>&2 printf "The script ALFA.py encountered the following warning:\\n\\n"\n- \t\t\t>&2 cat errorFile \n- \t\t\tprintf "ALFA warning:\\n" >> $logReport\n- \t\t\tcat errorFile >> $logReport\n-\t\t\tprintf "\\n******************************************************************\\n" >> $logReport\n- \t\tfi\n- \tfi\n-fi\n-\n-#########################################################################################################\n-# OUTPUT REDIRECTIONS #\n-#########################################################################################################\n-if [ "$plotChoice" == "True" ]; then\n-\tif [ "$plotFormat" == "pdf" ]; then\n-\t\tmv "plotFile.pdf" $outputPdf;\n-\telif [ "$plotFormat" == "png" ]; then\n-\t\tmv "plotFile.categories.png" $outputCategoriesPng;\n-\t\tmv "plotFile.biotypes.png" $outputBiotypesPng;\n-\telse \n-\t\tmv "plotFile.categories.svg" $outputCategoriesSvg;\n-\t\tmv "plotFile.biotypes.svg" $outputBiotypesSvg;\n-\tfi\n-fi\n-if [ "$countFileChoice" == "True" ]; then\n-\t> countFile;\n-\tfor (( i = 1; i <= readsListLen; i++ )) do\n-\t\tprintf "##LABEL: "${readsLabel[$i]}"\\n\\n" >> countFile;\n-\t\tcat ${readsLabel[$i]}".categories_counts" >> countFile;\n-\t\tprintf "__________________________________________________________________\\n" >> countFile;\n-\tdone\n-\tmv countFile $outputCountFile;\n-fi\n-if [ "$indexChoice" == "True" ]; then\n-\tif [ "$annotationSource" == "index" ]; then\n-\t\tmv $strandedIndex $outputStrandedIndex\n-\t\tmv $unstrandedIndex $outputUnstrandedIndex\n-\telif [ "$annotationSource" == "built_in_index" ]; then\n-\t\tcp $built_in_index_prefix".stranded.index" $outputStrandedIndex\n-\t\tcp $built_in_index_prefix".unstranded.index" $outputUnstrandedIndex\n-\telse\n-\t\tannotationFileName=`grep -P -o \'[^/]*\\.dat$\' <<< $annotationFile`\n-\t\tmv $annotationFileName".stranded.index" $outputStrandedIndex\n-\t\tmv $annotationFileName".unstranded.index" $outputUnstrandedIndex\n-\tfi\n-fi\n\\ No newline at end of file\n' |
b |
diff -r 728294cecd96 -r 1714165f5df0 ALFA/alfa_wrapper.xml --- a/ALFA/alfa_wrapper.xml Tue Oct 11 11:10:18 2016 -0400 +++ b/ALFA/alfa_wrapper.xml Thu Oct 27 04:42:59 2016 -0400 |
[ |
b'@@ -8,10 +8,61 @@\n \t<requirement type="package" version="1.4">matplotlib</requirement>\n \t</requirements>\n \n- \t<command interpreter="bash">\n- \t\talfa_wrapper.sh $__root_dir__ $__tool_directory__ $ALFA_config $logReport\n- \t</command>\t\n-\t\n+\t<command interpreter="python">\n+\t<![CDATA[\n+\t\tALFA_wrapper.py\n+\n+\t\t--project_name "${projectName}"\t\n+\n+\t\t##__INPUT 1__##\n+\t\t#if str ( $annotation.annotationSource[\'annotationSourceSelection\'] ) == "index"\n+\t\t\t--index $annotation.annotationSource[\'strandedIndex\'] $annotation.annotationSource[\'unstrandedIndex\']\n+\t\t#else if str ( $annotation.annotationSource[\'annotationSourceSelection\'] ) == "built_in_index"\n+\t\t\t--bi_index $annotation.annotationSource.built_in_index_prefix.fields.prefix\n+\t\t#else\n+\t\t\t--annotation $annotation.annotationSource[\'annotationFile\']\n+\t\t#end if\n+\n+\t\t##__INPUT 2__##\n+\t\t--reads_format $reads.readsType[\'readsTypeSelection\']\n+\t\t\t--reads\n+\t\t#for $i, $r in enumerate ( $reads.readsType[\'readsList\'] ) \n+\t\t\t__fname__$r.readsFile\n+\t\t\t__label__$r.readsLabel\n+\t\t#end for\n+\t\t--strandness $reads[\'strandness\']\n+\n+\t\t##__OUTPUT FILES__##\n+\t\t#if str ( $outputFiles[\'plot\'] ) == "True"\n+\t\t\t#if str ( $outputOptions[\'plotFormat\'] ) == "pdf"\n+\t\t\t\t--output_pdf $outputPdf\n+\t\t\t#else if str ( $outputOptions[\'plotFormat\'] ) == "png"\n+\t\t\t\t--output_png $outputCategoriesPng $outputBiotypesPng\n+\t\t\t#else\n+\t\t\t\t--output_svg $outputCategoriesSvg $outputBiotypesSvg\n+\t\t\t#end if\n+\t\t#end if\n+\t\t#if str ( $outputFiles[\'countFile\'] ) == "True"\n+\t\t\t--output_count $outputCountFile\n+\t\t#end if\n+\t\t#if str ( $outputFiles[\'index\'] ) == "True"\n+\t\t\t--output_index $outputStrandedIndex $outputUnstrandedIndex\n+\t\t#end if\n+\n+\t\t##__OUTPUT OPTIONS__##\n+\t\t--categories_depth $outputOptions[\'categoriesDepth\']\n+\t\t#if str ( $outputFiles[\'plot\'] ) == "True"\n+\t\t\t--plot_format $outputOptions[\'plotFormat\']\n+\t\t\t#if str ( $outputOptions.plotThreshold[\'plotThresholdChoice\'] ) == "True"\n+\t\t\t\t--threshold $outputOptions.plotThreshold.yMin $outputOptions.plotThreshold.yMax\n+\t\t\t#end if\n+\t\t#end if\n+\n+\t\t--log_report $logReport\n+\t\t--galaxy_root $__root_dir__\n+\t\t--tool_dir $__tool_directory__\n+\t]]>\n+\t</command>\n \t<inputs>\n \t\t<param name="projectName" value="ALFA" type="text" size="20" label="Project Name">\n \t\t\t<validator type="empty_field" message="Please, specify a name for your project."/>\n@@ -29,7 +80,7 @@\n \t\t\t\t\t</param>\n \t\t\t\t</when>\n \t\t\t\t<when value="index">\n-\t\t\t\t\t<param name="strandedIndex" type="data" format="index" label="Select your ALFA stranded index file (index format)"/>\n+\t\t\t\t\t<param name="strandedIndex" type="data" format="index" label="Select your ALFA Stranded index file (index format)"/>\n \t\t\t\t\t<param name="unstrandedIndex" type="data" format="index" label="Select your ALFA Unstranded index file (index format)"/>\n \t\t\t\t</when>\n \t\t\t\t<when value="built_in_index">\n@@ -74,7 +125,7 @@\n \t\t\t<param name="index" type="boolean" truevalue="True" falsevalue="False" checked="False" label ="Indexes" help="Print the resulting stranded and unstranded indexes from the gtf input file (useful if you plan to run ALFA again with this annotated sequence)"/>\n \t\t</section>\n \n-\t\t<section name="outputOptions" title="ADVANCED OPTIONS" expanded="False">\n+\t\t<section name="outputOptions" title="ADVANCED SETTINGS" expanded="False">\n \t\t\t<param name="categoriesDepth" type="select" label="Categories to Display">\n \t\t\t\t<option value="1">gene | intergenic</option>\n \t\t\t\t<option value="2">exon | intron | intergenic</option>\n@@ -92,6 +143,7 @@\n \t\t\t\t\t\t<param name="yMin" type="float" value="-2.0" label="y min"/>\n \t\t\t\t\t\t<param name="yMax" type="float" value="2.0" label="y max"/>\n \t\t\t\t\t</when>\n+\t\t\t\t\t<when value="False"></when>\n \t\t\t</conditional>\n \t\t</section>\n \t</inputs>\n@@ -124,61 +176,6 @@\n \t\t</data>\n \t</outputs>\n \n-\t<configfiles>\n-\t\t<configfile name="ALFA_config">\n-\t\t\tprojectName=$projectName\n-\n-\t\t\t##__INPUT 1__##\n-\t\t\tannotationSource=$annotation.annotationSource[\'annotationSourceSelection\']\n-\t\t\t#if str ( $annotation.annotationSource[\'annotationSourceSelection\'] ) == "'..b"ed in a second round of the program.\n+\t| Indexes are files which list all the coordinates of the categories (stop codon, 5'-UTR, CDS, intergenic...) and biotypes (protein coding genes, miRNA, tRNA, ...) encountered in the annotated sequence.\n+\t|\n \t\n-.. class:: warningmark\n+\t.. class:: warningmark\n \n-Gtf File must be sorted.\n+\t| Gtf File must be sorted.\n+\t|\n \n-.. class:: infomark\n-\n-Generation of indexes from an annotation file may be time consuming (i.e ~10min for the human genome). Thus, ALFA allows the user to submit directly indexes generated in previous runs.\n+\t.. class:: infomark\n \n-2. **Input 2: Reads**\n+\t| Generation of indexes from an annotation file might be time consuming (i.e ~10min for the human genome). Thus, ALFA allows the user to submit directly indexes generated in previous runs.\n+\t|\n \n-\t| ALFA requires as second input a single or a set of mapped reads file(s) in either bam or bedgraph format. These files are required to intersect the coordinates of the mapped reads with the associated categories and biotypes on the annotated sequence.\n-\t| The strandness option determines which strand of the annotated sequence will be taken into account during this intersection.\n+\t.. class:: infomark\n+\n+\t| ALFA also allows to use built-in indexes to save even more computational time. In order to generate these built-in indexes, install the data manager tool 'data_manager_build_alfa_indexes' available on the toolshed.\n \n-.. class:: warningmark\n+* **Input 2: Reads**\n \n-Bam or Bedgraph file(s) must be sorted.\n+\t| ALFA requires as second input a single or a set of mapped reads file(s) in either bam or bedgraph format. The coordinates of the mapped reads will be intersected with the according categories and biotypes mentioned in the indexes.\n+\t| The strandness option determines which strand of the annotated sequence will be taken into account during this intersection.\n+\t|\n \n-<!--\n-.. class:: warningmark\n+\t.. class:: warningmark\n \n-For oriented reads (either matching the forward strand or the reverse strand), 'forward' or 'reverse' strandness must be selected.\n+\t| Bam or Bedgraph file(s) must be sorted.\n+\t|\n \n-.. class:: warningmark\n+\t.. class:: warningmark\n \n-For paired-end or non-oriented reads, 'unstranded' strandness must be selected.\n--->\n+\t| Chromosome names in reads and in annotation file (gtf or indexes) must be the same for the intersection to occur\n+\t|\n \n-3. **Output files**\n+* **Output files**\n \n \t| The result of the intersection is a count file displaying the count of nucleotides in the reads for each genomic categories and biotypes. From this count file, plots of the raw and normalized distributions of the reads among these categories are generated.\n \t| In the output files section, the user can choose what kind of files he desires as ALFA output. Categories Count File and Plots are proposed by default. \n-\n-.. class:: infomark\n+\t|\n \n-The user can also select the 'indexes' option as output. This option is interesting if you plan to run ALFA again with the same submitted annotation file. *See Nota Bene/Input 1: Annotation File for more information.*\n+\t.. class:: infomark\n \n+\t| The user can also select the 'indexes' option as output. This option is interesting if you plan to run ALFA again with the same submitted annotation file. *See Nota Bene/Input 1: Annotation File for more information.*\n+\t|\n \n-- `How the plots look like`_\n+\t- `How the plots look like`_\n \n-.. _How the plots look like: https://github.com/biocompibens/ALFA#plots\n+\t.. _How the plots look like: https://github.com/biocompibens/ALFA#plots\n \n-- `How they are generated`_ \n+\t|\n \n-.. _How they are generated: https://github.com/biocompibens/ALFA#detailed-example\n+\t- `How they are generated`_ \n+\n+\t.. _How they are generated: https://github.com/biocompibens/ALFA#detailed-example\n \n ----\n \n@@ -307,7 +313,7 @@\n \n \t| Beno\xc3\xaet No\xc3\xabl and Mathieu Bahin: *compbio team, Institut de Biologie de l'Ecole Normale Sup\xc3\xa9rieure de Paris*\n \n-\n+]]>\n </help>\n \n <citations>\n" |
b |
diff -r 728294cecd96 -r 1714165f5df0 ALFA/tool-data/alfa_genomes_indexes.loc.sample --- a/ALFA/tool-data/alfa_genomes_indexes.loc.sample Tue Oct 11 11:10:18 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,5 +0,0 @@ -#<species> <version> <release> <value> <dbkey> <name> <prefix> -#Arabidopsis_thaliana TAIR10 30 Arabidopsis_t_TAIR10_30 Arabidopsis_t_TAIR10_30 Arabidopsis thaliana: TAIR10 <path_to_alfa_indexes>/Arabidopsis_thaliana.TAIR10.30 -#Drosophila_melanogaster dm6 30 Drosophila_m_dm6_30 Drosophila_m_dm6_30 Drosophila melanogaster: dm6 <path_to_alfa_indexes>/Drosophila_melanogaster.BDGP6.30 -#Homo_sapiens v38 82 Homo_s_v38_82 Homo_s_v38_82 Homo sapiens: v38 <path_to_alfa_indexes>/Homo_sapiens.GRCh38.82 -#Mus_musculus v38 83 Mus_m_v38_83 Mus_m_v38_83 Mus musculus: v38 <path_to_alfa_indexes>/Mus_musculus.GRCm38.83.chr |
b |
diff -r 728294cecd96 -r 1714165f5df0 ALFA/tool-data/alfa_indexes.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ALFA/tool-data/alfa_indexes.loc.sample Thu Oct 27 04:42:59 2016 -0400 |
b |
@@ -0,0 +1,2 @@ +#<species> <version> <release> <value> <dbkey> <name> <prefix> +#Dictyostelium_discoideum dicty_2 7 Dictyostelium_discoideum_dicty_2_7 Dictyostelium_discoideum_dicty_2_7 Dictyostelium_discoideum: dicty_2 (release 7) <path_to_dicty_indexes_dir> |
b |
diff -r 728294cecd96 -r 1714165f5df0 ALFA/tool-data/alfa_indexes.loc.sample~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ALFA/tool-data/alfa_indexes.loc.sample~ Thu Oct 27 04:42:59 2016 -0400 |
b |
@@ -0,0 +1,5 @@ +#<species> <version> <release> <value> <dbkey> <name> <prefix> +#Arabidopsis_thaliana TAIR10 30 Arabidopsis_t_TAIR10_30 Arabidopsis_t_TAIR10_30 Arabidopsis thaliana: TAIR10 <path_to_alfa_indexes>/Arabidopsis_thaliana.TAIR10.30 +#Drosophila_melanogaster dm6 30 Drosophila_m_dm6_30 Drosophila_m_dm6_30 Drosophila melanogaster: dm6 <path_to_alfa_indexes>/Drosophila_melanogaster.BDGP6.30 +#Homo_sapiens v38 82 Homo_s_v38_82 Homo_s_v38_82 Homo sapiens: v38 <path_to_alfa_indexes>/Homo_sapiens.GRCh38.82 +#Mus_musculus v38 83 Mus_m_v38_83 Mus_m_v38_83 Mus musculus: v38 <path_to_alfa_indexes>/Mus_musculus.GRCm38.83.chr |
b |
diff -r 728294cecd96 -r 1714165f5df0 ALFA/tool_data_table_conf.xml.sample --- a/ALFA/tool_data_table_conf.xml.sample Tue Oct 11 11:10:18 2016 -0400 +++ b/ALFA/tool_data_table_conf.xml.sample Thu Oct 27 04:42:59 2016 -0400 |
b |
@@ -2,6 +2,6 @@ <!-- Locations of all alfa indexes --> <table name="alfa_indexes" comment_char="#" allow_duplicate_entries="False"> <columns>species, version, release, value, dbkey, name, prefix</columns> - <file path="tool-data/alfa_genomes_indexes.loc" /> + <file path="tool-data/alfa_indexes.loc" /> </table> -</tables> \ No newline at end of file +</tables> |
b |
diff -r 728294cecd96 -r 1714165f5df0 ALFA/tool_data_table_conf.xml.sample~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ALFA/tool_data_table_conf.xml.sample~ Thu Oct 27 04:42:59 2016 -0400 |
b |
@@ -0,0 +1,7 @@ +<tables> + <!-- Locations of all alfa indexes --> + <table name="alfa_indexes" comment_char="#" allow_duplicate_entries="False"> + <columns>species, version, release, value, dbkey, name, prefix</columns> + <file path="tool-data/alfa_genomes_indexes.loc" /> + </table> +</tables> \ No newline at end of file |