# HG changeset patch # User greg # Date 1511357830 18000 # Node ID de93d8e8a09637746c4aa65091534fa50c8291b1 # Parent 1c49e78e4ee74b3fd2e6e7ff1326499f87530ed6 Uploaded diff -r 1c49e78e4ee7 -r de93d8e8a096 ideas.xml --- a/ideas.xml Wed Nov 22 08:36:59 2017 -0500 +++ b/ideas.xml Wed Nov 22 08:37:10 2017 -0500 @@ -26,6 +26,8 @@ $prep_input_config #if str($specify_genomic_window) == "yes": -bed '$specify_genomic_window_cond.bed_input' + #import collections + chroms = collections.OrderedDict() #else: -gsz '$chromInfo' -wsz $specify_genomic_window_cond.window_size @@ -53,25 +55,72 @@ && ls tmp/*.bed.gz > file2.txt && paste <(cat file1.txt) <(cat file2.txt) -d' ' > $prep_output_config ############################################## -## If using a genomic window bed file, then -## generate a text file that categorizes the -## window positions by chromosome to enable +## If using a genomic window bed file, categorize +## the window positions by chromosome to enable ## the IDEAS -inv option. ############################################## #if str($specify_genomic_window) == "yes": - && python '$__tool_directory__/create_window_positions_by_chrom.py' - --input '$specify_genomic_window_cond.bed_input' - --output $window_positions_by_chrom + $categorize_window_positions_by_chrom + #for chrom, tup in $chroms.items(): + && ideas + '$prep_output_config' + $ideas_options + #end for +#else: + && ideas + '$prep_output_config' + $ideas_options + && mv ./*.cluster '$output_txt_dir' + && mv ./*.para '$output_txt_dir' + && mv ./*.profile '$output_txt_dir' + && mv ./*.state '$output_txt_dir' + -o '$project_name' + #if str($save_ideas_log) == "yes": + > $output_log + #else: + > /dev/null + #end if + && Rscript '$__tool_directory__/create_heatmap.R' + -i '$output_txt_dir' + -o '$output_pdf_dir' #end if -############################################## -## Run IDEAS -############################################## -&& ideas -'$prep_output_config' -#set specify_genomic_window = $specify_genomic_window_cond.specify_genomic_window -#if str($specify_genomic_window) == "yes": + ]]> + + + = 0, "The selected input '%s' is invalid because it does not include the '-' character which is required when setting cell type and epigenetic factor names by extracting them from the input file names." % $file_name_with_ext + #set file_name = $file_name_with_ext.split(".")[0] + #if str($input_name_positions) == "cell_first": + #set cell_type_name = $file_name.split("-")[0] + #set epigenetic_factor_name = $file_name.split("-")[1] + #else: + #set cell_type_name = $file_name.split("-")[1] + #set epigenetic_factor_name = $file_name.split("-")[0] + #end if +${cell_type_name} ${epigenetic_factor_name} ${i} + #end for +#else: + #for $input_items in $cell_type_epigenetic_factor_cond.input_repeat: +${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} + #end for +#end if]]> + $output_log -#else: - > /dev/null -#end if -&& mv ./*.cluster '$output_txt_dir' -&& mv ./*.para '$output_txt_dir' -&& mv ./*.profile '$output_txt_dir' -&& mv ./*.state '$output_txt_dir' -&& Rscript '$__tool_directory__/create_heatmap.R' --i '$output_txt_dir' --o '$output_pdf_dir' - ]]> - - = 0, "The selected input '%s' is invalid because it does not include the '-' character which is required when setting cell type and epigenetic factor names by extracting them from the input file names." % $file_name_with_ext - #set file_name = $file_name_with_ext.split(".")[0] - #if str($input_name_positions) == "cell_first": - #set cell_type_name = $file_name.split("-")[0] - #set epigenetic_factor_name = $file_name.split("-")[1] - #else: - #set cell_type_name = $file_name.split("-")[1] - #set epigenetic_factor_name = $file_name.split("-")[0] - #end if -${cell_type_name} ${epigenetic_factor_name} ${i} - #end for -#else: - #for $input_items in $cell_type_epigenetic_factor_cond.input_repeat: -${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} - #end for -#end if]]> +-thread \${GALAXY_SLOTS:-4}]]>