Mercurial > repos > greg > ideas_preprocessor
changeset 2:248b5f72fc02 draft
Uploaded
author | greg |
---|---|
date | Tue, 23 Jan 2018 10:48:31 -0500 |
parents | 91c5dbb14a13 |
children | e97851e8951b |
files | ideas_preprocessor.xml |
diffstat | 1 files changed, 18 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/ideas_preprocessor.xml Mon Jan 22 14:35:28 2018 -0500 +++ b/ideas_preprocessor.xml Tue Jan 23 10:48:31 2018 -0500 @@ -12,18 +12,29 @@ #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 windows_positions_by_chroms_config = "windows_positions_by_chroms_config.txt" +mkdir $tmp_dir && +mkdir $output.files_path && +#if str($specify_genomic_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 && +#end if ############################################## ## Create the config file and prepare the data ############################################## -#set output_dir = $output_txt_dir -#set tmp_dir = "tmp" -mkdir '$output_txt_dir' && cp '$gen_prep_input_config' $prep_input_config && sort $prep_input_config -o $prep_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' +#end if +#if str($specify_genomic_window) == "yes": --bed_input '$specify_genomic_window_cond.bed_input' #else: --chrom_len_file '$chromInfo' @@ -39,7 +50,7 @@ #end if #end if --reads_per_bp $reads_per_bp -#if str($blacklist_input) not in ["None", ""]: +#if str($exclude_input) not in ["None", ""]: --exclude_input '$exclude_input' #end if --output '$output' @@ -49,21 +60,6 @@ cp ideas_preprocessor_log.txt '$output'; exit 1; fi -############################################## -## Coerce the prepMat config output to the -## format expected by IDEAS. -############################################## -&& cut -d' ' $prep_input_config -f1,2 > file1.txt -&& ls $tmp_dir/*.bed.gz > file2.txt -&& paste <(cat file1.txt) <(cat file2.txt) -d' ' > $prep_output_config -#if str($specify_genomic_window) == "yes": - ############################################## - ## Using a genomic window bed file, so categorize - ## the window positions by chromosome to enable - ## the IDEAS -inv option. - ############################################## - && cp '$gen_windows_positions_by_chroms_config' $windows_positions_by_chroms_config -#end if ]]></command> <configfiles> <configfile name="gen_prep_input_config"><![CDATA[#if str($cell_type_epigenetic_factor_cond.cell_type_epigenetic_factor) == "extract": @@ -82,11 +78,11 @@ #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} ${i.filename} ${i.ext} +${cell_type_name} ${epigenetic_factor_name} ${i} ${file_name} ${i.ext} #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} ${input_items.input.filename} ${input_items.input.ext} +${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":