deepvariant: Could not open BAM
Hi!
I have a problem that docker can’t find BAM file:
[E::hts_open_format] Failed to open file "/data/deepvariant/test_bam/DP8400014945BR_L01_541.picard_MD.bam" : No such file or directory
Traceback (most recent call last):
File "/tmp/Bazel.runfiles_wjhib79c/runfiles/com_google_deepvariant/deepvariant/make_examples.py", line 180, in <module>
app.run(main)
File "/tmp/Bazel.runfiles_wjhib79c/runfiles/absl_py/absl/app.py", line 300, in run
_run_main(main, args)
File "/tmp/Bazel.runfiles_wjhib79c/runfiles/absl_py/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "/tmp/Bazel.runfiles_wjhib79c/runfiles/com_google_deepvariant/deepvariant/make_examples.py", line 166, in main
options = default_options(add_flags=True, flags_obj=FLAGS)
File "/tmp/Bazel.runfiles_wjhib79c/runfiles/com_google_deepvariant/deepvariant/make_examples.py", line 128, in default_options
samples_in_order, sample_role_to_train = one_sample_from_flags(
File "/tmp/Bazel.runfiles_wjhib79c/runfiles/com_google_deepvariant/deepvariant/make_examples.py", line 85, in one_sample_from_flags
sample_name = make_examples_core.assign_sample_name(
File "/tmp/Bazel.runfiles_wjhib79c/runfiles/com_google_deepvariant/deepvariant/make_examples_core.py", line 134, in assign_sample_name
with sam.SamReader(reads_filenames.split(',')[0]) as sam_reader:
File "/tmp/Bazel.runfiles_wjhib79c/runfiles/com_google_deepvariant/third_party/nucleus/io/genomics_reader.py", line 221, in __init__
self._reader = self._native_reader(input_path, **kwargs)
File "/tmp/Bazel.runfiles_wjhib79c/runfiles/com_google_deepvariant/third_party/nucleus/io/sam.py", line 260, in _native_reader
return NativeSamReader(input_path, **kwargs)
File "/tmp/Bazel.runfiles_wjhib79c/runfiles/com_google_deepvariant/third_party/nucleus/io/sam.py", line 227, in __init__
self._reader = sam_reader.SamReader.from_file(
ValueError: NOT_FOUND: Could not open /data/deepvariant/test_bam/DP8400014945BR_L01_541.picard_MD.bam
parallel: This job failed:
/opt/deepvariant/bin/make_examples --mode calling --ref /data/PublicData/hg38/GCA_000001405.15_GRCh38_no_alt_cleaned.fna --reads /data/deepvariant/test_bam/DP8400014945BR_L01_541.picard_MD.bam --examples /tmp/tmpq8fl_xv9/make_examples.tfrecord@1.gz --channels insert_size --gvcf /tmp/tmpq8fl_xv9/gvcf.tfrecord@1.gz --task 0
real 0m2.791s
user 0m5.497s
sys 0m4.089s
Here is my .sh file that i’m running:
#!/bin/bash
BIN_VERSION="1.4.0"
docker run --gpus all \
-v "${INPUT_DIR}":"/data/deepvariant/test_bam" \
-v "${OUTPUT_DIR}":"/data/deepvariant/output" \
-v "${REF}":"/data/PublicData/hg38" \
google/deepvariant:"${BIN_VERSION}" \
/opt/deepvariant/bin/run_deepvariant \
--model_type=WGS \
--ref=/data/PublicData/hg38/GCA_000001405.15_GRCh38_no_alt_cleaned.fna \
--reads=/data/deepvariant/test_bam/DP8400014945BR_L01_541.picard_MD.bam \
--output_vcf=/data/deepvariant/output/output.vcf.gz \
--output_gvcf=/data/deepvariant/output/output.g.vcf.gz \
I suppose that’s a problem with mounting a directory to docker, however I don’t understand what’s incorrect in my code. Could you help me please?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16
Hi LiYi,
Awesome! Please don’t hesitate to reach out again if you have more questions.
You’re welcome 😃 Paul
Hi Paul, Thank you for the answer, it works! Although I still got some error about the format of BAM file, I can try if I can resolve it on my own.
Thanks again! LiYi