Skip to content

Commit

Permalink
fix: making compatible with varfish export and mehari
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Jul 17, 2023
1 parent 04551d5 commit 67d8009
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
5 changes: 2 additions & 3 deletions snappy_pipeline/workflows/varfish_export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@
#: Extension of files
EXTS = (".tsv.gz", ".tsv.gz.md5")

#: Infixes to use for file name generation
INFIXES = ("gts", "db-infos", "bam-qc")

# TODO: the number of restart times is high because tabix in HTSJDK/Jannovar is flaky...

#: Default configuration for the somatic_variant_calling step
Expand Down Expand Up @@ -391,6 +388,8 @@ def _get_output_files_annotate_strucvars(self):
work_paths = {
"gts": f"{prefix}.gts.tsv.gz",
"gts_md5": f"{prefix}.gts.tsv.gz.md5",
"feature_effects": f"{prefix}.feature-effects.tsv.gz",
"feature_effects_md5": f"{prefix}.feature-effects.tsv.gz.md5",
"db_infos": f"{prefix}.db-infos.tsv.gz",
"db_infos_md5": f"{prefix}.db-infos.tsv.gz.md5",
}
Expand Down
20 changes: 20 additions & 0 deletions snappy_wrappers/wrappers/mehari/annotate_strucvars/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,25 @@
tabix -s1 -b2 -e2 -f $TMPDIR/final_for_import.$num.vcf.gz
done
cat <<"EOF" > $TMPDIR/feature-effects.tsv
case_id
set_id
sv_uuid
refseq_gene_id
refseq_transcript_id
refseq_transcript_coding
refseq_effect
ensembl_gene_id
ensembl_transcript_id
ensembl_transcript_coding
ensembl_effect
EOF
cat $TMPDIR/feature-effects.tsv \
| tr '\n' '\t' \
| sed -e 's/\t$/\n/g' \
>{snakemake.output.feature_effects}
# Perform Mehari structural variant annotation.
mehari \
annotate \
Expand All @@ -113,6 +132,7 @@
# Compute MD5 sums on output files
compute-md5 {snakemake.output.db_infos} {snakemake.output.db_infos_md5}
compute-md5 {snakemake.output.gts} {snakemake.output.gts_md5}
compute-md5 {snakemake.output.feature_effects} {snakemake.output.feature_effects_md5}
# Create output links -----------------------------------------------------------------------------
Expand Down

0 comments on commit 67d8009

Please sign in to comment.