Skip to content

Feature/rmh brca#67

Merged
lauramccluskey1 merged 15 commits into
developfrom
feature/RMH_brca
Feb 28, 2024
Merged

Feature/rmh brca#67
lauramccluskey1 merged 15 commits into
developfrom
feature/RMH_brca

Conversation

@lauramccluskey1

Copy link
Copy Markdown
Contributor

Planio ticket 35297. Updating the Royal Marsden importer to include test status 10.

Variants counts sent as part of QA, and they match the manual counts.

@bshand

bshand commented Feb 20, 2024

Copy link
Copy Markdown
Contributor

The bundle audit errors are addressed in #64 which is still awaiting review.


nonpathvarclass = nil
teststatus = record.raw_fields['teststatus']
if record.raw_fields['variantpathclass'].nil?

@kenny-lee-1 kenny-lee-1 Feb 20, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you can use safe navigation here

replace

if record.raw_fields['variantpathclass'].nil?
  nonpathvarclass = nil
  else
  nonpathvarclass = record.raw_fields['variantpathclass'].downcase.strip
end

with

nonpathvarclass = record.raw_fields['variantpathclass']&.downcase&.strip

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changes made in commit 1c81ce7. I checked that the variant counts still match.

# rubocop:disable Lint/MixedRegexpCaptureTypes
CDNA_REGEX_PROT = /c\.(?<cdna>.+)(?=(?<separtors>_|;.)p\.(?<impact>.+))/i.freeze
CDNA_REGEX_NOPROT = /c\.(?<cdna>.+)/i.freeze
CDNA_REGEX_PROT = /c\.(?<cdna>.+)(?=(?<separtors>_|;.)p\.(?<impact>.+))/i

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is that supposed to be separtors ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@lauramccluskey1 should this be separators?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See commit a7f7fa0- tested and counts are still the same

assert_equal 1, @genotype.attribute_map['teststatus']

non_path_record = build_raw_record('pseudo_id1' => 'bob')
non_path_record.raw_fields['teststatus'] = 'Ex del'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can raw_fields be passed to the build_raw_record method, eg:

broken_record = build_raw_record('pseudo_id1' => 'bob', raw_fields: { 'teststatus' => 'Ex del' } )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion @ollietulloch ! I have tried that and it doesn't work- I think its because build new record adds the test status field by loading the rawtext_clinical_json. So that needs to be loaded first then we can update the test status afterwards. Let me know if there is another way!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah ok, perhaps something for a future PR. It'd be nice for build_raw_record to be able to popluate raw_fields

@bshand

bshand commented Feb 27, 2024

Copy link
Copy Markdown
Contributor

Further bundle audit errors are addressed in PR #68.

@lauramccluskey1 lauramccluskey1 merged commit 50e196d into develop Feb 28, 2024
@lauramccluskey1 lauramccluskey1 deleted the feature/RMH_brca branch February 28, 2024 11:43
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.

4 participants