Mercurial > repos > greg > pima_report
diff pima_report.xml @ 0:0a558f444c98 draft
Uploaded
author | greg |
---|---|
date | Fri, 03 Mar 2023 22:06:23 +0000 |
parents | |
children | 67d0939b56b0 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pima_report.xml Fri Mar 03 22:06:23 2023 +0000 @@ -0,0 +1,80 @@ +<tool id="pima_report" name="PIMA: summary report" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> + <description></description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements"/> + <command detect_errors="exit_code"><![CDATA[ +#import re + +#set analysis_name = re.sub('[^\s\w\-]', '_', str($illumina_fastq_file.element_identifier)) +#set assembly_name = re.sub('[^\s\w\-]', '_', str($assembly_fasta_file.element_identifier)) + +mkdir feature_bed_dir && +mkdir feature_png_dir && +mkdir mutation_regions_dir && +touch 'pima_report.pdf' && + +#for $i in $features_bed: + #set file_name = $i.file_name + #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier)) + ln -s $i 'feature_bed_dir/$identifier' && +#end for +#for $i in $features_png: + #set file_name = $i.file_name + #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier)) + ln -s $i 'feature_png_dir/$identifier' && +#end for +#for $i in $mutation_regions: + #set file_name = $i.file_name + #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier)) + ln -s $i 'mutation_regions_dir/$identifier' && +#end for + +python '${__tool_directory__}/pima_report.py' +--analysis_name '$analysis_name' +--assembly_fasta_file '$assembly_fasta_file' +--assembly_name '$assembly_name' +--contig_coverage_file '$contig_coverage_file' +--dbkey '$aligned_sample.metadata.dbkey' +--feature_bed_dir 'feature_bed_dir' +--feature_png_dir 'feature_png_dir' +#if $illumina_fastq_file.ext.endswith(".gz"): + --gzipped +#end if +--illumina_fastq_file '$illumina_fastq_file' +--mutation_regions_dir 'mutation_regions_dir' +--mutation_regions_bed_file '$mutation_regions_bed_file' +--pima_css '${__tool_directory__}/pima.css' +&& mv 'pima_report.pdf' '$output' + ]]></command> + <inputs> + <param name="aligned_sample" type="data" format="bam" label="Aligned sample BAM file"/> + <param name="assembly_fasta_file" type="data" format="fasta" label="Assembly FASTA file"/> + <param name="features_bed" format="bed" type="data_collection" collection_type="list" label="Collection of best feature hits BED files"/> + <param name="features_png" format="png" type="data_collection" collection_type="list" label="Collection of best feature hits PNG files"/> + <param name="contig_coverage_file" type="data" format="tabular,tsv" label="Contig coverage tabular file"/> + <param name="illumina_fastq_file" type="data" format="fastqsanger,fastqsanger.gz" label="Fastq sample file"/> + <param name="mutation_regions" format="tabular,tsv" type="data_collection" collection_type="list" label="Collection of mutation regions tabular files"/> + <param name="mutation_regions_bed_file" type="data" format="mutations_regions,bed" label="Mutation regions BED file"/> + </inputs> + <outputs> + <data name="output" format="pdf"/> + </outputs> + <tests> + <test> + <param name="aligned_sample" value="aligned_sample.bam" ftype="bam"/> + <param name="assembly_fasta_file" value="assembly_fasta.fasta" ftype="fasta"/> + <param name="contig_coverage_file" value="contig_coverage.tabular" ftype="tabular"/> + <param name="illumina_fastq_file" value="illumina_fastq.fastq" ftype="fastq"/> + <output name="output" value="output.pdf" ftype="pdf"/> + </test> + </tests> + <help> +**What it does** + +Generates the PIMA analysis summary report. + </help> + <expand macro="citations"/> +</tool> +