Mercurial > repos > greg > ideas_preprocessor
comparison ideas_preprocessor.xml @ 11:26eb979cf8d9 draft
Uploaded
| author | greg |
|---|---|
| date | Wed, 24 Jan 2018 13:47:16 -0500 |
| parents | 860b59cae5df |
| children | 4d542da396a7 |
comparison
equal
deleted
inserted
replaced
| 10:f45e461b0557 | 11:26eb979cf8d9 |
|---|---|
| 6 <requirement type="package" version="1.4.4">r-optparse</requirement> | 6 <requirement type="package" version="1.4.4">r-optparse</requirement> |
| 7 <requirement type="package" version="1.6">samtools</requirement> | 7 <requirement type="package" version="1.6">samtools</requirement> |
| 8 <requirement type="package" version="357">ucsc-bigwigaverageoverbed</requirement> | 8 <requirement type="package" version="357">ucsc-bigwigaverageoverbed</requirement> |
| 9 </requirements> | 9 </requirements> |
| 10 <command detect_errors="exit_code"><![CDATA[ | 10 <command detect_errors="exit_code"><![CDATA[ |
| 11 #set chromosome_windows = "chromosome_windows.txt" | |
| 12 #set ideaspre_input_config = "ideaspre_input_config.txt" | |
| 13 #set specify_chrom_windows = $specify_chrom_windows_cond.specify_chrom_windows | |
| 11 #set tmp_dir = "tmp" | 14 #set tmp_dir = "tmp" |
| 12 #set ideaspre_input_config = "ideaspre_input_config.txt" | |
| 13 #set ideas_input_config = "IDEAS_input_config.txt" | |
| 14 #set specify_genomic_window = $specify_genomic_window_cond.specify_genomic_window | |
| 15 mkdir $tmp_dir && | 15 mkdir $tmp_dir && |
| 16 mkdir $output.files_path && | 16 mkdir $output.files_path && |
| 17 #if str($specify_genomic_window) == "yes": | 17 #if str($specify_chrom_windows) == "yes": |
| 18 ############################################## | 18 ############################################## |
| 19 ## Using a genomic window bed file, so categorize | 19 ## Using a bed file for defining chrom windows, |
| 20 ## the window positions by chromosome to enable | 20 ## so categorize the window positions by |
| 21 ## the IDEAS -inv option. | 21 ## chromosome to enable the IDEAS -inv option. |
| 22 ############################################## | 22 ############################################## |
| 23 #set chromosome_windows = "chromosome_windows.txt" | |
| 24 cp '$gen_chromosome_windows' $chromosome_windows && | 23 cp '$gen_chromosome_windows' $chromosome_windows && |
| 25 #end if | 24 #end if |
| 26 ############################################## | 25 ############################################## |
| 27 ## Create the config file and prepare the data | 26 ## Create the config file and prepare the data |
| 28 ############################################## | 27 ############################################## |
| 29 cp '$gen_ideaspre_input_config' $ideaspre_input_config && | 28 cp '$gen_ideaspre_input_config' $ideaspre_input_config && |
| 30 sort $ideaspre_input_config -o $ideaspre_input_config && | 29 sort $ideaspre_input_config -o $ideaspre_input_config && |
| 31 Rscript '$__tool_directory__/ideas_preprocessor.R' | 30 Rscript '$__tool_directory__/ideas_preprocessor.R' |
| 32 --ideaspre_input_config '$ideaspre_input_config' | 31 --ideaspre_input_config '$ideaspre_input_config' |
| 33 #if str($specify_genomic_window) == "yes": | 32 #if str($specify_chrom_windows) == "yes": |
| 34 --ideas_input_config '$ideas_input_config' | |
| 35 --chromosome_windows '$chromosome_windows' | 33 --chromosome_windows '$chromosome_windows' |
| 36 #end if | 34 --chrom_bed_input '$specify_chrom_windows_cond.chrom_bed_input' |
| 37 #if str($specify_genomic_window) == "yes": | |
| 38 --bed_input '$specify_genomic_window_cond.bed_input' | |
| 39 #else: | 35 #else: |
| 40 --chrom_len_file '$chromInfo' | 36 --chrom_len_file '$chromInfo' |
| 41 --window_size $specify_genomic_window_cond.window_size | 37 --window_size $specify_chrom_windows_cond.window_size |
| 42 #set restrict_chromosomes = $specify_genomic_window_cond.restrict_chromosomes_cond.restrict_chromosomes | 38 #set restrict_chromosomes = $specify_chrom_windows_cond.restrict_chromosomes_cond.restrict_chromosomes |
| 43 #if str($restrict_chromosomes) == "yes": | 39 #if str($restrict_chromosomes) == "yes": |
| 44 #set chroms = [] | 40 #set chroms = [] |
| 45 #set chrom_repeat = $specify_genomic_window_cond.restrict_chromosomes_cond.chrom_repeat | 41 #set chrom_repeat = $specify_chrom_windows_cond.restrict_chromosomes_cond.chrom_repeat |
| 46 #for $i in $chrom_repeat.chrom | 42 #for $i in $chrom_repeat.chrom |
| 47 $chroms.append($i) | 43 $chroms.append($i) |
| 48 #end for | 44 #end for |
| 49 --restrict_to_chroms ",".join(chroms) | 45 --restrict_to_chroms ",".join(chroms) |
| 50 #end if | 46 #end if |
| 57 --output_hid $output.hid | 53 --output_hid $output.hid |
| 58 --output_files_path '$output.files_path' | 54 --output_files_path '$output.files_path' |
| 59 &> ideas_preprocessor_log.txt; | 55 &> ideas_preprocessor_log.txt; |
| 60 if [[ $? -ne 0 ]]; then | 56 if [[ $? -ne 0 ]]; then |
| 61 cp ideas_preprocessor_log.txt '$output'; | 57 cp ideas_preprocessor_log.txt '$output'; |
| 62 exit 1; | 58 exit 1; |
| 63 fi | 59 fi |
| 64 ]]></command> | 60 ]]></command> |
| 65 <configfiles> | 61 <configfiles> |
| 66 <configfile name="gen_ideaspre_input_config"><![CDATA[#if str($cell_type_epigenetic_factor_cond.cell_type_epigenetic_factor) == "extract": | 62 <configfile name="gen_ideaspre_input_config"><![CDATA[#if str($cell_type_epigenetic_factor_cond.cell_type_epigenetic_factor) == "extract": |
| 67 #set input_name_positions = $cell_type_epigenetic_factor_cond.input_name_positions | 63 #set input_name_positions = $cell_type_epigenetic_factor_cond.input_name_positions |
| 84 #else: | 80 #else: |
| 85 #for $input_items in $cell_type_epigenetic_factor_cond.input_repeat: | 81 #for $input_items in $cell_type_epigenetic_factor_cond.input_repeat: |
| 86 ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} ${file_name} ${input_items.input.ext} | 82 ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} ${file_name} ${input_items.input.ext} |
| 87 #end for | 83 #end for |
| 88 #end if]]></configfile> | 84 #end if]]></configfile> |
| 89 <configfile name="gen_chromosome_windows"><