Mercurial > repos > greg > ideas
changeset 48:c9c90bfbeb20 draft
Uploaded
author | greg |
---|---|
date | Wed, 23 Aug 2017 14:07:10 -0400 |
parents | 3a4697f71a05 |
children | af8bf2b76697 |
files | ideas.xml |
diffstat | 1 files changed, 57 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/ideas.xml Wed Aug 23 09:20:45 2017 -0400 +++ b/ideas.xml Wed Aug 23 14:07:10 2017 -0400 @@ -19,10 +19,15 @@ ## Create the config file and prepare the data ############################################## #set input_type = $input_type_cond.input_type -cp '$prep_input_config' 'prep_input_config.txt' && prepMat #if str($input_type) == 'datasets': - '$prep_input_config' + #set cell_type_epigenetic_factor_cond = $input_type_cond.cell_type_epigenetic_factor_cond + #set cell_type_epigenetic_factor = $cell_type_epigenetic_factor_cond.cell_type_epigenetic_factor + #if str($cell_type_epigenetic_factor) == 'extract': + '$extract_prep_input_config' + #else: + '$manual_prep_input_config' + #end if #set specify_genomic_window_cond = $input_type_cond.specify_genomic_window_cond #set specify_genomic_window = $specify_genomic_window_cond.specify_genomic_window #if str($specify_genomic_window) == 'yes': @@ -51,7 +56,7 @@ ## Coerce the prepMat config output to the ## format expected by the R matrix builder. ############################################## -&& cut -d' ' $prep_input_config -f1,2 > file1.txt +&& cut -d' ' $manual_prep_input_config -f1,2 > file1.txt && ls tmp/*.bed.gz > file2.txt && paste <(cat file1.txt) <(cat file2.txt) > $prep_output_config ############################################## @@ -111,9 +116,27 @@ && mv ./*.state $output_state ]]></command> <configfiles> - <configfile name="prep_input_config"><![CDATA[#for $input_items in $input_type_cond.input_repeat: + <configfile name="manual_prep_input_config"><![CDATA[ +#for $input_items in $input_type_cond.input_repeat: ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} -#end for ]]></configfile> +#end for]]></configfile> + <configfile name="extract_prep_input_config"><![CDATA[ +#!/bin/bash +#set $cell_type_epigenetic_factor_cond=$input_type_cond.cell_type_epigenetic_factor_cond +#set $input_name_positions=$cell_type_epigenetic_factor_cond.input_name_positions +#for $i in $cell_type_epigenetic_factor_cond.input: + #set $file_path=$i.file_path + #set $file_name_with_ext="${file_path##*/}" + #set $file_name="${file_name_with_ext%%.*}" + #if $input_name_positions == "cell_first": + #set $cell_type_name="${file_name%-*}" + #set $epigenetic_factor_name="${file_name#*-}" + #else: + #set $cell_type_name="${file_name#*-}" + #set $epigenetic_factor_name="${file_name%-*}" + #end if +${cell_type_name} ${epigenetic_factor_name} ${i} +#end for]]></configfile> </configfiles> <inputs> <conditional name="input_type_cond"> @@ -122,18 +145,36 @@ <option value="data_matrix">Data matrix</option> </param> <when value="datasets"> - <repeat name="input_repeat" title="Cell type, Epigenetic factor and Input" min="1"> - <param name="cell_type_name" type="text" value="" label="Cell type name"> - <validator type="empty_field"/> + <conditional name="cell_type_epigenetic_factor_cond"> + <param name="cell_type_epigenetic_factor" type="select" label="Set cell type and epigenetic factor names by"> + <option value="extract" selected="true">extracting them from the selected input file names</option> + <option value="manual">manually setting them for each selected input</option> </param> - <param name="epigenetic_factor_name" type="text" value="" label="Epigenetic factor name"> - <validator type="empty_field"/> - </param> - <param name="input" type="data" format="bigwig,bam" label="BAM or BigWig file"> - <validator type="empty_field"/> - <validator type="unspecified_build"/> - </param> - </repeat> + <when value="extract"> + <param name="input" type="data" format="bigwig,bam" multiple="True" label="BAM or BigWig file"> + <validator type="empty_field"/> + <validator type="unspecified_build"/> + </param> + <param name="input_name_positions" type="select" display="radio" label="Selected input file name pattern is" help="A '-' character must separate cell type and epigenetic factor names within the selected input file names"> + <option value="cell_first" selected="true">Cell type name - Epigenetic factor name</option> + <option value="cell_last">Epigenetic factor name - Cell type name</option> + </param> + </when> + <when value="manual"> + <repeat name="input_repeat" title="Cell type, Epigenetic factor and Input" min="1"> + <param name="cell_type_name" type="text" value="" label="Cell type name"> + <validator type="empty_field"/> + </param> + <param name="epigenetic_factor_name" type="text" value="" label="Epigenetic factor name"> + <validator type="empty_field"/> + </param> + <param name="input" type="data" format="bigwig,bam" label="BAM or BigWig file"> + <validator type="empty_field"/> + <validator type="unspecified_build"/> + </param> + </repeat> + </when> + </conditional> <conditional name="specify_genomic_window_cond"> <param name="specify_genomic_window" type="select" label="Select Bed file that defines genomic windows on which to process the data"> <option value="no" selected="true">No</option>