google / deepvariant

DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data.
BSD 3-Clause "New" or "Revised" License
3.25k stars 728 forks source link

Running DeepVariant on BQSR samples #908

Open FriederikeHanssen opened 1 week ago

FriederikeHanssen commented 1 week ago

Have you checked the FAQ? https://github.com/google/deepvariant/blob/r1.6.1/docs/FAQ.md:

Describe the issue:

I am trying to add the flags --parse_sam_aux_fields=true --use_original_quality_scores=true when samples were recalibrated: https://github.com/nf-core/sarek/pull/1733/files

which resolves too:

    /opt/deepvariant/bin/run_deepvariant \
        --ref=genome.fasta \
        --reads=test.paired_end.sorted.cram \
        --output_vcf=test.deepvariant.vcf.gz \
        --output_gvcf=test.deepvariant.g.vcf.gz \
        --model_type=WES --call_variants_extra_args '--parse_sam_aux_fields=true,--use_original_quality_scores=true' \
         \
         \
        --intermediate_results_dir=tmp \
        --num_shards=4

However when I run this, it throws:

***** Running the command:*****
    time /opt/deepvariant/bin/call_variants --outfile "tmp/call_variants_output.tfrecord.gz" --examples "tmp/make_examples.tfrecord@4.gz" --checkpoint "/opt/models/wes" --parse_sam_aux_fields --use_original_quality_scores

    /usr/local/lib/python3.8/dist-packages/tensorflow_addons/utils/tfa_eol_msg.py:23: UserWarning: 

    TensorFlow Addons (TFA) has ended development and introduction of new features.
    TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024.
    Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community (e.g. Keras, Keras-CV, and Keras-NLP). 

    For more information see: https://github.com/tensorflow/addons/issues/2807 

      warnings.warn(
    FATAL Flags parsing error: Unknown command line flag 'parse_sam_aux_fields'
    Pass --helpshort or --helpfull to see help on flags.

Setup

Steps to reproduce:

nf-test test --verbose tests/variant_calling_deepvariant.nf.test --profile "+docker"

or

nextflow run FriederikeHanssen/sarek -r issue_682 -profile test,docker \
--fasta https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.fasta \
--fasta_fai https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.fasta.fai \
--intervals https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.bed \
--input "${projectDir}/tests/csv/3.0/mapped_single_cram.csv" \
--nucleotides_per_second 20 \
--step variant_calling \
--tools deepvariant \
--wes true \
--outdir ./results

Does the quick start test work on your system? Please test with https://github.com/google/deepvariant/blob/r1.6/docs/deepvariant-quick-start.md. Is there any way to reproduce the issue by using the quick start?

Any additional context:

akolesnikov commented 1 week ago

Hi @FriederikeHanssen,

The problem here is that parse_sam_aux_fields flag is added to --call_variants_extra_args. This flag should be applied to --make_examples_extra_args