annotate pima_report.xml @ 2:9cb62054a87a draft

Uploaded
author greg
date Thu, 09 Mar 2023 16:26:29 +0000
parents 67d0939b56b0
children 33d9832420c5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
1 <tool id="pima_report" name="PIMA: summary report" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
0a558f444c98 Uploaded
greg
parents:
diff changeset
2 <description></description>
0a558f444c98 Uploaded
greg
parents:
diff changeset
3 <macros>
0a558f444c98 Uploaded
greg
parents:
diff changeset
4 <import>macros.xml</import>
0a558f444c98 Uploaded
greg
parents:
diff changeset
5 </macros>
0a558f444c98 Uploaded
greg
parents:
diff changeset
6 <expand macro="requirements"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
7 <command detect_errors="exit_code"><![CDATA[
0a558f444c98 Uploaded
greg
parents:
diff changeset
8 #import re
0a558f444c98 Uploaded
greg
parents:
diff changeset
9
0a558f444c98 Uploaded
greg
parents:
diff changeset
10 #set analysis_name = re.sub('[^\s\w\-]', '_', str($illumina_fastq_file.element_identifier))
0a558f444c98 Uploaded
greg
parents:
diff changeset
11 #set assembly_name = re.sub('[^\s\w\-]', '_', str($assembly_fasta_file.element_identifier))
2
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
12
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
13 #if str($blastn_file) not in ['None', '']:
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
14 #set blastn_version = re.sub('[^\s\w\-]', '_', str($blastn_file.element_identifier))
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
15 #end if
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
16 #set dnadiff_version = re.sub('[^\s\w\-]', '_', str($dnadiff_snps_file.element_identifier))
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
17 #set dnadiff_version = $dnadiff_version.rstrip('(snps)')
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
18 #if str($flye_assembly_info_file) not in ['None', '']:
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
19 #set flye_version = re.sub('[^\s\w\-]', '_', str($flye_assembly_info_file.element_identifier))
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
20 #set flye_version = $flye_version.rstrip('(assembly info)')
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
21 #end if
2
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
22 #if str($kraken2_report_file) not in ['None', '']:
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
23 #set kraken2_version = re.sub('[^\s\w\-]', '_', str($kraken2_report_file.element_identifier))
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
24 #set kraken2_version = $kraken2_version.rstrip('(report)')
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
25 #end if
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
26
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
27 mkdir amr_matrix_png_dir &&
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
28 mkdir feature_bed_dir &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
29 mkdir feature_png_dir &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
30 mkdir mutation_regions_dir &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
31 touch 'pima_report.pdf' &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
32
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
33 #for $i in $amr_matrices_png:
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
34 #set file_name = $i.file_name
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
35 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
36 ln -s $i 'amr_matrix_png_dir/$identifier' &&
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
37 #end for
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
38 #for $i in $features_bed:
0a558f444c98 Uploaded
greg
parents:
diff changeset
39 #set file_name = $i.file_name
0a558f444c98 Uploaded
greg
parents:
diff changeset
40 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
0a558f444c98 Uploaded
greg
parents:
diff changeset
41 ln -s $i 'feature_bed_dir/$identifier' &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
42 #end for
0a558f444c98 Uploaded
greg
parents:
diff changeset
43 #for $i in $features_png:
0a558f444c98 Uploaded
greg
parents:
diff changeset
44 #set file_name = $i.file_name
0a558f444c98 Uploaded
greg
parents:
diff changeset
45 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
0a558f444c98 Uploaded
greg
parents:
diff changeset
46 ln -s $i 'feature_png_dir/$identifier' &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
47 #end for
0a558f444c98 Uploaded
greg
parents:
diff changeset
48 #for $i in $mutation_regions:
0a558f444c98 Uploaded
greg
parents:
diff changeset
49 #set file_name = $i.file_name
0a558f444c98 Uploaded
greg
parents:
diff changeset
50 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
0a558f444c98 Uploaded
greg
parents:
diff changeset
51 ln -s $i 'mutation_regions_dir/$identifier' &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
52 #end for
0a558f444c98 Uploaded
greg
parents:
diff changeset
53
0a558f444c98 Uploaded
greg
parents:
diff changeset
54 python '${__tool_directory__}/pima_report.py'
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
55 --amr_matrix_png_dir 'amr_matrix_png_dir'
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
56 --amr_deletions_file '$amr_deletions_file'
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
57 --analysis_name '$analysis_name'
0a558f444c98 Uploaded
greg
parents:
diff changeset
58 --assembly_fasta_file '$assembly_fasta_file'
0a558f444c98 Uploaded
greg
parents:
diff changeset
59 --assembly_name '$assembly_name'
2
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
60 #if str($blastn_file) not in ['None', '']:
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
61 --blastn_version '$blastn_version'
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
62 #end if
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
63 --compute_sequence_length_file '$compute_sequence_length_file'
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
64 --contig_coverage_file '$contig_coverage_file'
0a558f444c98 Uploaded
greg
parents:
diff changeset
65 --dbkey '$aligned_sample.metadata.dbkey'
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
66 --dnadiff_snps_file '$dnadiff_snps_file'
2
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
67 --dnadiff_version '$dnadiff_version'
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
68 --feature_bed_dir 'feature_bed_dir'
0a558f444c98 Uploaded
greg
parents:
diff changeset
69 --feature_png_dir 'feature_png_dir'
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
70 #if str($flye_assembly_info_file) not in ['None', '']:
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
71 --flye_assembly_info_file '$flye_assembly_info_file'
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
72 --flye_version '$flye_version'
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
73 #end if
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
74 --genome_insertions_file '$genome_insertions_file'
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
75 #if $illumina_fastq_file.ext.endswith(".gz"):
0a558f444c98 Uploaded
greg
parents:
diff changeset
76 --gzipped
0a558f444c98 Uploaded
greg
parents:
diff changeset
77 #end if
0a558f444c98 Uploaded
greg
parents:
diff changeset
78 --illumina_fastq_file '$illumina_fastq_file'
2
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
79 #if str($kraken2_report_file) not in ['None', '']:
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
80 --kraken2_report_file '$kraken2_report_file'
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
81 --kraken2_version '$kraken2_version'
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
82 #end if
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
83 --mutation_regions_dir 'mutation_regions_dir'
0a558f444c98 Uploaded
greg
parents:
diff changeset
84 --mutation_regions_bed_file '$mutation_regions_bed_file'
0a558f444c98 Uploaded
greg
parents:
diff changeset
85 --pima_css '${__tool_directory__}/pima.css'
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
86 --plasmids_file '$plasmids_file'
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
87 --reference_insertions_file '$reference_insertions_file'
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
88 && mv 'pima_report.pdf' '$output'
0a558f444c98 Uploaded
greg
parents:
diff changeset
89 ]]></command>
0a558f444c98 Uploaded
greg
parents:
diff changeset
90 <inputs>
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
91 <param name="amr_matrices_png" format="png" type="data_collection" collection_type="list" label="Collection of AMR matrix PNG files"/>
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
92 <param name="aligned_sample" type="data" format="bam" label="Aligned sample BAM file"/>
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
93 <param name="amr_deletions_file" type="data" format="bed" label="AMR deletions BED file"/>
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
94 <param name="assembly_fasta_file" type="data" format="fasta" label="Assembly FASTA file"/>
2
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
95 <param name="blastn_file" type="data" format="bam" label="Blastn BAM file"/>
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
96 <param name="compute_sequence_length_file" type="data" format="tabular,tsv" label="Compute sequence length tabular file"/>
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
97 <param name="contig_coverage_file" type="data" format="tabular,tsv" label="Contig coverage tabular file"/>
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
98 <param name="dnadiff_snps_file" type="data" format="tabular" label="DNAdiff snps tabular file"/>
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
99 <param name="features_bed" format="bed" type="data_collection" collection_type="list" label="Collection of best feature hits BED files"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
100 <param name="features_png" format="png" type="data_collection" collection_type="list" label="Collection of best feature hits PNG files"/>
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
101 <param name="flye_assembly_info_file" type="data" format="tabular,tsv" optional="true" label="Flye assembly info tabular file" help="Optional, ignored if not selected"/>
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
102 <param name="genome_insertions_file" type="data" format="bed" label="Genome insertions BED file"/>
2
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
103 <param name="kraken2_report_file" type="data" format="tabular,tsv" optional="true" label="Kraken2 report tabular file" help="Optional, ignored if not selected"/>
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
104 <param name="illumina_fastq_file" type="data" format="fastqsanger,fastqsanger.gz" label="Fastq sample file"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
105 <param name="mutation_regions" format="tabular,tsv" type="data_collection" collection_type="list" label="Collection of mutation regions tabular files"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
106 <param name="mutation_regions_bed_file" type="data" format="mutations_regions,bed" label="Mutation regions BED file"/>
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
107 <param name="reference_insertions_file" type="data" format="bed" label="Reference insertions BED file"/>
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
108 <param name="plasmids_file" type="data" format="tsv" label="pChunks plasmids TSV file"/>
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
109 </inputs>
0a558f444c98 Uploaded
greg
parents:
diff changeset
110 <outputs>
0a558f444c98 Uploaded
greg
parents:
diff changeset
111 <data name="output" format="pdf"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
112 </outputs>
0a558f444c98 Uploaded
greg
parents:
diff changeset
113 <tests>
0a558f444c98 Uploaded
greg
parents:
diff changeset
114 <test>
0a558f444c98 Uploaded
greg
parents:
diff changeset
115 <param name="aligned_sample" value="aligned_sample.bam" ftype="bam"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
116 <param name="assembly_fasta_file" value="assembly_fasta.fasta" ftype="fasta"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
117 <param name="contig_coverage_file" value="contig_coverage.tabular" ftype="tabular"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
118 <param name="illumina_fastq_file" value="illumina_fastq.fastq" ftype="fastq"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
119 <output name="output" value="output.pdf" ftype="pdf"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
120 </test>
0a558f444c98 Uploaded
greg
parents:
diff changeset
121 </tests>
0a558f444c98 Uploaded
greg
parents:
diff changeset
122 <help>
0a558f444c98 Uploaded
greg
parents:
diff changeset
123 **What it does**
0a558f444c98 Uploaded
greg
parents:
diff changeset
124
0a558f444c98 Uploaded
greg
parents:
diff changeset
125 Generates the PIMA analysis summary report.
0a558f444c98 Uploaded
greg
parents:
diff changeset
126 </help>
0a558f444c98 Uploaded
greg
parents:
diff changeset
127 <expand macro="citations"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
128 </tool>
0a558f444c98 Uploaded
greg
parents:
diff changeset
129