annotate call_amr_mutations.xml @ 2:a2fe87395f74 draft

Uploaded
author greg
date Mon, 20 Feb 2023 21:10:42 +0000
parents 52a9e19ae588
children 30b17a17c1aa
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
64999b5b58fe Uploaded
greg
parents:
diff changeset
1 <tool id="call_amr_mutations" name="PIMA: call AMR mutations" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
64999b5b58fe Uploaded
greg
parents:
diff changeset
2 <description></description>
64999b5b58fe Uploaded
greg
parents:
diff changeset
3 <macros>
64999b5b58fe Uploaded
greg
parents:
diff changeset
4 <import>macros.xml</import>
64999b5b58fe Uploaded
greg
parents:
diff changeset
5 </macros>
64999b5b58fe Uploaded
greg
parents:
diff changeset
6 <expand macro="requirements"/>
64999b5b58fe Uploaded
greg
parents:
diff changeset
7 <command detect_errors="exit_code"><![CDATA[
64999b5b58fe Uploaded
greg
parents:
diff changeset
8 #import os
64999b5b58fe Uploaded
greg
parents:
diff changeset
9
64999b5b58fe Uploaded
greg
parents:
diff changeset
10 #if $os.path.getsize(str($varscan_raw)) > 0:
64999b5b58fe Uploaded
greg
parents:
diff changeset
11 cat '$varscan_raw' | awk '(NR > 1 && $9 == 2 && $5 + $6 >= 15){OFS = "\t";f = $6 / ($5 + $6); gsub(/.*\//, "", $4);s = $4;gsub(/[+\\-]/, "", s);$7 = sprintf("%.2f%%", f * 100);min = 1 / log(length(s) + 2) / log(10) + 2/10;if(f > min){print}}' > varscan_snp &&
2
a2fe87395f74 Uploaded
greg
parents: 1
diff changeset
12 cat varscan_snp | awk '{OFS = "\t"; print $1,$2,".",$3,$4,-log($14),"PASS",".","GT","1|1"}' > snp_vcf &&
a2fe87395f74 Uploaded
greg
parents: 1
diff changeset
13 cat snp_vcf | sort -k 1,1 -k 2n,2n | awk 'BEGIN{OFS = "\t";print "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tSAMPLE"}{print}' > '$varscan_vcf'
0
64999b5b58fe Uploaded
greg
parents:
diff changeset
14 #end if
64999b5b58fe Uploaded
greg
parents:
diff changeset
15 ]]></command>
64999b5b58fe Uploaded
greg
parents:
diff changeset
16 <inputs>
64999b5b58fe Uploaded
greg
parents:
diff changeset
17 <param name="varscan_raw" type="data" format="vcf" label="Raw varscan VCF file"/>
64999b5b58fe Uploaded
greg
parents:
diff changeset
18 <param name="mutation_regions" type="data" format="bed" label="AMR mutation regions BED file"/>
64999b5b58fe Uploaded
greg
parents:
diff changeset
19 </inputs>
64999b5b58fe Uploaded
greg
parents:
diff changeset
20 <outputs>
2
a2fe87395f74 Uploaded
greg
parents: 1
diff changeset
21 <data name="varscan_vcf" format="vcf"/>
0
64999b5b58fe Uploaded
greg
parents:
diff changeset
22 </outputs>
64999b5b58fe Uploaded
greg
parents:
diff changeset
23 <tests>
64999b5b58fe Uploaded
greg
parents:
diff changeset
24 <test>
1
52a9e19ae588 Uploaded
greg
parents: 0
diff changeset
25 <param name="varscan_raw" value="input1.vcf" ftype="vcf"/>
0
64999b5b58fe Uploaded
greg
parents:
diff changeset
26 <param name="mutation_regions" value="mutation_regions.bed" ftype="bed"/>
2
a2fe87395f74 Uploaded
greg
parents: 1
diff changeset
27 <output name="varscan_vcf" value="output1.vcf" ftype="vcf"/>
0
64999b5b58fe Uploaded
greg
parents:
diff changeset
28 </test>
64999b5b58fe Uploaded
greg
parents:
diff changeset
29 </tests>
64999b5b58fe Uploaded
greg
parents:
diff changeset
30 <help>
64999b5b58fe Uploaded
greg
parents:
diff changeset
31 **What it does**
64999b5b58fe Uploaded
greg
parents:
diff changeset
32
64999b5b58fe Uploaded
greg
parents:
diff changeset
33 Accepts VarScan mpileup2snps file, filters them, and produces a VCF file.
64999b5b58fe Uploaded
greg
parents:
diff changeset
34 </help>
64999b5b58fe Uploaded
greg
parents:
diff changeset
35 <expand macro="citations"/>
64999b5b58fe Uploaded
greg
parents:
diff changeset
36 </tool>
64999b5b58fe Uploaded
greg
parents:
diff changeset
37