Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ def classify_variant_pathogenicity(variantpathclass)
end

def classify_protein_impact
require 'pry'
case @value1
when /C1/
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ MBIS=$1
PROV='RR8'
IFS=$'\n'
for x in $(find $DIRPATH/$FILEPATH -path "*/$PROV/*" -type f \
\( -name "*BRCA*.pseudo" -o -type f -name "*Other*.pseudo" \) \
\( -name "*BRCA*.pseudo" -o -type f -iname "*Other*.pseudo" \) \
\( -path "*/202[5-9]/*" -o -path "*/203[0-9]/*" \) \
! -name "bede6d1385c0ae9db4fe61fe9b07d58f86e2dc60_24.11.2021 to 31.03.2025_BRCA_DATA__2021_11_24__to__2025_03_31_b.xlsx.pseudo")
do
Expand Down
3 changes: 2 additions & 1 deletion lib/import/colorectal/core/colorectal_handler_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ module Core
# Provides the handler appropriate for the dataformat from each center
class ColorectalHandlerMapping
HANDLER_MAPPING = {
'RR8' => Import::Colorectal::Providers::Leeds::LeedsHandlerColorectal,
'RR8_V1_PRE2025' => Import::Colorectal::Providers::Leeds::LeedsHandlerColorectalV1,
'RR8_V2_POST2025' => Import::Colorectal::Providers::Leeds::LeedsHandlerColorectalV2,
'RNZ' => Import::Colorectal::Providers::Salisbury::SalisburyHandlerColorectal,
'RTD' => Import::Colorectal::Providers::Newcastle::NewcastleHandlerColorectal,
'RX1' => Import::Colorectal::Providers::Nottingham::NottinghamHandlerColorectal,
Expand Down
25 changes: 19 additions & 6 deletions lib/import/colorectal/core/genocolorectal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ class Genocolorectal < Import::Germline::Genotype
#--------------------- Schema code mapping tables --------------------------

COLORECTAL_MAP = { 'APC' => 358,
'BAP1' => 517,
'BMPR1A' => 577,
'EPCAM' => 1432,
'TACSTD1' => 1432,
'TACSTD1' => 1432, #Old symbol for EPCAM
'FH' => 1590,
'FLCN' => 1603,
'MET' => 50,
'MLH1' => 2744,
'MSH2' => 2804,
'MSH3' => 2805,
'MSH6' => 2808,
'MUTYH' => 2850,
'PMS2' => 3394,
Expand All @@ -42,14 +47,21 @@ class Genocolorectal < Import::Germline::Genotype
'RAD51D' => 3616,
'VHL' => 83,
'ATM' => 451,
'SCG5' => 5092 }.freeze
'SCG5' => 5092,
'SDHB' => 68
}.freeze

COLORECTAL_REGEX = /(?<apc>APC)|
(?<bap1>BAP1)|
(?<bmpr>BMPR1A)|
(?<epcam>EPCAM)|
(?<tacstd1>TACSTD1)|
(?<tacstd1>TACSTD1)| #Old symbol for EPCAM
(?<fh>FH)|
(?<flcn>FLCN)|
(?<met>MET)|
(?<mlh1>MLH1)|
(?<msh2>MSH2)|
(?<msh3>MSH3)|
(?<msh6>MSH6)|
(?<mutyh>MUTYH)|
(?<pms2>PMS2)|
Expand All @@ -71,15 +83,16 @@ class Genocolorectal < Import::Germline::Genotype
(?<rad51d>RAD51D)|
(?<vhl>VHL) |
(?<atm>ATM) |
(?<scg5>SCG5)/ix # Added by Francesco
(?<scg5>SCG5)|
(?<sdhb>SDHB)/ix # Added by Francesco

# ------------------------ Interogators ------------------------------

def add_gene_colorectal(colorectal_input)
case colorectal_input
when Integer
if [1432, 358, 577, 2744, 2804, 2808, 2850, 3394, 7, 8, 79, 3186, 5019,
3408, 5000, 62, 72, 76, 1882, 3108, 794, 83, 5019, 451].include? colorectal_input
if [1432, 358, 517, 577, 2744, 2804, 2805, 2808, 2850, 3394, 7, 8, 79, 3186, 5019, 1603, 50, 68,
3408, 5000, 62, 72, 76, 1882, 3108, 794, 83, 5019, 451, 1590, 5092].include? colorectal_input

@attribute_map['gene'] = colorectal_input
@logger.debug "SUCCESSFUL gene parse for #{colorectal_input}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module Colorectal
module Providers
module Leeds
# rubocop:disable Metrics/ClassLength
# Leeds importer for colorectal
class LeedsHandlerColorectal < Import::Germline::ProviderHandler
# Leeds importer for colorectal (pre-2025 format)
class LeedsHandlerColorectalV1 < Import::Germline::ProviderHandler
include Import::Helpers::Colorectal::Providers::Rr8::Constants

def initialize(batch)
Expand Down Expand Up @@ -53,6 +53,9 @@ def populate_and_persist_genotype(record)
add_varclass
add_organisationcode_testresult(genocolorectal)
res = process_variants_from_record(genocolorectal, record)
# correcting ebatch provider and registry to RR8 (from RR8_V1_PRE2025) to allow data to persist in the database
@batch.provider = 'RR8'
@batch.registryid = 'RR8'
res.map { |cur_genotype| @persister.integrate_and_store(cur_genotype) }
end

Expand Down
Loading
Loading