Mercurial > repos > greg > ideas
changeset 129:d064db60a06d draft
Uploaded
author | greg |
---|---|
date | Wed, 22 Nov 2017 10:24:04 -0500 |
parents | de93d8e8a096 |
children | d088f25661d9 |
files | ideas.xml |
diffstat | 1 files changed, 90 insertions(+), 61 deletions(-) [+] |
line wrap: on
line diff
--- a/ideas.xml Wed Nov 22 08:37:10 2017 -0500 +++ b/ideas.xml Wed Nov 22 10:24:04 2017 -0500 @@ -9,7 +9,6 @@ <requirement type="package" version="1.4.4">r-optparse</requirement> </requirements> <command detect_errors="exit_code"><![CDATA[ -#set window_positions_by_chrom = "window.inv" #set output_pdf_dir = "output_pdf_dir" #set output_txt_dir = "output_txt_dir" #set tmp_dir = "tmp" @@ -26,8 +25,6 @@ $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 @@ -60,45 +57,110 @@ ## the IDEAS -inv option. ############################################## #if str($specify_genomic_window) == "yes": - $categorize_window_positions_by_chrom - #for chrom, tup in $chroms.items(): + #import collections + #set window_positions_by_chroms = collections.OrderedDict() + #for count, line in enumerate(open($specify_genomic_window_cond.bed_input.file_name, 'r')): + #set $line = $line.strip() + #if not $line or $line.startswith('#'): + #continue + #end if + #set items = $line.split('\t') + #if $items[0] in $window_positions_by_chroms: + #set tup = $window_positions_by_chroms[$items[0]] + #set $tup[1] += 1 + #set $window_positions_by_chroms[$items[0]] = $tup + #else: + #set $window_positions_by_chroms[$items[0]] = [$count, $count+1] + #end if + #end for + #for chrom, tup in $window_positions_by_chroms.items(): && ideas '$prep_output_config' - $ideas_options + '$specify_genomic_window_cond.bed_input' + $hp + -inv $tup[0] $tup[1] + #if str($log2) != "0.0": + -log2 $log2 + #end if + #if str($max_states) != "0.0": + -G $max_states + #end if + #if str($initial_states) != "0": + -C $initial_states + #end if + #if str($max_position_classes) != "0": + -P $max_position_classes + #end if + #if str($max_cell_type_clusters) != "0": + -K $max_cell_type_clusters + #end if + #if str($prior_concentration) != "0.0": + -A $prior_concentration + #end if + -sample $burnin_num $mcmc_num + #if str($minerr) != "0.0": + -minerr $minerr + #end if + #if str($maxerr) != "0.0": + -maxerr $maxerr + #end if + -rseed $rseed + -thread \${GALAXY_SLOTS:-4} + -o '$project_name.$chrom' + #if str($save_ideas_log) == "yes": + >> $output_log + #else: + > /dev/null + #end if #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' + $tmp_dir/*.bed + $hp + #if str($log2) != "0.0": + -log2 $log2 + #end if + #if str($max_states) != "0.0": + -G $max_states + #end if + #if str($initial_states) != "0": + -C $initial_states + #end if + #if str($max_position_classes) != "0": + -P $max_position_classes + #end if + #if str($max_cell_type_clusters) != "0": + -K $max_cell_type_clusters + #end if + #if str($prior_concentration) != "0.0": + -A $prior_concentration + #end if + -sample $burnin_num $mcmc_num + #if str($minerr) != "0.0": + -minerr $minerr + #end if + #if str($maxerr) != "0.0": + -maxerr $maxerr + #end if + -rseed $rseed + -thread \${GALAXY_SLOTS:-4} -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 +&& 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' ]]></command> <configfiles> - <configfile name="categorize_window_positions_by_chrom"><![CDATA[#with #open($specify_genomic_window_cond.bed_input, 'r') as fh: - #for count, line in enumerate($fh): - $line = $line.strip() - #if not $line or $line.startswith('#'): - #continue - items = $line.split('\t') - chrom = $items[0] - #if $chrom in $chroms: - tup = $chroms[$chrom] - $tup[1] += 1 - $chroms[$chrom] = $tup - else: - $chroms[$chrom] = [$count, $count+1]]]></configfile> <configfile name="gen_prep_input_config"><![CDATA[#if str($cell_type_epigenetic_factor_cond.cell_type_epigenetic_factor) == "extract": #set input_name_positions = $cell_type_epigenetic_factor_cond.input_name_positions #for $i in $cell_type_epigenetic_factor_cond.input: @@ -119,39 +181,6 @@ ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} #end for #end if]]></configfile> - <configfile name="ideas_options"><![CDATA[#if str($specify_genomic_window) == "yes": - '$specify_genomic_window_cond.bed_input' -#else: - $tmp_dir/*.bed -#end if -$hp -#if str($log2) != "0.0": - -log2 $log2 -#end if -#if str($max_states) != "0.0": - -G $max_states -#end if -#if str($initial_states) != "0": - -C $initial_states -#end if -#if str($max_position_classes) != "0": - -P $max_position_classes -#end if -#if str($max_cell_type_clusters) != "0": - -K $max_cell_type_clusters -#end if -#if str($prior_concentration) != "0.0": - -A $prior_concentration -#end if --sample $burnin_num $mcmc_num -#if str($minerr) != "0.0": - -minerr $minerr -#end if -#if str($maxerr) != "0.0": - -maxerr $maxerr -#end if --rseed $rseed --thread \${GALAXY_SLOTS:-4}]]></configfile> </configfiles> <inputs> <conditional name="cell_type_epigenetic_factor_cond"> @@ -368,4 +397,4 @@ <citations> <citation type="doi">10.1093/nar/gkw278</citation> </citations> -</tool> +</tool> \ No newline at end of file