Mercurial > repos > greg > ideas_preprocessor
changeset 4:f577a83e86c4 draft
Uploaded
author | greg |
---|---|
date | Wed, 24 Jan 2018 08:29:58 -0500 |
parents | e97851e8951b |
children | 2b4e1bd725f7 |
files | ideas_preprocessor.xml |
diffstat | 1 files changed, 25 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/ideas_preprocessor.xml Tue Jan 23 10:48:38 2018 -0500 +++ b/ideas_preprocessor.xml Wed Jan 24 08:29:58 2018 -0500 @@ -9,40 +9,40 @@ </requirements> <command detect_errors="exit_code"><![CDATA[ #set tmp_dir = "tmp" -#set prep_input_config = "prep_input_config.txt" -#set prep_output_config = "prep_output_config.txt" -#set specify_genomic_window = $specify_genomic_window_cond.specify_genomic_window +#set ideaspre_input_config = "ideaspre_input_config.txt" +#set ideas_input_config = "IDEAS_input_config.txt" +#set specify_chrom_window = $specify_chrom_window_cond.specify_chrom_window mkdir $tmp_dir && mkdir $output.files_path && -#if str($specify_genomic_window) == "yes": +#if str($specify_chrom_window) == "yes": ############################################## ## Using a genomic window bed file, so categorize ## the window positions by chromosome to enable ## the IDEAS -inv option. ############################################## - #set windows_positions_by_chroms_config = "windows_positions_by_chroms_config.txt" - cp '$gen_windows_positions_by_chroms_config' $windows_positions_by_chroms_config && + #set chromosome_windows = "chromosome_windows.txt" + cp '$gen_chromosome_windows' $chromosome_windows && #end if ############################################## ## Create the config file and prepare the data ############################################## -cp '$gen_prep_input_config' $prep_input_config && -sort $prep_input_config -o $prep_input_config && +cp '$gen_ideaspre_input_config' $ideaspre_input_config && +sort $ideaspre_input_config -o $ideaspre_input_config && Rscript '$__tool_directory__/ideas_preprocessor.R' ---prep_input_config '$prep_input_config' -#if str($specify_genomic_window) == "yes": - --prep_output_config '$prep_output_config' - --windows_positions_by_chroms_config '$windows_positions_by_chroms_config' +--ideaspre_input_config '$ideaspre_input_config' +#if str($specify_chrom_window) == "yes": + --ideas_input_config '$ideas_input_config' + --chromosome_windows '$chromosome_windows' #end if -#if str($specify_genomic_window) == "yes": - --bed_input '$specify_genomic_window_cond.bed_input' +#if str($specify_chrom_window) == "yes": + --chrom_bed_input '$specify_chrom_window_cond.chrom_bed_input' #else: --chrom_len_file '$chromInfo' - --window_size $specify_genomic_window_cond.window_size - #set restrict_chromosomes = $specify_genomic_window_cond.restrict_chromosomes_cond.restrict_chromosomes + --window_size $specify_chrom_window_cond.window_size + #set restrict_chromosomes = $specify_chrom_window_cond.restrict_chromosomes_cond.restrict_chromosomes #if str($restrict_chromosomes) == "yes": #set chroms = [] - #set chrom_repeat = $specify_genomic_window_cond.restrict_chromosomes_cond.chrom_repeat + #set chrom_repeat = $specify_chrom_window_cond.restrict_chromosomes_cond.chrom_repeat #for $i in $chrom_repeat.chrom $chroms.append($i) #end for @@ -54,6 +54,7 @@ --exclude_input '$exclude_input' #end if --output '$output' +--output_hid $output.hid --output_files_path '$output.files_path' &> ideas_preprocessor_log.txt; if [[ $? -ne 0 ]]; then @@ -62,7 +63,7 @@ fi ]]></command> <configfiles> - <configfile name="gen_prep_input_config"><![CDATA[#if str($cell_type_epigenetic_factor_cond.cell_type_epigenetic_factor) == "extract": + <configfile name="gen_ideaspre_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: #set file_name_with_ext = $i.name @@ -85,10 +86,10 @@ ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} ${file_name} ${input_items.input.ext} #end for #end if]]></configfile> - <configfile name="gen_windows_positions_by_chroms_config"><![CDATA[#if str($specify_genomic_window_cond.specify_genomic_window) == "yes": + <configfile name="gen_chromosome_windows"><![CDATA[#if str($specify_chrom_window_cond.specify_chrom_window) == "yes": #import collections #set window_positions_by_chroms_odict = $collections.OrderedDict() - #for count, line in enumerate(open($specify_genomic_window_cond.bed_input.file_name, 'r')): + #for count, line in enumerate(open($specify_chrom_window_cond.chrom_bed_input.file_name, 'r')): #set $line = $line.strip() #if not $line or $line.startswith('#'): #continue @@ -138,8 +139,8 @@ </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"> + <conditional name="specify_chrom_window_cond"> + <param name="specify_chrom_window" type="select" label="Specify window positions using a bed file?"> <option value="no" selected="true">No</option> <option value="yes">Yes</option> </param> @@ -159,7 +160,7 @@ </conditional> </when> <when value="yes"> - <param name="bed_input" type="data" format="bed" label="Bed file specifying the genomic windows"/> + <param name="chrom_bed_input" type="data" format="bed" label="Bed file specifying the window positions"/> </when> </conditional> <param argument="--bychr" type="boolean" truevalue="true" falsevalue="" checked="False" label="Output chromosomes in separate files"/> @@ -171,7 +172,7 @@ <param argument="--standardize_datasets" type="boolean" truevalue="true" falsevalue="" checked="False" label="Standardize all datasets"/> </inputs> <outputs> - <data name="output" format="html"/> + <data name="output" format="ideaspre"/> </outputs> <tests> <test>