-
Notifications
You must be signed in to change notification settings - Fork 702
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
AttributeError issue #839
Comments
@hangy1 ,
seems like sample_name is not set correctly? Unless you replaced them? Can you confirm if you have set the values correctly by printing them before running DeepVariant?
so instead of using: gvcf = "../results/deepVariant/{dataset}/{sample}/vcf/{sample}.deepVariant.g.vcf.gz" Use: gvcf = "/path/to/vcf/{sample}.deepVariant.g.vcf.gz" Hope this helps. You can also run the quickstart to see if you can simply copy-paste and run the command fully and then adapt it to the command you are planning to run. |
Sorry about the the confusion of <sample_name>, I edited out the actual name. The name was appeared correctly and It was being generated at the right path too (files were deleted by snakemake due to incomplete workflow). It seems like both VCF and gVCF were generated successfully from the log but if failed to run vcf_stats_report.py: ***** Running the command:***** I0626 19:01:26.925776 139684790912832 postprocess_variants.py:1211] Using sample name from call_variants output. Sample name: default real 0m4.417s |
Also under my target path ../results/deepVariant/KO_PV/<sample_name>/vcf, I do get the file <sample_name>.deepVariant.vcf.gz.tbi |
Ok, that means it worked for you. Do you have any further questions? |
only <sample_name>.deepVariant.vcf.gz.tbi (besides example and call_variant files) was generated, no vcf and gvcf at the output dir. I also changed the path to absolute dir and it didn't help |
Have you checked the FAQ? https://github.com/google/deepvariant/blob/r1.6.1/docs/FAQ.md:
Yes
Describe the issue:
Setup
Steps to reproduce:
smakemake pipeline
rule run_deepvariant:
output:
vcf = "../results/deepVariant/{dataset}/{sample}/vcf/{sample}.deepVariant.vcf.gz",
gvcf = "../results/deepVariant/{dataset}/{sample}/vcf/{sample}.deepVariant.g.vcf.gz"
input:
reference_fasta = "/project/databases/bacteroides_genome/reference_genomic.fna",
reads = rules.sam2bam.output.sorted_bam
params:
inter_dir = "../../results/deepVariant/{dataset}/{sample}/intermediate",
log_dir = "../../results/deepVariant/{dataset}/{sample}/log",
work_dir = "/project/",
deepvariant = "/project/software/deepVariant.sif"
shell:
"""
module load singularity/3.7.0
singularity exec -B {params.work_dir} {params.deepvariant} /opt/deepvariant/bin/run_deepvariant
--model_type=WGS
--ref={input.reference_fasta}
--reads={input.reads}
--output_vcf={output.vcf}
--output_gvcf={output.vcf}
--make_examples_extra_args --channels=insert_size
--intermediate_results_dir {params.inter_dir}
--num_shards=6
--logging_dir={params.log_dir}
"""
***** Running the command:*****
time /opt/deepvariant/bin/vcf_stats_report --input_vcf "../results/deepVariant/KO_PV/<sample_name>/vcf/<sample_name>.deepVariant.vcf.gz" --outfile_base "../results/deepVariant/KO_PV/<sample_name>/vcf/<sample_name>.deepVariant"
I0626 19:01:30.369722 139699125458752 genomics_reader.py:222] Reading ../results/deepVariant/KO_PV/<sample_name>/vcf/<sample_name>.deepVariant.vcf.gz with NativeVcfReader
Traceback (most recent call last):
File "/tmp/Bazel.runfiles_xq721o6r/runfiles/com_google_deepvariant/deepvariant/vcf_stats_report.py", line 103, in
tf.compat.v1.app.run()
File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/platform/app.py", line 36, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/tmp/Bazel.runfiles_xq721o6r/runfiles/absl_py/absl/app.py", line 312, in run
_run_main(main, args)
File "/tmp/Bazel.runfiles_xq721o6r/runfiles/absl_py/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/tmp/Bazel.runfiles_xq721o6r/runfiles/com_google_deepvariant/deepvariant/vcf_stats_report.py", line 93, in main
vcf_stats.create_vcf_report(
File "/tmp/Bazel.runfiles_xq721o6r/runfiles/com_google_deepvariant/deepvariant/vcf_stats.py", line 392, in create_vcf_report
vcf_stats_vis.create_visual_report(
File "/tmp/Bazel.runfiles_xq721o6r/runfiles/com_google_deepvariant/deepvariant/vcf_stats_vis.py", line 543, in create_visual_report
_save_html(basename, all_charts)
File "/tmp/Bazel.runfiles_xq721o6r/runfiles/com_google_deepvariant/deepvariant/vcf_stats_vis.py", line 532, in _save_html
html_string = _altair_chart_to_html(
File "/tmp/Bazel.runfiles_xq721o6r/runfiles/com_google_deepvariant/deepvariant/vcf_stats_vis.py", line 513, in _altair_chart_to_html
altair_chart.save(
File "/usr/local/lib/python3.8/dist-packages/altair/vegalite/v4/api.py", line 476, in save
result = save(**kwds)
File "/usr/local/lib/python3.8/dist-packages/altair/utils/save.py", line 79, in save
spec = chart.to_dict()
File "/usr/local/lib/python3.8/dist-packages/altair/vegalite/v4/api.py", line 373, in to_dict
dct = super(TopLevelMixin, copy).to_dict(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/altair/utils/schemapi.py", line 325, in to_dict
result = _todict(
File "/usr/local/lib/python3.8/dist-packages/altair/utils/schemapi.py", line 60, in _todict
return {
File "/usr/local/lib/python3.8/dist-packages/altair/utils/schemapi.py", line 61, in
k: _todict(v, validate, context)
File "/usr/local/lib/python3.8/dist-packages/altair/utils/schemapi.py", line 58, in _todict
return [_todict(v, validate, context) for v in obj]
File "/usr/local/lib/python3.8/dist-packages/altair/utils/schemapi.py", line 58, in
return [_todict(v, validate, context) for v in obj]
File "/usr/local/lib/python3.8/dist-packages/altair/utils/schemapi.py", line 56, in _todict
return obj.to_dict(validate=validate, context=context)
File "/usr/local/lib/python3.8/dist-packages/altair/vegalite/v4/api.py", line 373, in to_dict
dct = super(TopLevelMixin, copy).to_dict(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/altair/utils/schemapi.py", line 325, in to_dict
result = _todict(
File "/usr/local/lib/python3.8/dist-packages/altair/utils/schemapi.py", line 60, in _todict
return {
File "/usr/local/lib/python3.8/dist-packages/altair/utils/schemapi.py", line 61, in
k: _todict(v, validate, context)
File "/usr/local/lib/python3.8/dist-packages/altair/utils/schemapi.py", line 58, in _todict
return [_todict(v, validate, context) for v in obj]
File "/usr/local/lib/python3.8/dist-packages/altair/utils/schemapi.py", line 58, in
return [_todict(v, validate, context) for v in obj]
File "/usr/local/lib/python3.8/dist-packages/altair/utils/schemapi.py", line 56, in _todict
return obj.to_dict(validate=validate, context=context)
File "/usr/local/lib/python3.8/dist-packages/altair/vegalite/v4/api.py", line 84, in _prepare_data
data = _pipe(data, data_transformers.get())
File "/usr/local/lib/python3.8/dist-packages/toolz/functoolz.py", line 628, in pipe
data = func(data)
File "/usr/local/lib/python3.8/dist-packages/toolz/functoolz.py", line 304, in call
return self._partial(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/altair/vegalite/data.py", line 19, in default_data_transformer
return curried.pipe(data, limit_rows(max_rows=max_rows), to_values)
File "/usr/local/lib/python3.8/dist-packages/toolz/functoolz.py", line 628, in pipe
data = func(data)
File "/usr/local/lib/python3.8/dist-packages/toolz/functoolz.py", line 304, in call
return self._partial(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/altair/utils/data.py", line 149, in to_values
data = sanitize_dataframe(data)
File "/usr/local/lib/python3.8/dist-packages/altair/utils/core.py", line 283, in sanitize_dataframe
for col_name, dtype in df.dtypes.iteritems():
File "/home/hangyin_umass_edu/.local/lib/python3.8/site-packages/pandas/core/generic.py", line 5989, in getattr
return object.getattribute(self, name)
AttributeError: 'Series' object has no attribute 'iteritems'
The text was updated successfully, but these errors were encountered: