Closed moldach closed 4 years ago
Hi @moldach,
If I understand correctly, the command line VEP runs as expected and you are looking into using snakemake to run VEP. In this case the page below might be of help to you on how to set up the wrappers: https://snakemake-wrappers.readthedocs.io/en/stable/wrappers/vep.html .
Kind regards, Irina
Hi @ima23 I included all three of those links in my message...
To be clear, I already have two of the three wrappers from that link working:
It was only the third wrapper I'm having issues with; please see above the part:
The third rule is to actually run VEP for which I've written the following rule:
Note that input, output and log file paths can be chosen freely when running with snakemake --use-conda
so the input
for both rules was the same:
rule variant_annotation:
input:
sample = lambda wildcards: getVCFs(wildcards.sample),
ref = config["REF_GENOME"],
annot = "config["GENOME_ANNOTATION"]
output:
os.path.join(dirs_dict["ANNOT_DIR"],config["ANNOT_TOOL"],"{sample}.ann.vcf"),
os.path.join(dirs_dict["ANNOT_DIR"],config["ANNOT_TOOL"],"{sample}.ann.vcf_summary.html"),
os.path.join(dirs_dict["ANNOT_DIR"],config["ANNOT_TOOL"],"{sample}.ann.vcf_warnings.txt")
log: os.path.join(dirs_dict["LOG_DIR"],config["ANNOT_TOOL"],"{sample}.log")
params:
sample = os.path.join(dirs_dict["ANNOT_DIR"],config["ANNOT_TOOL"],"{sample}.ann.vcf")
message: """--- Annotating Variants."""
resources:
mem = 30000,
time = 120
threads: 1
shell: """
source ~/bin/activate_my_perl.sh
module load htslib
~/projects/def-mtarailo/common/tools/ensembl-vep/vep \
-i {input.sample} \
--species "caenorhabditis_elegans" \
--format "vcf" \
--everything \
--offline \
--force_overwrite \
--fasta {input.ref} \
--gff {input.annot} \
--tab \
--variant_class \
--regulatory \
--show_ref_allele \
--numbers \
--symbol \
--protein \
-o {params.sample}
"""
rule variant_annotation:
input:
calls= lambda wildcards: getVCFs(wildcards.sample),
cache="resources/vep/cache",
plugins="resources/vep/plugins",
output:
calls=os.path.join(dirs_dict["ANNOT_DIR"],config["ANNOT_TOOL"],"{sample}.annotated.vcf"),
stats=os.path.join(dirs_dict["ANNOT_DIR"],config["ANNOT_TOOL"],"{sample}.html")
params:
plugins="",
extra=""
message: """--- Annotating Variants."""
resources:
mem = 30000,
time = 120
threads: 4
wrapper:
"0.64.0/bio/vep/annotate"
This seems to be the command run via the wrapper:
subprocess.CalledProcessError: Command 'set -euo pipefail; (bcftools view VARIANT_CALLING/varscan/470_sorted_dedupped_snp_varscan.vcf | vep --everything --fork 4 --format vcf --vcf --cache --cache_version 100 --species caenorhabditis_elegans --assembly WBcel235 --dir_cache resources/vep/cache --dir_plugins resources/vep/plugins --offline --plugin LoFtool --output_file STDOUT --stats_file ANNOTATION/VEP/470.html | bcftools view -Ov > ANNOTATION/VEP/470.annotated.vcf)' returned non-zero exit status 1.
And the pertinent information from that error message (above) was:
Failed to open VARIANT_CALLING/varscan/470_sorted_dedupped_snp_varscan.vcf: unknown file type
This is odd - as I mentioned the same input
was used with shell and worked?
Thanks
Hi @moldach,
I understand your issue and sorry for not following the links to the posts to see it was the same related post.
Have you tried contacting the authors of the snakemake wrapper to check if they can help you with it? Unfortunately it sounds like it is a snakemake setup issue, when the file is not found before it is sent to VEP for analysis, and not a VEP issue; in which case they should be able to help.
You could double check the getVCFs
call and how VARIANT_CALLING
is set/used.
If you have other VEP questions please let us know.
Kind regards, Irina
Hi @ima23 thanks for your feedback. I've followed up with the author @johanneskoester
Thanks @moldach. I will close this ticket for now, do open it if you have related questions or open a new one. Kind regards, Irina
I'm trying to adapt my regular
VEP
code to use the snakemake wrapper instead but am running into an issue.I want to make sure that a) the wrapper works for me and b) it produces the same results as the following:
In order to use
VEP
with wrappers there are 3 different rules. I have got the following two working:The third rule is to actually run
VEP
for which I've written the following rule:When submitting the job this is the error I recieve:
This issue was originally brought up on StackOverflow last week but hasn't been solved yet so I'm bringing it up here.