Skip to content
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

Use target bed files as regions instead of bait intervals for SNV calling in WES samples #636

Merged
merged 6 commits into from
Oct 25, 2024

Conversation

ramprasadn
Copy link
Collaborator

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/raredisease branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Ensure the test suite passes (nextflow run . -profile test_one_sample,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

Copy link

github-actions bot commented Oct 18, 2024

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 3df34f8

+| ✅ 200 tests passed       |+
#| ❔   7 tests were ignored |#
!| ❗   2 tests had warnings |!

❗ Test warnings:

❔ Tests ignored:

  • files_exist - File is ignored: conf/modules.config
  • files_unchanged - File ignored due to lint config: .github/CONTRIBUTING.md
  • files_unchanged - File ignored due to lint config: .github/PULL_REQUEST_TEMPLATE.md
  • files_unchanged - File ignored due to lint config: assets/nf-core-raredisease_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-raredisease_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-raredisease_logo_dark.png
  • modules_config - modules_config

✅ Tests passed:

Run details

  • nf-core/tools version 3.0.2
  • Run at 2024-10-22 17:04:23

@ramprasadn ramprasadn marked this pull request as ready for review October 18, 2024 08:06
@jemten
Copy link
Collaborator

jemten commented Oct 20, 2024

I tried running a test case and the bed file presented to deepvariant can't be bgzipped.

I1018 19:16:53.355009 139642998064960 genomics_reader.py:222] Reading ADM997A3_sorted_md.bam with NativeSamReader
I1018 19:16:53.406375 139642998064960 make_examples_core.py:301] Task 18/36: Preparing inputs
I1018 19:16:53.513127 139642998064960 genomics_reader.py:222] Reading ADM997A3_sorted_md.bam with NativeSamReader
I1018 19:16:53.529938 139642998064960 make_examples_core.py:301] Task 18/36: Common contigs are ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', 'X', 'Y', 'MT']
Traceback (most recent call last):
  File "/home/proj/stage/analysis/cases/cleanshrimp/work/Bazel.runfiles_h0i4nyq0/runfiles/com_google_deepvariant/deepvariant/make_examples.py", line 234, in <module>
    app.run(main)
  File "/home/proj/stage/analysis/cases/cleanshrimp/work/Bazel.runfiles_h0i4nyq0/runfiles/absl_py/absl/app.py", line 312, in run
    _run_main(main, args)
  File "/home/proj/stage/analysis/cases/cleanshrimp/work/Bazel.runfiles_h0i4nyq0/runfiles/absl_py/absl/app.py", line 258, in _run_main
    sys.exit(main(argv))
  File "/home/proj/stage/analysis/cases/cleanshrimp/work/Bazel.runfiles_h0i4nyq0/runfiles/com_google_deepvariant/deepvariant/make_examples.py", line 224, in main
    make_examples_core.make_examples_runner(options)
  File "/home/proj/stage/analysis/cases/cleanshrimp/work/Bazel.runfiles_h0i4nyq0/runfiles/com_google_deepvariant/deepvariant/make_examples_core.py", line 2739, in make_examples_runner
    regions, calling_regions = processing_regions_from_options(options)
  File "/home/proj/stage/analysis/cases/cleanshrimp/work/Bazel.runfiles_h0i4nyq0/runfiles/com_google_deepvariant/deepvariant/make_examples_core.py", line 2641, in processing_regions_from_options
    calling_regions = build_calling_regions(
  File "/home/proj/stage/analysis/cases/cleanshrimp/work/Bazel.runfiles_h0i4nyq0/runfiles/com_google_deepvariant/deepvariant/make_examples_core.py", line 607, in build_calling_regions
    ranges.RangeSet.from_regions(regions_to_include, contig_dict)
  File "/home/proj/stage/analysis/cases/cleanshrimp/work/Bazel.runfiles_h0i4nyq0/runfiles/com_google_deepvariant/third_party/nucleus/util/ranges.py", line 170, in from_regions
    return cls(ranges=from_regions(regions, contig_map=contig_map))
  File "/home/proj/stage/analysis/cases/cleanshrimp/work/Bazel.runfiles_h0i4nyq0/runfiles/com_google_deepvariant/third_party/nucleus/util/ranges.py", line 117, in __init__
    for i, range_ in enumerate(ranges):
  File "/home/proj/stage/analysis/cases/cleanshrimp/work/Bazel.runfiles_h0i4nyq0/runfiles/co
m_google_deepvariant/third_party/nucleus/util/ranges.py", line 509, in from_regions
    yield parse_literal(region, contig_map)
  File "/home/proj/stage/analysis/cases/cleanshrimp/work/Bazel.runfiles_h0i4nyq0/runfiles/com_google_deepvariant/third_party/nucleus/util/ranges.py", line 597, in parse_literal
    raise ValueError(
ValueError: Could not parse "home.bed.gz" as a region literal.  Region literals should have the form "chr:start-stop" or "chr:start" or just "chr".  A common error is to use the "chr" prefix on inputs that don't have it, or vice-versa.
```
We can use `ch_target_bed_unprocessed` or we have to decompress the bed file again prior to deepvariant. 

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@jemten jemten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ramprasadn ramprasadn merged commit 31249da into dev Oct 25, 2024
8 checks passed
@ramprasadn ramprasadn deleted the targetbedtodeepvariant branch October 31, 2024 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some SNV genome variants were found outside of --target_bed file with --bait_padding
2 participants