-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/36796/salisbury new rules #127
Conversation
process_variants(genotype, variant) if positive_record?(genotype) && variant.present? | ||
genotypes.append(genotype) unless test_string.scan(CONFIRM_SEQ_NGS).size.positive? && gene.blank? | ||
def extract_gene_row(genotype, record) | ||
gene = extract_genes(%w[test genotype moleculartestingtype], record) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is moleculartestingtype being used as well here? I can't see it in the rules but please show it to me if I have missed something!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is to capture those recordsin the 'PALB2 data only' and equivalent testing type, Shilpi found they don't always specify PALB2 in the two other fields.
if [2, 10].include? status | ||
assign_variantpathclass_record(genotype_new) | ||
variant = record['genotype'] | ||
process_variants(genotype_new, variant) if positive_record?(genotype_new) && variant.present? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need "if positive_record?" if its in the loop only including statuses 2 and 10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No you're right..not needed..removed in latest commit
if [2, 10].include? status | ||
assign_variantpathclass_record(genotype_new) | ||
variant = record['genotype'] | ||
process_variants(genotype_new, variant) if positive_record?(genotype_new) && variant.present? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to use 'if positive_record' here? Does that mean we are missing out on capturing variants with test status of 10?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look at "positive record?" (line 263) it includes those with test status 10 - so maybe the name just needs to be changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I accidentally looked at the method removed instead of the new one. Same comment as Laura's then :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the method in latest commit.
if [2, 10].include? status | ||
assign_variantpathclass_record(genotype_new) | ||
variant = record['genotype'] | ||
process_variants(genotype_new, variant) if positive_record?(genotype_new) && variant.present? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you know you are matching the variant with the correct gene here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its now fixed in latest commit.
genotype_dup = genotype_new.dup | ||
gene = var&.scan(BRCA_REGEX)&.flatten&.uniq | ||
if gene.present? | ||
genotype_dup.add_gene(gene[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to try and ensure we keep the structure of the database if there happened to be two variants in the same gene written e.g. "BRCA1 c123A>C; BRCA1 c456G>A"? - this would ideally need to create one record in genetic_test_results which two child records in genetic_sequence_variants, rather than two BRCA1 records
As discussed, this might be a wider problem in the importers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with this after investigations into persister functioning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good :-)
[like] GOEL, Shilpi (NHS ENGLAND - X26) reacted to your message:
…________________________________
From: NImeson ***@***.***>
Sent: Wednesday, November 20, 2024 2:30:23 PM
To: NHSDigital/data_management_system ***@***.***>
Cc: GOEL, Shilpi (NHS ENGLAND - X26) ***@***.***>; Assign ***@***.***>
Subject: Re: [NHSDigital/data_management_system] Feature/36796/salisbury new rules (PR #127)
This message originated from outside of NHSmail. Please do not click links or open attachments unless you recognise the sender and know the content is safe.
@NImeson approved this pull request.
Looks good :-)
—
Reply to this email directly, view it on GitHub<#127 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATZXVNU6B7R6DXJJI5UU6632BSMH7AVCNFSM6AAAAABRK4UHQWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDINBYG44TANZRGA>.
You are receiving this because you were assigned.Message ID: ***@***.***>
************************************************************************************** ******************************
This message may contain confidential information. If you are not the intended recipient please:
i) inform the sender that you have received the message in error before deleting it; and
ii) do not disclose, copy or distribute information in this e-mail or take any action in relation to its content (to do so is strictly prohibited and may be unlawful).
Thank you for your co-operation.
NHSmail is the secure email, collaboration and directory service available for all NHS staff in England. NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and other accredited email services.
For more information and to find out how you can switch visit Joining NHSmail – NHSmail Support<https://support.nhs.net/article-categories/joining-nhsmail/>
|
assign_variantpathclass_record(genotype_new) | ||
variant = record['genotype'] | ||
if variant.present? | ||
if variant.scan(CDNA_REGEX).size > 1 || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be if (variant.scan(CDNA_REGEX).size + variant.scan(EXON_VARIANT_REGEX).size) >1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes @lauramccluskey1 good point, have now fixed it in 9f1ea0e
end | ||
|
||
def handle_variant_record(genotype_new, record, genotypes) | ||
assign_variantpathclass_record(genotype_new) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can the variantpathclass be handled before assigning the variant? What happens in the case of multiple variants?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lauramccluskey1 , As per rules variantpathclass is assigned based on 'status' of record and not variant. For multivariants we will be duplicating genotype object and each having variantpathclass depending on status of raw_record and then capturing the variant present in it. Also to note this method gets called only for teststatus 2 and 10 records.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lauramccluskey1 @NImeson committed updated rule as discussed in d5f8aa5, Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix looks fine :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with recent changes
Thanks for making the changes- all looks good to me now |
What?
Need to update the Salisbury importer code to reflect the new rules to resolve JIRA-2029
Why?
Salisbury has got new gene panels for rules have been added and updated. We also have to accommodate old row level data so whole importer has to be written new way.
How?
We have grouped the Salisbury records for same SRI and treated them row level, panel level or hybrid level as per the rules.
Testing?
Tests have been added and Nichola has signed off QA as the counts match.