annotate pima_report.xml @ 21:667b253329c6 draft

Uploaded
author greg
date Thu, 13 Apr 2023 17:13:40 +0000
parents e948214a9e3c
children d89b7d47a85a
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
21
667b253329c6 Uploaded
greg
parents: 18
diff changeset
10 #set analysis_name = re.sub('[^\s\w\-]', '_', str($fastq_file.element_identifier))
0
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
12
99613333fd1f Uploaded
greg
parents: 5
diff changeset
13 #if str($bedtools_complementbed_file) not in ['None', '']:
99613333fd1f Uploaded
greg
parents: 5
diff changeset
14 #set bedtools_version = re.sub('[^\s\w\-]', '_', str($bedtools_complementbed_file.element_identifier))
99613333fd1f Uploaded
greg
parents: 5
diff changeset
15 #end if
99613333fd1f Uploaded
greg
parents: 5
diff changeset
16 #if str($blastn_features) not in ['None', '']:
99613333fd1f Uploaded
greg
parents: 5
diff changeset
17 #set blastn_version = re.sub('[^\s\w\-]', '_', str($blastn_features.element_identifier))
99613333fd1f Uploaded
greg
parents: 5
diff changeset
18 #end if
99613333fd1f Uploaded
greg
parents: 5
diff changeset
19 #if str($dnadiff_snps_file) not in ['None', '']:
99613333fd1f Uploaded
greg
parents: 5
diff changeset
20 #set dnadiff_version = re.sub('[^\s\w\-]', '_', str($dnadiff_snps_file.element_identifier))
99613333fd1f Uploaded
greg
parents: 5
diff changeset
21 #end if
21
667b253329c6 Uploaded
greg
parents: 18
diff changeset
22 #if str($assembler_version_file) not in ['None', '']:
667b253329c6 Uploaded
greg
parents: 18
diff changeset
23 #set assembler_version = re.sub('[^\s\w\-]', '_', str($assembler_version_file.element_identifier))
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
24 #end if
2
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
25 #if str($kraken2_report_file) not in ['None', '']:
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
26 #set kraken2_version = re.sub('[^\s\w\-]', '_', str($kraken2_report_file.element_identifier))
12
99613333fd1f Uploaded
greg
parents: 5
diff changeset
27 #end if
99613333fd1f Uploaded
greg
parents: 5
diff changeset
28 #if str($minimap2_bam_file) not in ['None', '']:
99613333fd1f Uploaded
greg
parents: 5
diff changeset
29 #set minimap2_version = re.sub('[^\s\w\-]', '_', str($minimap2_bam_file.element_identifier))
99613333fd1f Uploaded
greg
parents: 5
diff changeset
30 #end if
99613333fd1f Uploaded
greg
parents: 5
diff changeset
31 #if str($samtools_pileup_file) not in ['None', '']:
99613333fd1f Uploaded
greg
parents: 5
diff changeset
32 #set samtools_version = re.sub('[^\s\w\-]', '_', str($samtools_pileup_file.element_identifier))
99613333fd1f Uploaded
greg
parents: 5
diff changeset
33 #end if
99613333fd1f Uploaded
greg
parents: 5
diff changeset
34 #if str($varscan_vcf_file) not in ['None', '']:
99613333fd1f Uploaded
greg
parents: 5
diff changeset
35 #set varscan_version = re.sub('[^\s\w\-]', '_', str($varscan_vcf_file.element_identifier))
2
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
36 #end if
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
37
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
38 mkdir amr_matrix_png_dir &&
13
f03c80bb22e9 Uploaded
greg
parents: 12
diff changeset
39 mkdir circos_png_dir &&
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
40 mkdir feature_bed_dir &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
41 mkdir feature_png_dir &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
42 mkdir mutation_regions_dir &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
43 touch 'pima_report.pdf' &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
44
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
45 #for $i in $amr_matrices_png:
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
46 #set file_name = $i.file_name
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
47 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
48 ln -s $i 'amr_matrix_png_dir/$identifier' &&
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
49 #end for
13
f03c80bb22e9 Uploaded
greg
parents: 12
diff changeset
50 #for $i in $circos_png:
f03c80bb22e9 Uploaded
greg
parents: 12
diff changeset
51 #set file_name = $i.file_name
f03c80bb22e9 Uploaded
greg
parents: 12
diff changeset
52 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
f03c80bb22e9 Uploaded
greg
parents: 12
diff changeset
53 ln -s $i 'circos_png_dir/$identifier' &&
f03c80bb22e9 Uploaded
greg
parents: 12
diff changeset
54 #end for
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
55 #for $i in $features_bed:
0a558f444c98 Uploaded
greg
parents:
diff changeset
56 #set file_name = $i.file_name
0a558f444c98 Uploaded
greg
parents:
diff changeset
57 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
0a558f444c98 Uploaded
greg
parents:
diff changeset
58 ln -s $i 'feature_bed_dir/$identifier' &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
59 #end for
0a558f444c98 Uploaded
greg
parents:
diff changeset
60 #for $i in $features_png:
0a558f444c98 Uploaded
greg
parents:
diff changeset
61 #set file_name = $i.file_name
0a558f444c98 Uploaded
greg
parents:
diff changeset
62 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
0a558f444c98 Uploaded
greg
parents:
diff changeset
63 ln -s $i 'feature_png_dir/$identifier' &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
64 #end for
0a558f444c98 Uploaded
greg
parents:
diff changeset
65 #for $i in $mutation_regions:
0a558f444c98 Uploaded
greg
parents:
diff changeset
66 #set file_name = $i.file_name
0a558f444c98 Uploaded
greg
parents:
diff changeset
67 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
0a558f444c98 Uploaded
greg
parents:
diff changeset
68 ln -s $i 'mutation_regions_dir/$identifier' &&
0a558f444c98 Uploaded
greg
parents:
diff changeset
69 #end for
0a558f444c98 Uploaded
greg
parents:
diff changeset
70
0a558f444c98 Uploaded
greg
parents:
diff changeset
71 python '${__tool_directory__}/pima_report.py'
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
72 --amr_matrix_png_dir 'amr_matrix_png_dir'
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
73 --amr_deletions_file '$amr_deletions_file'
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
74 --analysis_name '$analysis_name'
0a558f444c98 Uploaded
greg
parents:
diff changeset
75 --assembly_fasta_file '$assembly_fasta_file'
0a558f444c98 Uploaded
greg
parents:
diff changeset
76 --assembly_name '$assembly_name'
12
99613333fd1f Uploaded
greg
parents: 5
diff changeset
77 #if str($bedtools_complementbed_file) not in ['None', '']:
99613333fd1f Uploaded
greg
parents: 5
diff changeset
78 --bedtools_version '$bedtools_version'
99613333fd1f Uploaded
greg
parents: 5
diff changeset
79 #end if
99613333fd1f Uploaded
greg
parents: 5
diff changeset
80 #if str($blastn_features) not in ['None', '']:
99613333fd1f Uploaded
greg
parents: 5
diff changeset
81 --blastn_version '$blastn_version'
99613333fd1f Uploaded
greg
parents: 5
diff changeset
82 #end if
13
f03c80bb22e9 Uploaded
greg
parents: 12
diff changeset
83 --circos_png_dir 'circos_png_dir'
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
84 --compute_sequence_length_file '$compute_sequence_length_file'
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
85 --contig_coverage_file '$contig_coverage_file'
0a558f444c98 Uploaded
greg
parents:
diff changeset
86 --dbkey '$aligned_sample.metadata.dbkey'
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
87 --dnadiff_snps_file '$dnadiff_snps_file'
12
99613333fd1f Uploaded
greg
parents: 5
diff changeset
88 #if str($dnadiff_snps_file) not in ['None', '']:
99613333fd1f Uploaded
greg
parents: 5
diff changeset
89 --dnadiff_version '$dnadiff_version'
99613333fd1f Uploaded
greg
parents: 5
diff changeset
90 #end if
18
e948214a9e3c Uploaded
greg
parents: 14
diff changeset
91 --errors_file '$errors_file'
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
92 --feature_bed_dir 'feature_bed_dir'
0a558f444c98 Uploaded
greg
parents:
diff changeset
93 --feature_png_dir 'feature_png_dir'
21
667b253329c6 Uploaded
greg
parents: 18
diff changeset
94 #if str($assembler_version_file) not in ['None', '']:
667b253329c6 Uploaded
greg
parents: 18
diff changeset
95 --assembler_version '$assembler_version'
667b253329c6 Uploaded
greg
parents: 18
diff changeset
96 #if str($read_type) == 'ont':
667b253329c6 Uploaded
greg
parents: 18
diff changeset
97 ## Need to pass the tabular flye assembly file.
667b253329c6 Uploaded
greg
parents: 18
diff changeset
98 --flye_assembly_info_file '$assembler_version_file'
667b253329c6 Uploaded
greg
parents: 18
diff changeset
99 #end if
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
100 #end if
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
101 --genome_insertions_file '$genome_insertions_file'
21
667b253329c6 Uploaded
greg
parents: 18
diff changeset
102 #if $fastq_file.ext.endswith(".gz"):
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
103 --gzipped
0a558f444c98 Uploaded
greg
parents:
diff changeset
104 #end if
21
667b253329c6 Uploaded
greg
parents: 18
diff changeset
105 --fastq_file '$fastq_file'
2
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
106 #if str($kraken2_report_file) not in ['None', '']:
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
107 --kraken2_report_file '$kraken2_report_file'
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
108 --kraken2_version '$kraken2_version'
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
109 #end if
12
99613333fd1f Uploaded
greg
parents: 5
diff changeset
110 #if str($minimap2_bam_file) not in ['None', '']:
99613333fd1f Uploaded
greg
parents: 5
diff changeset
111 --minimap2_version '$minimap2_version'
99613333fd1f Uploaded
greg
parents: 5
diff changeset
112 #end if
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
113 --mutation_regions_dir 'mutation_regions_dir'
0a558f444c98 Uploaded
greg
parents:
diff changeset
114 --mutation_regions_bed_file '$mutation_regions_bed_file'
0a558f444c98 Uploaded
greg
parents:
diff changeset
115 --pima_css '${__tool_directory__}/pima.css'
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
116 --plasmids_file '$plasmids_file'
13
f03c80bb22e9 Uploaded
greg
parents: 12
diff changeset
117 --quast_report_file '$quast_report_file'
18
e948214a9e3c Uploaded
greg
parents: 14
diff changeset
118 --read_type '$read_type'
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
119 --reference_insertions_file '$reference_insertions_file'
12
99613333fd1f Uploaded
greg
parents: 5
diff changeset
120 #if str($samtools_pileup_file) not in ['None', '']:
99613333fd1f Uploaded
greg
parents: 5
diff changeset
121 --samtools_version '$samtools_version'
99613333fd1f Uploaded
greg
parents: 5
diff changeset
122 #end if
99613333fd1f Uploaded
greg
parents: 5
diff changeset
123 #if str($varscan_vcf_file) not in ['None', '']:
99613333fd1f Uploaded
greg
parents: 5
diff changeset
124 --varscan_version '$varscan_version'
99613333fd1f Uploaded
greg
parents: 5
diff changeset
125 #end if
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
126 && mv 'pima_report.pdf' '$output'
0a558f444c98 Uploaded
greg
parents:
diff changeset
127 ]]></command>
0a558f444c98 Uploaded
greg
parents:
diff changeset
128 <inputs>
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
129 <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
130 <param name="aligned_sample" type="data" format="bam" label="Aligned sample BAM file"/>
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
131 <param name="amr_deletions_file" type="data" format="bed" label="AMR deletions BED file"/>
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
132 <param name="assembly_fasta_file" type="data" format="fasta" label="Assembly FASTA file"/>
12
99613333fd1f Uploaded
greg
parents: 5
diff changeset
133 <param name="bedtools_complementbed_file" type="data" format="bed" label="Bedtools ComplementBed BED file"/>
4
428aed51c487 Uploaded
greg
parents: 3
diff changeset
134 <param name="blastn_features" format="tabular" type="data_collection" collection_type="list" label="Collection of blastn tabular files"/>
13
f03c80bb22e9 Uploaded
greg
parents: 12
diff changeset
135 <param name="circos_png" format="png" type="data_collection" collection_type="list" label="Collection of circos PNG files"/>
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
136 <param name="compute_sequence_length_file" type="data" format="tabular,tsv" label="Compute sequence length tabular file"/>
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
137 <param name="contig_coverage_file" type="data" format="tabular,tsv" label="Contig coverage tabular file"/>
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
138 <param name="dnadiff_snps_file" type="data" format="tabular" label="DNAdiff snps tabular file"/>
18
e948214a9e3c Uploaded
greg
parents: 14
diff changeset
139 <param name="errors_file" type="data" format="txt" label="AMR mutation regions error txt file"/>
21
667b253329c6 Uploaded
greg
parents: 18
diff changeset
140 <param name="fastq_file" type="data" format="fastqsanger,fastqsanger.gz" label="Fastq sample file"/>
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
141 <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
142 <param name="features_png" format="png" type="data_collection" collection_type="list" label="Collection of best feature hits PNG files"/>
21
667b253329c6 Uploaded
greg
parents: 18
diff changeset
143 <param name="assembler_version_file" type="data" format="fasta,tabular,tsv" optional="true" label="Assembly version file" help="Optional, ignored if not selected"/>
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
144 <param name="genome_insertions_file" type="data" format="bed" label="Genome insertions BED file"/>
2
9cb62054a87a Uploaded
greg
parents: 1
diff changeset
145 <param name="kraken2_report_file" type="data" format="tabular,tsv" optional="true" label="Kraken2 report tabular file" help="Optional, ignored if not selected"/>
12
99613333fd1f Uploaded
greg
parents: 5
diff changeset
146 <param name="minimap2_bam_file" type="data" format="bam" label="Minimap2 BAM file"/>
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
147 <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
148 <param name="mutation_regions_bed_file" type="data" format="mutations_regions,bed" label="Mutation regions BED file"/>
13
f03c80bb22e9 Uploaded
greg
parents: 12
diff changeset
149 <param name="quast_report_file" type="data" format="tabular" label="Quast report tabular file"/>
18
e948214a9e3c Uploaded
greg
parents: 14
diff changeset
150 <param argument="--read_type" type="select" label="Specify the read type">
e948214a9e3c Uploaded
greg
parents: 14
diff changeset
151 <option value="ont" selected="true">Long reads - Oxford Nanopore Technologies (ONT)</option>
e948214a9e3c Uploaded
greg
parents: 14
diff changeset
152 <option value="illumina">Short reads - Illumina</option>
e948214a9e3c Uploaded
greg
parents: 14
diff changeset
153 </param>
1
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
154 <param name="reference_insertions_file" type="data" format="bed" label="Reference insertions BED file"/>
67d0939b56b0 Uploaded
greg
parents: 0
diff changeset
155 <param name="plasmids_file" type="data" format="tsv" label="pChunks plasmids TSV file"/>
12
99613333fd1f Uploaded
greg
parents: 5
diff changeset
156 <param name="samtools_pileup_file" type="data" format="pileup" label="Samtools pileup file"/>
99613333fd1f Uploaded
greg
parents: 5
diff changeset
157 <param name="varscan_vcf_file" type="data" format="vcf" label="Varscan VCF file"/>
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
158 </inputs>
0a558f444c98 Uploaded
greg
parents:
diff changeset
159 <outputs>
0a558f444c98 Uploaded
greg
parents:
diff changeset
160 <data name="output" format="pdf"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
161 </outputs>
0a558f444c98 Uploaded
greg
parents:
diff changeset
162 <tests>
0a558f444c98 Uploaded
greg
parents:
diff changeset
163 <test>
0a558f444c98 Uploaded
greg
parents:
diff changeset
164 <param name="aligned_sample" value="aligned_sample.bam" ftype="bam"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
165 <param name="assembly_fasta_file" value="assembly_fasta.fasta" ftype="fasta"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
166 <param name="contig_coverage_file" value="contig_coverage.tabular" ftype="tabular"/>
21
667b253329c6 Uploaded
greg
parents: 18
diff changeset
167 <param name="fastq_file" value="ont_fastq.fastq" ftype="fastq"/>
0
0a558f444c98 Uploaded
greg
parents:
diff changeset
168 <output name="output" value="output.pdf" ftype="pdf"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
169 </test>
0a558f444c98 Uploaded
greg
parents:
diff changeset
170 </tests>
0a558f444c98 Uploaded
greg
parents:
diff changeset
171 <help>
0a558f444c98 Uploaded
greg
parents:
diff changeset
172 **What it does**
0a558f444c98 Uploaded
greg
parents:
diff changeset
173
0a558f444c98 Uploaded
greg
parents:
diff changeset
174 Generates the PIMA analysis summary report.
0a558f444c98 Uploaded
greg
parents:
diff changeset
175 </help>
0a558f444c98 Uploaded
greg
parents:
diff changeset
176 <expand macro="citations"/>
0a558f444c98 Uploaded
greg
parents:
diff changeset
177 </tool>
0a558f444c98 Uploaded
greg
parents:
diff changeset
178