Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix varscan #84

Merged
merged 3 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion workflow/rules/somatic_snps.paired.smk
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ rule mutect_filter:
# VarScan can output ambiguous IUPAC bases/codes
# the awk one-liner resets them to N, from:
# https://github.com/fpbarthel/GLASS/issues/23
bcftools sort -T ${{tmp}} "{output.final}" \\
bcftools view -s "{params.tumorsample}","{params.normalsample}" {output.final} \\
| bcftools sort -T ${{tmp}} - \\
| bcftools norm --threads {threads} --check-ref s -f {params.genome} -O v \\
| awk '{{gsub(/\y[W|K|Y|R|S|M|B|D|H|V]\y/,"N",$4); OFS = "\t"; print}}' \\
| sed '/^$/d' > {output.norm}
Expand Down
5 changes: 3 additions & 2 deletions workflow/rules/somatic_snps.tumor_only.smk
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ rule mutect_filter_single:
# VarScan can output ambiguous IUPAC bases/codes
# the awk one-liner resets them to N, from:
# https://github.com/fpbarthel/GLASS/issues/23
bcftools sort -T ${{tmp}} "{output.final}" \\
bcftools view -s "{params.tumorsample}" {output.final} \\
| bcftools sort -T ${{tmp}} - \\
| bcftools norm --threads {threads} --check-ref s -f {params.genome} -O v \\
| awk '{{gsub(/\y[W|K|Y|R|S|M|B|D|H|V]\y/,"N",$4); OFS = "\t"; print}}' \\
| sed '/^$/d' > {output.norm}
Expand Down Expand Up @@ -342,7 +343,7 @@ rule varscan_filter_single:
--output {output.filtered}

samplesFile="{output.samplesfile}"
echo -e "TUMOR\t{params.tumorsample}\n" > "{output.samplesfile}"
echo -e "Sample1\t{params.tumorsample}\n" > "{output.samplesfile}"

bcftools reheader \\
-o "{output.final}" \\
Expand Down
Loading