Mercurial > repos > greg > ideas_preprocessor
comparison ideas_preprocessor.xml @ 4:f577a83e86c4 draft
Uploaded
| author | greg |
|---|---|
| date | Wed, 24 Jan 2018 08:29:58 -0500 |
| parents | 248b5f72fc02 |
| children | 6fe65d1379a8 |
comparison
equal
deleted
inserted
replaced
| 3:e97851e8951b | 4:f577a83e86c4 |
|---|---|
| 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 tmp_dir = "tmp" | 11 #set tmp_dir = "tmp" |
| 12 #set prep_input_config = "prep_input_config.txt" | 12 #set ideaspre_input_config = "ideaspre_input_config.txt" |
| 13 #set prep_output_config = "prep_output_config.txt" | 13 #set ideas_input_config = "IDEAS_input_config.txt" |
| 14 #set specify_genomic_window = $specify_genomic_window_cond.specify_genomic_window | 14 #set specify_chrom_window = $specify_chrom_window_cond.specify_chrom_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_window) == "yes": |
| 18 ############################################## | 18 ############################################## |
| 19 ## Using a genomic window bed file, so categorize | 19 ## Using a genomic window bed file, so categorize |
| 20 ## the window positions by chromosome to enable | 20 ## the window positions by chromosome to enable |
| 21 ## the IDEAS -inv option. | 21 ## the IDEAS -inv option. |
| 22 ############################################## | 22 ############################################## |
| 23 #set windows_positions_by_chroms_config = "windows_positions_by_chroms_config.txt" | 23 #set chromosome_windows = "chromosome_windows.txt" |
| 24 cp '$gen_windows_positions_by_chroms_config' $windows_positions_by_chroms_config && | 24 cp '$gen_chromosome_windows' $chromosome_windows && |
| 25 #end if | 25 #end if |
| 26 ############################################## | 26 ############################################## |
| 27 ## Create the config file and prepare the data | 27 ## Create the config file and prepare the data |
| 28 ############################################## | 28 ############################################## |
| 29 cp '$gen_prep_input_config' $prep_input_config && | 29 cp '$gen_ideaspre_input_config' $ideaspre_input_config && |
| 30 sort $prep_input_config -o $prep_input_config && | 30 sort $ideaspre_input_config -o $ideaspre_input_config && |
| 31 Rscript '$__tool_directory__/ideas_preprocessor.R' | 31 Rscript '$__tool_directory__/ideas_preprocessor.R' |
| 32 --prep_input_config '$prep_input_config' | 32 --ideaspre_input_config '$ideaspre_input_config' |
| 33 #if str($specify_genomic_window) == "yes": | 33 #if str($specify_chrom_window) == "yes": |
| 34 --prep_output_config '$prep_output_config' | 34 --ideas_input_config '$ideas_input_config' |
| 35 --windows_positions_by_chroms_config '$windows_positions_by_chroms_config' | 35 --chromosome_windows '$chromosome_windows' |
| 36 #end if | 36 #end if |
| 37 #if str($specify_genomic_window) == "yes": | 37 #if str($specify_chrom_window) == "yes": |
| 38 --bed_input '$specify_genomic_window_cond.bed_input' | 38 --chrom_bed_input '$specify_chrom_window_cond.chrom_bed_input' |
| 39 #else: | 39 #else: |
| 40 --chrom_len_file '$chromInfo' | 40 --chrom_len_file '$chromInfo' |
| 41 --window_size $specify_genomic_window_cond.window_size | 41 --window_size $specify_chrom_window_cond.window_size |
| 42 #set restrict_chromosomes = $specify_genomic_window_cond.restrict_chromosomes_cond.restrict_chromosomes | 42 #set restrict_chromosomes = $specify_chrom_window_cond.restrict_chromosomes_cond.restrict_chromosomes |
| 43 #if str($restrict_chromosomes) == "yes": | 43 #if str($restrict_chromosomes) == "yes": |
| 44 #set chroms = [] | 44 #set chroms = [] |
| 45 #set chrom_repeat = $specify_genomic_window_cond.restrict_chromosomes_cond.chrom_repeat | 45 #set chrom_repeat = $specify_chrom_window_cond.restrict_chromosomes_cond.chrom_repeat |
| 46 #for $i in $chrom_repeat.chrom | 46 #for $i in $chrom_repeat.chrom |
| 47 $chroms.append($i) | 47 $chroms.append($i) |
| 48 #end for | 48 #end for |
| 49 --restrict_to_chroms ",".join(chroms) | 49 --restrict_to_chroms ",".join(chroms) |
| 50 #end if | 50 #end if |
| 52 --reads_per_bp $reads_per_bp | 52 --reads_per_bp $reads_per_bp |
| 53 #if str($exclude_input) not in ["None", ""]: | 53 #if str($exclude_input) not in ["None", ""]: |
| 54 --exclude_input '$exclude_input' | 54 --exclude_input '$exclude_input' |
| 55 #end if | 55 #end if |
| 56 --output '$output' | 56 --output '$output' |
| 57 --output_hid $output.hid | |
| 57 --output_files_path '$output.files_path' | 58 --output_files_path '$output.files_path' |
| 58 &> ideas_preprocessor_log.txt; | 59 &> ideas_preprocessor_log.txt; |
| 59 if [[ $? -ne 0 ]]; then | 60 if [[ $? -ne 0 ]]; then |
| 60 cp ideas_preprocessor_log.txt '$output'; | 61 cp ideas_preprocessor_log.txt '$output'; |
| 61 exit 1; | 62 exit 1; |
| 62 fi | 63 fi |
| 63 ]]></command> | 64 ]]></command> |
| 64 <configfiles> | 65 <configfiles> |
| 65 <configfile name="gen_prep_input_config"><![CDATA[#if str($cell_type_epigenetic_factor_cond.cell_type_epigenetic_factor) == "extract": | 66 <configfile name="gen_ideaspre_input_config"><![CDATA[#if str($cell_type_epigenetic_factor_cond.cell_type_epigenetic_factor) == "extract": |
| 66 #set input_name_positions = $cell_type_epigenetic_factor_cond.input_name_positions | 67 #set input_name_positions = $cell_type_epigenetic_factor_cond.input_name_positions |
| 67 #for $i in $cell_type_epigenetic_factor_cond.input: | 68 #for $i in $cell_type_epigenetic_factor_cond.input: |
| 68 #set file_name_with_ext = $i.name | 69 #set file_name_with_ext = $i.name |
| 69 #if str($file_name_with_ext).find("http") >= 0 or str($file_name_with_ext).find("ftp") >= 0: | 70 #if str($file_name_with_ext).find("http") >= 0 or str($file_name_with_ext).find("ftp") >= 0: |
| 70 #set file_name_with_ext = $file_name_with_ext.split('/')[-1] | 71 #set file_name_with_ext = $file_name_with_ext.split('/')[-1] |
| 83 #else: | 84 #else: |
| 84 #for $input_items in $cell_type_epigenetic_factor_cond.input_repeat: | 85 #for $input_items in $cell_type_epigenetic_factor_cond.input_repeat: |
| 85 ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} ${file_name} ${input_items.input.ext} | 86 ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} ${file_name} ${input_items.input.ext} |
| 86 #end for | 87 #end for |
| 87 #end if]]></configfile> | 88 #end if]]></configfile> |
| 88 <configfile name="gen_windows_positions_by_chroms_config"><