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

Feature/rmh brca #67

Merged
merged 15 commits into from
Feb 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions lib/import/brca/providers/royal_marsden/royal_marsden_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class RoyalMarsdenHandler < Import::Germline::ProviderHandler
TEST_TYPE_MAP = { 'affected' => :diagnostic,
'unaffected' => :predictive }.freeze
# 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
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
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
Collaborator 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

CDNA_REGEX_NOPROT = /c\.(?<cdna>.+)/i
DEL_DUP_REGEX = /(?<deldup>Deletion|Duplication)\s(ex|exon)s?\s?
(?<exon>\d+([a-z -]+\d+)?)|
(exon|ex)s?\s?(?<exon>\d+([a-z -]+\d+)?)\s?
Expand Down Expand Up @@ -88,7 +88,6 @@ def process_varpathclass(genotype, record)
@logger.debug 'NO VARIANT PATHCLASS DETECTED'
return
end


varpathclass = record.raw_fields['variantpathclass'].downcase.strip
# unless record.raw_fields['variantpathclass'].nil?
Expand All @@ -103,13 +102,8 @@ def process_teststatus(genotype, record)
@logger.debug 'UNABLE TO DETERMINE TESTSTATUS'
return
end
nonpathvarclass = nil
teststatus = record.raw_fields['teststatus']
if record.raw_fields['variantpathclass'].nil?
nonpathvarclass = nil
else
nonpathvarclass = record.raw_fields['variantpathclass'].downcase.strip
end
nonpathvarclass = record.raw_fields['variantpathclass']&.downcase&.strip
# unless record.raw_fields['teststatus'].nil?
process_assign_teststatus(genotype, teststatus, nonpathvarclass)
end
Expand Down Expand Up @@ -195,8 +189,8 @@ def borderline_test?(teststatus)
end

def non_pathogenic_variant_test?(teststatus, nonpathvarclass)
/non-pathogenic\svariant\sdetected/i.match(teststatus) ||
NON_PATH_VARIANT_CLASS[nonpathvarclass]
/non-pathogenic\svariant\sdetected/i.match(teststatus) ||
NON_PATH_VARIANT_CLASS[nonpathvarclass]
end
end
end
Expand Down
Loading