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

Lancet changes to sync with other pipelines #374

Merged
merged 1 commit into from
Aug 27, 2020
Merged
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
26 changes: 10 additions & 16 deletions modules/somatic/lancet.jst
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,12 @@
{#
# Lancet sorts output in lexicographical order and this does not
# match the reference fasta order. Here we resort to match the reference
#
# bcftools requires gz or bcf files and we tabix them as a workaround for the improper header given by lancet
#}

bcftools view \
--output-type z \
--output-file "{{ temp_dir }}/{{ loop.index }}.lancet-uns.vcf.gz" \
"{{ temp_dir }}/{{ loop.index }}.lancet-uns.vcf"

bcftools index --tbi --force "{{ temp_dir }}/{{ loop.index }}.lancet-uns.vcf.gz"

bcftools sort \
--max-mem 768M \
--temp-dir {{ temp_dir }}/temp_{{ loop.index }}/ \
--output-type v \
--output-file "{{ temp_dir }}/{{ loop.index }}.lancet.vcf" \
"{{ temp_dir }}/{{ loop.index }}.lancet-uns.vcf.gz"
bcftools reheader \
-f "{{ constants.phoenix.reference_fai }}" \
"{{ temp_dir }}/{{ loop.index }}.lancet-uns.vcf" \
| bcftools sort > "{{ temp_dir }}/{{ loop.index }}.lancet.vcf"

{% endfor %}

Expand Down Expand Up @@ -93,7 +82,7 @@

bcftools concat \
--output-type z \
--output "{{ all_vcf }}" \
--output "{{ temp_dir }}/{{ pair.name }}.{{ aligner }}.lancet.all.uns.vcf.gz" \
{% for b in constants.phoenix.calling_intervals %}
{% if not loop.last %}
"{{ temp_dir }}/{{ loop.index }}.lancet.vcf" \
Expand All @@ -102,6 +91,11 @@
{% endif %}
{% endfor %}

bcftools sort \
--output-type z \
--output-file "{{ all_vcf }}" \
"{{ temp_dir }}/{{ pair.name }}.{{ aligner }}.lancet.all.uns.vcf.gz"

bcftools index --tbi --force "{{ all_vcf }}"

{#
Expand Down