Skip to content

Commit

Permalink
Update run_deepvariant with savedmodel paths
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 570145106
  • Loading branch information
kishwarshafin authored and copybara-github committed Oct 2, 2023
1 parent 53f48c9 commit d05b868
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ ADD https://storage.googleapis.com/deepvariant/models/DeepVariant/${VERSION}/rc1
ADD https://storage.googleapis.com/deepvariant/models/DeepVariant/${VERSION}/rc1_savedmodels/deepvariant.pacbio.rc1.savedmodel/variables/variables.index .
RUN chmod +r /opt/models/pacbio/*

WORKDIR /opt/models/hybrid
WORKDIR /opt/models/hybrid_pacbio_illumina
ADD https://storage.googleapis.com/deepvariant/models/DeepVariant/${VERSION}/rc1_savedmodels/deepvariant.hybrid.rc1.savedmodel/fingerprint.pb .
ADD https://storage.googleapis.com/deepvariant/models/DeepVariant/${VERSION}/rc1_savedmodels/deepvariant.hybrid.rc1.savedmodel/saved_model.pb .
ADD https://storage.googleapis.com/deepvariant/models/DeepVariant/${VERSION}/rc1_savedmodels/deepvariant.hybrid.rc1.savedmodel/example_info.json .
WORKDIR /opt/models/hybrid/variables
WORKDIR /opt/models/hybrid_pacbio_illumina/variables
ADD https://storage.googleapis.com/deepvariant/models/DeepVariant/${VERSION}/rc1_savedmodels/deepvariant.hybrid.rc1.savedmodel/variables/variables.data-00000-of-00001 .
ADD https://storage.googleapis.com/deepvariant/models/DeepVariant/${VERSION}/rc1_savedmodels/deepvariant.hybrid.rc1.savedmodel/variables/variables.index .
RUN chmod +r /opt/models/hybrid/*
RUN chmod +r /opt/models/hybrid_pacbio_illumina/*

WORKDIR /opt/models/ont_r104
ADD https://storage.googleapis.com/deepvariant/models/DeepVariant/${VERSION}/rc1_savedmodels/deepvariant.ont.rc1.savedmodel/fingerprint.pb .
Expand Down
12 changes: 6 additions & 6 deletions deepvariant/scripts/run_deepvariant.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,16 @@


MODEL_TYPE_MAP = {
'WGS': '/opt/models/wgs/model.ckpt',
'WES': '/opt/models/wes/model.ckpt',
'PACBIO': '/opt/models/pacbio/model.ckpt',
'ONT_R104': '/opt/models/ont_r104/model.ckpt',
'HYBRID_PACBIO_ILLUMINA': '/opt/models/hybrid_pacbio_illumina/model.ckpt',
'WGS': '/opt/models/wgs',
'WES': '/opt/models/wes',
'PACBIO': '/opt/models/pacbio',
'ONT_R104': '/opt/models/ont_r104',
'HYBRID_PACBIO_ILLUMINA': '/opt/models/hybrid_pacbio_illumina',
}

# Current release version of DeepVariant.
# Should be the same in dv_vcf_constants.py.
DEEP_VARIANT_VERSION = '1.5.0'
DEEP_VARIANT_VERSION = '1.6.0'


def _is_quoted(value):
Expand Down
10 changes: 5 additions & 5 deletions deepvariant/scripts/run_deepvariant_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_basic_commands(self, model_type, use_slim_model):
'--outfile '
'"/tmp/deepvariant_tmp_output/call_variants_output.tfrecord.gz" '
'--examples "/tmp/deepvariant_tmp_output/[email protected]" '
'--checkpoint "/opt/models/{}/model.ckpt"'.format(
'--checkpoint "/opt/models/{}"'.format(
call_variants_bin, model_type.lower()
),
)
Expand Down Expand Up @@ -156,7 +156,7 @@ def test_pacbio_basic_commands(self):
' "/tmp/deepvariant_tmp_output/call_variants_output.tfrecord.gz"'
' --examples'
' "/tmp/deepvariant_tmp_output/[email protected]"'
' --checkpoint "/opt/models/pacbio/model.ckpt"'
' --checkpoint "/opt/models/pacbio"'
),
)
self.assertEqual(
Expand Down Expand Up @@ -222,7 +222,7 @@ def test_ont_basic_commands(self):
' "/tmp/deepvariant_tmp_output/call_variants_output.tfrecord.gz"'
' --examples'
' "/tmp/deepvariant_tmp_output/[email protected]"'
' --checkpoint "/opt/models/ont_r104/model.ckpt"'
' --checkpoint "/opt/models/ont_r104"'
),
)
self.assertEqual(
Expand Down Expand Up @@ -275,7 +275,7 @@ def test_sample_name_command(self, sample_name):
' "/tmp/deepvariant_tmp_output/call_variants_output.tfrecord.gz"'
' --examples'
' "/tmp/deepvariant_tmp_output/[email protected]"'
' --checkpoint "/opt/models/wgs/model.ckpt"'
' --checkpoint "/opt/models/wgs"'
),
)
self.assertEqual(
Expand Down Expand Up @@ -677,7 +677,7 @@ def test_call_variants_extra_args(
'--outfile '
'"/tmp/deepvariant_tmp_output/call_variants_output.tfrecord.gz" '
'--examples "/tmp/deepvariant_tmp_output/[email protected]" '
'--checkpoint "/opt/models/wgs/model.ckpt" '
'--checkpoint "/opt/models/wgs" '
'%s' % expected_args,
)

Expand Down

0 comments on commit d05b868

Please sign in to comment.