Mercurial > repos > greg > call_amr_mutations
diff call_amr_mutations.xml @ 1:52a9e19ae588 draft
Uploaded
author | greg |
---|---|
date | Mon, 20 Feb 2023 19:56:50 +0000 |
parents | 64999b5b58fe |
children | a2fe87395f74 |
line wrap: on
line diff
--- a/call_amr_mutations.xml Fri Feb 10 17:35:04 2023 +0000 +++ b/call_amr_mutations.xml Mon Feb 20 19:56:50 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_vcf && - cat varscan_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' + 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' #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_vcf" format="vcf"/> + <data name="varscan_tsv" format="tsv"/> </outputs> <tests> <test> - <param name="varscan_raw" value="varscan_raw.vcf" ftype="vcf"/> + <param name="varscan_raw" value="input1.vcf" ftype="vcf"/> <param name="mutation_regions" value="mutation_regions.bed" ftype="bed"/> - <output name="varscan_vcf" value="varscan_vcf.vcf" ftype="vcf"/> + <output name="varscan_tsv" value="output1.tsv" ftype="tsv"/> </test> </tests> <help>