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

πŸ‘¨β€πŸ”¬ Beta Workflow to Modify Ploidy #145

Merged
merged 11 commits into from
Oct 21, 2024

Conversation

migbro
Copy link
Collaborator

@migbro migbro commented Oct 17, 2024

Description

This started out as a research question for trisomy 21 in which we ran a version of this workflow for a collaborator to review. Since then, another collaborator has brought up a more general case of treating chr X as haploid when the sample is from a male. We achieve this by:

  • Using exiting cram nd GVCF as inputs
  • Subset cram on desired chomosome
  • Use a desired re-calling interval list to limit region calls to...
  • Added ploidy input

Fixes # https://d3b.atlassian.net/browse/BIXU-3785

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

  • Environment:
  • Test files:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have committed any related changes to the PR

@migbro migbro added enhancement New feature or request bix-dev This issue or pull request is bix-dev work labels Oct 17, 2024
@migbro migbro self-assigned this Oct 17, 2024
Comment on lines 13 to 25
- region: Specific region to pull, in format 'chr21' or 'chr3:1-1000'
- dbsnp_vcf: dbSNP vcf file
- dbsnp_idx: dbSNP vcf index file
- contamination: Precalculated contamination value. Providing the value here
will skip the run of VerifyBAMID and use the provided value as ground truth.
- contamination_sites_bed: .Bed file for markers used in this
analysis,format(chr\tpos-1\tpos\trefAllele\taltAllele)
- contamination_sites_mu: .mu matrix file of genotype matrix
- contamination_sites_ud: .UD matrix file from SVD result of genotype matrix
- re_calling_interval_list: Interval list to re-call
- wgs_evaluation_interval_list: Target intervals to restrict GVCF metric
analysis (for VariantCallingMetrics)
- sample_ploidy: If sample/interval is expected to not have ploidy=2, enter expected ploidy
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you just put a blurb at the top that highlights:

  • region
  • re_calling_interval_list
  • sample_ploidy

These are the three "active" inputs. It would be good to have an example like:

If you would like to recall trisomy 21, you would have:
- region = chr21
- sample_ploidy = 3
- re_calling_interval_list = the regions of chr21 that are expected to be ploidy = 3

- position: 2
shellQuote: false
valueFrom: >-
-wa -header | bgzip -c -@ 4 > $(inputs.output_basename).bed_intersect.vcf.gz
Copy link
Contributor

Choose a reason for hiding this comment

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

this can pipefail

input_cram: { type: File, secondaryFiles: ['.crai?'], doc: "cram file to convert",
inputBinding: { position: 2 } }
region: { type: 'string?', doc: "Specific region to pull, in format 'chr21' or 'chr3:1-1000'",
inputBinding: { position: 2 } }
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this positionally have to come after input_cram?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

technically it does, because the tie breaker of them both being position 2 is that I declared input cram first. However, that is a dangerous technicality, so I'll make it 1

Copy link
Contributor

@sickler-alex sickler-alex left a comment

Choose a reason for hiding this comment

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

Looks good. Holding off on approval until all of Dan's comments are addressed.

@migbro migbro requested a review from dmiller15 October 18, 2024 17:52
@migbro
Copy link
Collaborator Author

migbro commented Oct 18, 2024

@migbro
Copy link
Collaborator Author

migbro commented Oct 18, 2024

Copy link
Contributor

@dmiller15 dmiller15 left a comment

Choose a reason for hiding this comment

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

Nice work

@migbro migbro requested a review from sickler-alex October 21, 2024 13:28
@migbro migbro merged commit cded512 into master Oct 21, 2024
1 check passed
@migbro migbro deleted the feature/mb-add-ploidy branch October 21, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bix-dev This issue or pull request is bix-dev work enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants