Mercurial > repos > greg > call_amr_mutations
changeset 2:a2fe87395f74 draft
Uploaded
author | greg |
---|---|
date | Mon, 20 Feb 2023 21:10:42 +0000 |
parents | 52a9e19ae588 |
children | 30b17a17c1aa |
files | call_amr_mutations.xml test-data/output1.tsv test-data/output1.vcf |
diffstat | 3 files changed, 99 insertions(+), 99 deletions(-) [+] |
line wrap: on
line diff
--- a/call_amr_mutations.xml Mon Feb 20 19:56:50 2023 +0000 +++ b/call_amr_mutations.xml Mon Feb 20 21:10:42 2023 +0000 @@ -9,8 +9,8 @@ #if $os.path.getsize(str($varscan_raw)) > 0: 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 && - cat varscan_snp | awk '{OFS = "\t"; print $1,$2,".",$3,$4,-log($14),"PASS",".","GT","1|1"}' > varscan_snp_tsv && - cat varscan_snp_tsv | sort -k 1,1 -k 2n,2n | awk 'BEGIN{OFS = "\t";print "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tSAMPLE"}{print}' > '$varscan_tsv' + cat varscan_snp | awk '{OFS = "\t"; print $1,$2,".",$3,$4,-log($14),"PASS",".","GT","1|1"}' > snp_vcf && + 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' #end if ]]></command> <inputs> @@ -18,13 +18,13 @@ <param name="mutation_regions" type="data" format="bed" label="AMR mutation regions BED file"/> </inputs> <outputs> - <data name="varscan_tsv" format="tsv"/> + <data name="varscan_vcf" format="vcf"/> </outputs> <tests> <test> <param name="varscan_raw" value="input1.vcf" ftype="vcf"/> <param name="mutation_regions" value="mutation_regions.bed" ftype="bed"/> - <output name="varscan_tsv" value="output1.tsv" ftype="tsv"/> + <output name="varscan_vcf" value="output1.vcf" ftype="vcf"/> </test> </tests> <help>
--- a/test-data/output1.tsv Mon Feb 20 19:56:50 2023 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SAMPLE -chromosome 6848 . C T 0 PASS . GT 1|1 -chromosome 28975 . G A 0 PASS . GT 1|1 -chromosome 64632 . T C 0 PASS . GT 1|1 -chromosome 73738 . T C 0 PASS . GT 1|1 -chromosome 122896 . G A 0 PASS . GT 1|1 -chromosome 171823 . C T 0 PASS . GT 1|1 -chromosome 182106 . C T 0 PASS . GT 1|1 -chromosome 200731 . C T 0 PASS . GT 1|1 -chromosome 240050 . T C 0 PASS . GT 1|1 -chromosome 243867 . C T 0 PASS . GT 1|1 -chromosome 245190 . C T 0 PASS . GT 1|1 -chromosome 274236 . C A 0 PASS . GT 1|1 -chromosome 318187 . C T 0 PASS . GT 1|1 -chromosome 337241 . T C 0 PASS . GT 1|1 -chromosome 359536 . G A 0 PASS . GT 1|1 -chromosome 387637 . G A 0 PASS . GT 1|1 -chromosome 433277 . G T 0 PASS . GT 1|1 -chromosome 513052 . C T 0 PASS . GT 1|1 -chromosome 521963 . A G 0 PASS . GT 1|1 -chromosome 571199 . G A 0 PASS . GT 1|1 -chromosome 644625 . T C 0 PASS . GT 1|1 -chromosome 665308 . T C 0 PASS . GT 1|1 -chromosome 692932 . C T 0 PASS . GT 1|1 -chromosome 702761 . G C 0 PASS . GT 1|1 -chromosome 732173 . A T 0 PASS . GT 1|1 -chromosome 765499 . A C 0 PASS . GT 1|1 -chromosome 789298 . G A 0 PASS . GT 1|1 -chromosome 814684 . T G 0 PASS . GT 1|1 -chromosome 1023150 . A G 0 PASS . GT 1|1 -chromosome 1120096 . C T 0 PASS . GT 1|1 -chromosome 1131906 . T C 0 PASS . GT 1|1 -chromosome 1181950 . A G 0 PASS . GT 1|1 -chromosome 1184347 . G A 0 PASS . GT 1|1 -chromosome 1223198 . C T 0 PASS . GT 1|1 -chromosome 1270555 . G T 0 PASS . GT 1|1 -chromosome 1306861 . C T 0 PASS . GT 1|1 -chromosome 1385721 . G A 0 PASS . GT 1|1 -chromosome 1406212 . C T 0 PASS . GT 1|1 -chromosome 1423420 . A G 0 PASS . GT 1|1 -chromosome 1592398 . C A 0 PASS . GT 1|1 -chromosome 1621512 . C A 0 PASS . GT 1|1 -chromosome 1631941 . G T 0 PASS . GT 1|1 -chromosome 1728049 . G A 0 PASS . GT 1|1 -chromosome 1774177 . C T 0 PASS . GT 1|1 -chromosome 1797708 . T C 0 PASS . GT 1|1 -chromosome 1798769 . G T 0 PASS . GT 1|1 -chromosome 1867996 . T C 0 PASS . GT 1|1 -chromosome 1982986 . C T 0 PASS . GT 1|1 -chromosome 2067935 . G A 0 PASS . GT 1|1 -chromosome 2133680 . G T 0 PASS . GT 1|1 -chromosome 2371243 . T C 0 PASS . GT 1|1 -chromosome 2423657 . A G 0 PASS . GT 1|1 -chromosome 2749671 . A G 0 PASS . GT 1|1 -chromosome 2834318 . G A 0 PASS . GT 1|1 -chromosome 2956135 . G A 0 PASS . GT 1|1 -chromosome 2989856 . G A 0 PASS . GT 1|1 -chromosome 3038888 . T C 0 PASS . GT 1|1 -chromosome 3163858 . A G 0 PASS . GT 1|1 -chromosome 3306423 . C T 0 PASS . GT 1|1 -chromosome 3364887 . G A 0 PASS . GT 1|1 -chromosome 3382079 . C T 0 PASS . GT 1|1 -chromosome 3460779 . T C 0 PASS . GT 1|1 -chromosome 3568849 . A G 0 PASS . GT 1|1 -chromosome 3696168 . C T 0 PASS . GT 1|1 -chromosome 3712048 . T C 0 PASS . GT 1|1 -chromosome 3739850 . A G 0 PASS . GT 1|1 -chromosome 3758015 . A G 0 PASS . GT 1|1 -chromosome 3841816 . G A 0 PASS . GT 1|1 -chromosome 4035203 . T C 0 PASS . GT 1|1 -chromosome 4145299 . C T 0 PASS . GT 1|1 -chromosome 4147376 . C T 0 PASS . GT 1|1 -chromosome 4158968 . C T 0 PASS . GT 1|1 -chromosome 4212929 . G T 0 PASS . GT 1|1 -chromosome 4232753 . C T 0 PASS . GT 1|1 -chromosome 4345557 . T A 0 PASS . GT 1|1 -chromosome 4456896 . G A 0 PASS . GT 1|1 -chromosome 4501001 . G A 0 PASS . GT 1|1 -chromosome 4519053 . A G 0 PASS . GT 1|1 -chromosome 4519433 . C A 0 PASS . GT 1|1 -chromosome 4698084 . T C 0 PASS . GT 1|1 -chromosome 4929312 . T G 0 PASS . GT 1|1 -chromosome 4951610 . G A 0 PASS . GT 1|1 -chromosome 5040523 . C T 0 PASS . GT 1|1 -chromosome 5077771 . G A 0 PASS . GT 1|1 -chromosome 5140491 . G A 0 PASS . GT 1|1 -chromosome 5157810 . G A 0 PASS . GT 1|1 -pXO1 7452 . C T 0 PASS . GT 1|1 -pXO1 28077 . G A 0 PASS . GT 1|1 -pXO1 55874 . A T 0 PASS . GT 1|1 -pXO1 77518 . A G 0 PASS . GT 1|1 -pXO1 141921 . T G 0 PASS . GT 1|1 -pXO1 141922 . T A 0 PASS . GT 1|1 -pXO1 141923 . T A 0 PASS . GT 1|1 -pXO1 150892 . C A 0 PASS . GT 1|1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output1.vcf Mon Feb 20 21:10:42 2023 +0000 @@ -0,0 +1,95 @@ +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SAMPLE +chromosome 6848 . C T 0 PASS . GT 1|1 +chromosome 28975 . G A 0 PASS . GT 1|1 +chromosome 64632 . T C 0 PASS . GT 1|1 +chromosome 73738 . T C 0 PASS . GT 1|1 +chromosome 122896 . G A 0 PASS . GT 1|1 +chromosome 171823 . C T 0 PASS . GT 1|1 +chromosome 182106 . C T 0 PASS . GT 1|1 +chromosome 200731 . C T 0 PASS . GT 1|1 +chromosome 240050 . T C 0 PASS . GT 1|1 +chromosome 243867 . C T 0 PASS . GT 1|1 +chromosome 245190 . C T 0 PASS . GT 1|1 +chromosome 274236 . C A 0 PASS . GT 1|1 +chromosome 318187 . C T 0 PASS . GT 1|1 +chromosome 337241 . T C 0 PASS . GT 1|1 +chromosome 359536 . G A 0 PASS . GT 1|1 +chromosome 387637 . G A 0 PASS . GT 1|1 +chromosome 433277 . G T 0 PASS . GT 1|1 +chromosome 513052 . C T 0 PASS . GT 1|1 +chromosome 521963 . A G 0 PASS . GT 1|1 +chromosome 571199 . G A 0 PASS . GT 1|1 +chromosome 644625 . T C 0 PASS . GT 1|1 +chromosome 665308 . T C 0 PASS . GT 1|1 +chromosome 692932 . C T 0 PASS . GT 1|1 +chromosome 702761 . G C 0 PASS . GT 1|1 +chromosome 732173 . A T 0 PASS . GT 1|1 +chromosome 765499 . A C 0 PASS . GT 1|1 +chromosome 789298 . G A 0 PASS . GT 1|1 +chromosome 814684 . T G 0 PASS . GT 1|1 +chromosome 1023150 . A G 0 PASS . GT 1|1 +chromosome 1120096 . C T 0 PASS . GT 1|1 +chromosome 1131906 . T C 0 PASS . GT 1|1 +chromosome 1181950 . A G 0 PASS . GT 1|1 +chromosome 1184347 . G A 0 PASS . GT 1|1 +chromosome 1223198 . C T 0 PASS . GT 1|1 +chromosome 1270555 . G T 0 PASS . GT 1|1 +chromosome 1306861 . C T 0 PASS . GT 1|1 +chromosome 1385721 . G A 0 PASS . GT 1|1 +chromosome 1406212 . C T 0 PASS . GT 1|1 +chromosome 1423420 . A G 0 PASS . GT 1|1 +chromosome 1592398 . C A 0 PASS . GT 1|1 +chromosome 1621512 . C A 0 PASS . GT 1|1 +chromosome 1631941 . G T 0 PASS . GT 1|1 +chromosome 1728049 . G A 0 PASS . GT 1|1 +chromosome 1774177 . C T 0 PASS . GT 1|1 +chromosome 1797708 . T C 0 PASS . GT 1|1 +chromosome 1798769 . G T 0 PASS . GT 1|1 +chromosome 1867996 . T C 0 PASS . GT 1|1 +chromosome 1982986 . C T 0 PASS . GT 1|1 +chromosome 2067935 . G A 0 PASS . GT 1|1 +chromosome 2133680 . G T 0 PASS . GT 1|1 +chromosome 2371243 . T C 0 PASS . GT 1|1 +chromosome 2423657 . A G 0 PASS . GT 1|1 +chromosome 2749671 . A G 0 PASS . GT 1|1 +chromosome 2834318 . G A 0 PASS . GT 1|1 +chromosome 2956135 . G A 0 PASS . GT 1|1 +chromosome 2989856 . G A 0 PASS . GT 1|1 +chromosome 3038888 . T C 0 PASS . GT 1|1 +chromosome 3163858 . A G 0 PASS . GT 1|1 +chromosome 3306423 . C T 0 PASS . GT 1|1 +chromosome 3364887 . G A 0 PASS . GT 1|1 +chromosome 3382079 . C T 0 PASS . GT 1|1 +chromosome 3460779 . T C 0 PASS . GT 1|1 +chromosome 3568849 . A G 0 PASS . GT 1|1 +chromosome 3696168 . C T 0 PASS . GT 1|1 +chromosome 3712048 . T C 0 PASS . GT 1|1 +chromosome 3739850 . A G 0 PASS . GT 1|1 +chromosome 3758015 . A G 0 PASS . GT 1|1 +chromosome 3841816 . G A 0 PASS . GT 1|1 +chromosome 4035203 . T C 0 PASS . GT 1|1 +chromosome 4145299 . C T 0 PASS . GT 1|1 +chromosome 4147376 . C T 0 PASS . GT 1|1 +chromosome 4158968 . C T 0 PASS . GT 1|1 +chromosome 4212929 . G T 0 PASS . GT 1|1 +chromosome 4232753 . C T 0 PASS . GT 1|1 +chromosome 4345557 . T A 0 PASS . GT 1|1 +chromosome 4456896 . G A 0 PASS . GT 1|1 +chromosome 4501001 . G A 0 PASS . GT 1|1 +chromosome 4519053 . A G 0 PASS . GT 1|1 +chromosome 4519433 . C A 0 PASS . GT 1|1 +chromosome 4698084 . T C 0 PASS . GT 1|1 +chromosome 4929312 . T G 0 PASS . GT 1|1 +chromosome 4951610 . G A 0 PASS . GT 1|1 +chromosome 5040523 . C T 0 PASS . GT 1|1 +chromosome 5077771 . G A 0 PASS . GT 1|1 +chromosome 5140491 . G A 0 PASS . GT 1|1 +chromosome 5157810 . G A 0 PASS . GT 1|1 +pXO1 7452 . C T 0 PASS . GT 1|1 +pXO1 28077 . G A 0 PASS . GT 1|1 +pXO1 55874 . A T 0 PASS . GT 1|1 +pXO1 77518 . A G 0 PASS . GT 1|1 +pXO1 141921 . T G 0 PASS . GT 1|1 +pXO1 141922 . T A 0 PASS . GT 1|1 +pXO1 141923 . T A 0 PASS . GT 1|1 +pXO1 150892 . C A 0 PASS . GT 1|1