From e17b068ebe2f57b23bdc6804b6f69960f8af5efe Mon Sep 17 00:00:00 2001 From: Marina Gourtovaia Date: Fri, 13 Oct 2023 09:21:34 +0100 Subject: [PATCH 01/10] Removed listing of deleted files from MANIFEST --- MANIFEST | 3 --- 1 file changed, 3 deletions(-) diff --git a/MANIFEST b/MANIFEST index b941a6db..3c74d716 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,3 @@ -.github/workflows/testing_and_building_repos.yml bin/gtck_combine_gt_data.sh bin/gtck_extract_fluidigm_data_from_irods.sh bin/gtck_genplexlist.sh @@ -168,9 +167,7 @@ lib/npg_qc/utils/genotype_calling.pm MANIFEST README scripts/before_install.sh -scripts/install.sh scripts/npgqc_dbix_schema_loader.pl -scripts/script.sh t/00-critic.t t/00-distribution.t t/00-podcoverage.t From 4557d75f5a9beee25dcbd250f6df0b084f3dcf1c Mon Sep 17 00:00:00 2001 From: Marina Gourtovaia Date: Fri, 13 Oct 2023 09:25:08 +0100 Subject: [PATCH 02/10] Removed redundant CI script. --- .github/workflows/run-tests.yml | 1 - MANIFEST | 1 - scripts/before_install.sh | 8 -------- t/autoqc_util.pm | 4 ++-- 4 files changed, 2 insertions(+), 12 deletions(-) delete mode 100755 scripts/before_install.sh diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2962c4b8..c378dcb0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -93,7 +93,6 @@ jobs: - name: "NPM" run: | mkdir -p "$NPM_CONFIG_PREFIX" - ${GITHUB_WORKSPACE}/scripts/before_install.sh - name: "Install Perl dependencies" run: | diff --git a/MANIFEST b/MANIFEST index 3c74d716..6ac8f04b 100644 --- a/MANIFEST +++ b/MANIFEST @@ -166,7 +166,6 @@ lib/npg_qc/utils/bam_genotype.pm lib/npg_qc/utils/genotype_calling.pm MANIFEST README -scripts/before_install.sh scripts/npgqc_dbix_schema_loader.pl t/00-critic.t t/00-distribution.t diff --git a/scripts/before_install.sh b/scripts/before_install.sh deleted file mode 100755 index c0d3713e..00000000 --- a/scripts/before_install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -set -e -x -u - -# Dummy executable files generated for tests use #!/usr/local/bin/bash -sudo mkdir -p /usr/local/bin -sudo ln -s /bin/bash /usr/local/bin/bash -/usr/local/bin/bash --version diff --git a/t/autoqc_util.pm b/t/autoqc_util.pm index ad20a362..4777c6d5 100644 --- a/t/autoqc_util.pm +++ b/t/autoqc_util.pm @@ -77,7 +77,7 @@ sub write_seqtk_script { my $fh; open($fh, '>', $script_path) or croak "Cannot open $script_path for writing"; - print $fh '#!/usr/local/bin/bash'; + print $fh '#!/usr/bin/env bash'; print $fh "\n"; print $fh '# Script to fake seqtk in testing. Automatically generated by npg at ' . time; print $fh "\n"; @@ -108,7 +108,7 @@ sub write_bwa_script { my $fh; open($fh, '>', $script_path) or croak "Cannot open $script_path for writing"; - print $fh '#!/usr/local/bin/bash'; + print $fh '#!/usr/bin/env bash'; print $fh "\n"; print $fh '# Script to fake BWA tool in testing. Automatically generated by npg at ' . time; print $fh "\n"; From 4f2c26a184423532135a9bb003a01a4b2680e4ca Mon Sep 17 00:00:00 2001 From: Marina Gourtovaia Date: Fri, 13 Oct 2023 11:18:14 +0100 Subject: [PATCH 03/10] Consistent indentation using two spaces --- lib/npg_qc/autoqc/checks/genotype.pm | 691 +++++++++++++-------------- 1 file changed, 345 insertions(+), 346 deletions(-) diff --git a/lib/npg_qc/autoqc/checks/genotype.pm b/lib/npg_qc/autoqc/checks/genotype.pm index 3efb01e8..f2d19ff9 100644 --- a/lib/npg_qc/autoqc/checks/genotype.pm +++ b/lib/npg_qc/autoqc/checks/genotype.pm @@ -45,11 +45,11 @@ has '+file_type' => (default => $EXT,); has '+aligner' => (default => 'fasta',); has 'irods' =>( - is => 'ro', - isa => 'WTSI::NPG::iRODS', - required => 1, - lazy => 1, - builder => '_build_irods', + is => 'ro', + isa => 'WTSI::NPG::iRODS', + required => 1, + lazy => 1, + builder => '_build_irods', ); sub _build_irods { return WTSI::NPG::iRODS->new(); @@ -57,241 +57,241 @@ sub _build_irods { # you can override the executable name. May be useful for variants like "samtools_irods" has 'samtools_name' => ( - is => 'ro', - isa => 'Str', - default => $SAMTOOLS_NAME, + is => 'ro', + isa => 'Str', + default => $SAMTOOLS_NAME, ); has 'samtools' => ( - is => 'ro', - isa => 'NpgCommonResolvedPathExecutable', - lazy_build => 1, - coerce => 1, + is => 'ro', + isa => 'NpgCommonResolvedPathExecutable', + lazy_build => 1, + coerce => 1, ); sub _build_samtools { - my ($self) = @_; - return $self->samtools_name; + my ($self) = @_; + return $self->samtools_name; } # you can override the executable name. May be useful for variants like "samtools_irods" has 'bcftools_name' => ( - is => 'ro', - isa => 'Str', - default => $BCFTOOLS_NAME, + is => 'ro', + isa => 'Str', + default => $BCFTOOLS_NAME, ); has 'bcftools' => ( - is => 'ro', - isa => 'NpgCommonResolvedPathExecutable', - lazy_build => 1, - coerce => 1, + is => 'ro', + isa => 'NpgCommonResolvedPathExecutable', + lazy_build => 1, + coerce => 1, ); sub _build_bcftools { - my ($self) = @_; - return $self->bcftools_name; + my ($self) = @_; + return $self->bcftools_name; } # sequenom_plex - this specifies the source of the genotype data has 'sequenom_plex' => ( - is => 'ro', - isa => 'Str', + is => 'ro', + isa => 'Str', writer => '_set_sequenom_plex', - default => $DEFAULT_QC_PLEX, + default => $DEFAULT_QC_PLEX, ); # snp_call_set - this specifies the set of loci to be called. This may be # the same for different sequenom_plex data sets. It is used to construct # the name of some information files (positions, alleles, etc) has 'snp_call_set' => ( - is => 'ro', - isa => 'Str', + is => 'ro', + isa => 'Str', writer => '_set_snp_call_set', - default => $DEFAULT_SNP_CALL_SET, + default => $DEFAULT_SNP_CALL_SET, ); has 'aix_file' => ( - is => 'ro', - isa => 'Str', - lazy_build => 1, + is => 'ro', + isa => 'Str', + lazy_build => 1, ); sub _build_aix_file { - my $self = shift; - return $self->gt_db . q{.aix}; + my $self = shift; + return $self->gt_db . q{.aix}; } has 'gt_db' => ( - is => 'ro', - isa => 'Str', + is => 'ro', + isa => 'Str', writer => '_set_gt_db', - lazy_build => 1, + lazy_build => 1, ); sub _build_gt_db { - my $self = shift; - return catfile($self->genotypes_repository, $self->gt_db_base); + my $self = shift; + return catfile($self->genotypes_repository, $self->gt_db_base); } has 'gt_db_base' => ( - is => 'ro', - isa => 'Str', - lazy_build => 1, + is => 'ro', + isa => 'Str', + lazy_build => 1, ); sub _build_gt_db_base { - my $self = shift; - return sprintf q[%s_%s], $self->sequenom_plex, ${GENOTYPE_DATA}; + my $self = shift; + return sprintf q[%s_%s], $self->sequenom_plex, ${GENOTYPE_DATA}; } has 'reliable_read_depth' => ( - is => 'ro', - isa => 'NpgTrackingNonNegativeInt', - default => $DEFAULT_RELIABLE_READ_DEPTH, + is => 'ro', + isa => 'NpgTrackingNonNegativeInt', + default => $DEFAULT_RELIABLE_READ_DEPTH, ); has 'poss_dup_level' => ( - is => 'ro', - isa => 'NpgTrackingNonNegativeInt', - default => $DEFAULT_POSS_DUP_LEVEL, + is => 'ro', + isa => 'NpgTrackingNonNegativeInt', + default => $DEFAULT_POSS_DUP_LEVEL, ); has 'min_sample_call_rate' => ( - is => 'ro', - isa => 'NpgTrackingNonNegativeInt', - default => $DEFAULT_MIN_SAMPLE_CALL_RATE, + is => 'ro', + isa => 'NpgTrackingNonNegativeInt', + default => $DEFAULT_MIN_SAMPLE_CALL_RATE, ); has 'gt_pack_cmd' => ( - is => 'ro', - isa => 'Str', - default => q{gt_pack}, + is => 'ro', + isa => 'Str', + default => q{gt_pack}, ); has 'gt_pack_flags' => ( - is => 'ro', - isa => 'Str', - lazy_build => 1, + is => 'ro', + isa => 'Str', + lazy_build => 1, ); sub _build_gt_pack_flags { - my ($self) = @_; + my ($self) = @_; - return q{ -o - -s 1 -f 1 -P } . $self->aix_file() . q{ }; + return q{ -o - -s 1 -f 1 -P } . $self->aix_file() . q{ }; } has 'gt_pack_args' => ( - is => 'ro', - isa => 'Str', - default => ' - ', + is => 'ro', + isa => 'Str', + default => ' - ', ); has 'find_gt_match_cmd' => ( - is => 'ro', - isa => 'Str', - default => q{find_gt_match}, + is => 'ro', + isa => 'Str', + default => q{find_gt_match}, ); has 'find_gt_match_flags' => ( - is => 'ro', - isa => 'Str', - lazy_build => 1, + is => 'ro', + isa => 'Str', + lazy_build => 1, ); sub _build_find_gt_match_flags { - my ($self) = @_; - return q{ -m } . $self->min_common_snps() . q{ -p -j -n "} . $self->sample_name . q{" -r } . $self->reliable_read_depth . q{ -d } . $self->poss_dup_level . q{ -s } . $self->min_sample_call_rate; + my ($self) = @_; + return q{ -m } . $self->min_common_snps() . q{ -p -j -n "} . $self->sample_name . q{" -r } . $self->reliable_read_depth . q{ -d } . $self->poss_dup_level . q{ -s } . $self->min_sample_call_rate; } has 'find_gt_match_args' => ( - is => 'ro', - isa => 'Str', - lazy_build => 1, + is => 'ro', + isa => 'Str', + lazy_build => 1, ); sub _build_find_gt_match_args { - my ($self) = @_; - return q{ - } . $self->gt_db(); + my ($self) = @_; + return q{ - } . $self->gt_db(); } has 'min_common_snps' => ( - is => 'ro', - isa => 'NpgTrackingNonNegativeInt', - default => $DEFAULT_MIN_COMMON_SNPS, + is => 'ro', + isa => 'NpgTrackingNonNegativeInt', + default => $DEFAULT_MIN_COMMON_SNPS, ); has 'sample_name' => ( - is => 'ro', - isa => 'Maybe[Str]', + is => 'ro', + isa => 'Maybe[Str]', writer => '_set_sample_name', - lazy_build => 1, + lazy_build => 1, ); sub _build_sample_name { - my ($self) = @_; + my ($self) = @_; - return $self->lims->sample_name; + return $self->lims->sample_name; } has 'reference_fasta' => ( - is => 'ro', - isa => 'Maybe[Str]', - required => 0, - lazy_build => 1, + is => 'ro', + isa => 'Maybe[Str]', + required => 0, + lazy_build => 1, ); sub _build_reference_fasta { - my ($self) = @_; + my ($self) = @_; my $href = { 'aligner' => $self->aligner, 'lims' => $self->lims, }; my $ref = $self->lims->gbs_plex_name ? - Moose::Meta::Class->create_anon_class( - roles => [qw/npg_tracking::data::gbs_plex::find/])->new_object($href)->refs->[0] : - $self->refs->[0]; + Moose::Meta::Class->create_anon_class( + roles => [qw/npg_tracking::data::gbs_plex::find/])->new_object($href)->refs->[0] : + $self->refs->[0]; return $ref; } has 'alignments_in_bam' => ( - is => 'ro', - isa => 'Maybe[Bool]', - lazy_build => 1, + is => 'ro', + isa => 'Maybe[Bool]', + lazy_build => 1, ); sub _build_alignments_in_bam { - my ($self) = @_; + my ($self) = @_; - return $self->lims->alignments_in_bam; + return $self->lims->alignments_in_bam; } has 'bam_file' => ( - is => 'ro', - isa => 'Str', - lazy_build => 1, + is => 'ro', + isa => 'Str', + lazy_build => 1, ); sub _build_bam_file { - my ($self) = @_; - return $self->input_files->[0]; + my ($self) = @_; + return $self->input_files->[0]; } has 'bam_file_md5' => ( - is => 'ro', - isa => 'Str', - lazy_build => 1, + is => 'ro', + isa => 'Str', + lazy_build => 1, ); sub _build_bam_file_md5 { - my ($self) = @_; - my $bam_file = $self->bam_file; - my $md5 = q{}; + my ($self) = @_; + my $bam_file = $self->bam_file; + my $md5 = q{}; - if($bam_file) { - my $md5_file = "${bam_file}.md5"; + if($bam_file) { + my $md5_file = "${bam_file}.md5"; - if(-r $md5_file) { - open my $f, '<', $md5_file or croak "$md5_file readable, but open fails"; + if(-r $md5_file) { + open my $f, '<', $md5_file or croak "$md5_file readable, but open fails"; - $md5 = <$f>; + $md5 = <$f>; - close $f or croak "Failed to close $md5_file"; - } - } + close $f or croak "Failed to close $md5_file"; + } + } - return $md5; + return $md5; } has 'input_files_md5' => ( - is => 'ro', - isa => 'Str', - lazy_build => 1, + is => 'ro', + isa => 'Str', + lazy_build => 1, ); sub _build_input_files_md5 { my ($self) = @_; @@ -300,35 +300,34 @@ sub _build_input_files_md5 { my @md5_vals = (); for my $input_file (@{$self->input_files}) { - $md5 = q{}; - if ($input_file =~ /^irods:/smx) { - my $irods_filename = substr $input_file, $IRODS_PREFIX_LEN_IS_THIS_READABLE_ENOUGH; # strip leading "irods:" - try { - my $data_obj = WTSI::NPG::iRODS::DataObject->new( - $self->irods, $irods_filename - ); - $md5 = $data_obj->checksum; - } catch { - my $msg = 'Unable to find md5 checksum for '. + $md5 = q{}; + if ($input_file =~ /^irods:/smx) { + my $irods_filename = substr $input_file, $IRODS_PREFIX_LEN_IS_THIS_READABLE_ENOUGH; # strip leading "irods:" + try { + $md5 = WTSI::NPG::iRODS::DataObject->new( + $self->irods, $irods_filename + )->checksum; + } catch { + my $msg = 'Unable to find md5 checksum for '. "iRODS file '$irods_filename': $_"; - carp($msg); - $md5 = '0000000000000000'; - } - } else { - my $md5_file = "${input_file}.md5"; - if(-r $md5_file) { - open my $f, '<', $md5_file or croak "$md5_file readable, but open fails"; - $md5 = <$f>; - chomp $md5; - close $f or croak "Failed to close $md5_file"; - } - if (! $md5) { - my $msg = "Unable to read md5 checksum from file '$md5_file'"; - carp($msg); - $md5 = '0000000000000000'; - } + carp($msg); + $md5 = '0000000000000000'; + } + } else { + my $md5_file = "${input_file}.md5"; + if(-r $md5_file) { + open my $f, '<', $md5_file or croak "$md5_file readable, but open fails"; + $md5 = <$f>; + chomp $md5; + close $f or croak "Failed to close $md5_file"; + } + if (! $md5) { + my $msg = "Unable to read md5 checksum from file '$md5_file'"; + carp($msg); + $md5 = '0000000000000000'; } - push @md5_vals, $md5; + } + push @md5_vals, $md5; } return join q[;], @md5_vals; @@ -338,27 +337,27 @@ sub _build_input_files_md5 { # pos_snpname_map_fn should be either specified at instantiation or implied by the Sequenom plex and reference genome ##################################################################################################################### has 'pos_snpname_map_fn' => ( - is => 'ro', - isa => 'NpgTrackingReadableFile', - lazy_build => 1, + is => 'ro', + isa => 'NpgTrackingReadableFile', + lazy_build => 1, ); sub _build_pos_snpname_map_fn { - my ($self) = @_; - my $genotypes_repository = $self->genotypes_repository; - my $reference = $self->reference_fasta; - my $ref_to_snppos_suffix_map = $self->_ref_to_snppos_suffix_map; + my ($self) = @_; + my $genotypes_repository = $self->genotypes_repository; + my $reference = $self->reference_fasta; + my $ref_to_snppos_suffix_map = $self->_ref_to_snppos_suffix_map; - my $chrconv_suffix = $ref_to_snppos_suffix_map->{basename($reference)}; + my $chrconv_suffix = $ref_to_snppos_suffix_map->{basename($reference)}; - if(!defined $reference || !defined $chrconv_suffix) { - return; - } + if(!defined $reference || !defined $chrconv_suffix) { + return; + } - my $fn = sprintf '%s_chrpos_snpname_map_%s.tsv', $self->snp_call_set, $chrconv_suffix; - my $pos_snpname_map_fn = catfile($genotypes_repository, $fn); + my $fn = sprintf '%s_chrpos_snpname_map_%s.tsv', $self->snp_call_set, $chrconv_suffix; + my $pos_snpname_map_fn = catfile($genotypes_repository, $fn); - return $pos_snpname_map_fn; + return $pos_snpname_map_fn; } ################################################################################################################## @@ -367,86 +366,86 @@ sub _build_pos_snpname_map_fn { # implied by the Sequenom plex and reference genome. ################################################################################################################## has 'chrname_conv_fn' => ( - is => 'ro', - isa => 'Str', - lazy_build => 1, + is => 'ro', + isa => 'Str', + lazy_build => 1, ); sub _build_chrname_conv_fn { - my ($self) = @_; - my $genotypes_repository = $self->genotypes_repository; + my ($self) = @_; + my $genotypes_repository = $self->genotypes_repository; - my $fn = $genotypes_repository . q[/chrconv_map_v2.json]; + my $fn = $genotypes_repository . q[/chrconv_map_v2.json]; - return $fn; + return $fn; } ############################################################################################## # report_aux_data tells bam_genotype to include read depth and genotype likelihood information ############################################################################################## has 'report_aux_data' => ( - is => 'ro', - isa => 'Bool', - default => 1, + is => 'ro', + isa => 'Bool', + default => 1, ); has 'bam_genotype' => ( - is => 'ro', - isa => 'npg_qc::utils::bam_genotype', - handles => { tsv_genotype => 'genotype', json_genotype => 'json_genotype', }, - lazy_build => 1, + is => 'ro', + isa => 'npg_qc::utils::bam_genotype', + handles => { tsv_genotype => 'genotype', json_genotype => 'json_genotype', }, + lazy_build => 1, ); sub _build_bam_genotype { - my ($self) = @_; + my ($self) = @_; - my %bg_params = (sample_name => $self->sample_name, plex => $self->sequenom_plex, reference => $self->reference_fasta, pos_snpname_map_filename => $self->pos_snpname_map_fn, report_aux_data => $self->report_aux_data, samtools_name => $self->samtools_name, bcftools => $self->bcftools, bcftools_name => $self->bcftools_name, ); + my %bg_params = (sample_name => $self->sample_name, plex => $self->sequenom_plex, reference => $self->reference_fasta, pos_snpname_map_filename => $self->pos_snpname_map_fn, report_aux_data => $self->report_aux_data, samtools_name => $self->samtools_name, bcftools => $self->bcftools, bcftools_name => $self->bcftools_name, ); - $bg_params{bam_file_list} = $self->input_files; + $bg_params{bam_file_list} = $self->input_files; - return npg_qc::utils::bam_genotype->new(%bg_params); + return npg_qc::utils::bam_genotype->new(%bg_params); } override 'can_run' => sub { - my $self = shift; - - if(!defined $self->sample_name) { - $self->result->add_comment('No sample name specified'); - return 0; - } - - if(!$self->alignments_in_bam) { - $self->result->add_comment('alignments_in_bam is false'); - return 0; - } - - if(!defined($self->reference_fasta) || (! -r $self->reference_fasta)) { - $self->result->add_comment('Reference genome missing or unreadable'); - return 0; - } - - # make sure that the bam file is aligned with one of the recognised human references - if(! any { $_ eq fileparse($self->reference_fasta); } (keys %{$self->_ref_to_snppos_suffix_map})) { - $self->result->add_comment('Specified reference genome may be non-human'); - return 0; - } - - return 1; + my $self = shift; + + if(!defined $self->sample_name) { + $self->result->add_comment('No sample name specified'); + return 0; + } + + if(!$self->alignments_in_bam) { + $self->result->add_comment('alignments_in_bam is false'); + return 0; + } + + if(!defined($self->reference_fasta) || (! -r $self->reference_fasta)) { + $self->result->add_comment('Reference genome missing or unreadable'); + return 0; + } + + # make sure that the bam file is aligned with one of the recognised human references + if(! any { $_ eq fileparse($self->reference_fasta); } (keys %{$self->_ref_to_snppos_suffix_map})) { + $self->result->add_comment('Specified reference genome may be non-human'); + return 0; + } + + return 1; }; override 'execute' => sub { - my ($self) = @_; + my ($self) = @_; - try { - super(); - } catch { - my $e = $_; - if(none {/\Airods:/smx} @{$self->input_files}) { # we might be given files from iRODS - croak $_; - } - }; + try { + super(); + } catch { + my $e = $_; + if(none {/\Airods:/smx} @{$self->input_files}) { # we might be given files from iRODS + croak $_; + } + }; - if(!$self->can_run()) { - return 1; - } + if(!$self->can_run()) { + return 1; + } # over-ride if geno_refset available if($self->geno_refset && !$self->lims->gbs_plex_name) { @@ -454,114 +453,114 @@ override 'execute' => sub { } # run check - my $gt_check_cmd = sprintf - q{set -o pipefail && printf "%s" | %s %s %s | %s %s %s}, - $self->tsv_genotype, - $self->gt_pack_cmd(), - $self->gt_pack_flags(), - $self->gt_pack_args, - $self->find_gt_match_cmd(), - $self->find_gt_match_flags(), - $self->find_gt_match_args() - ; - - open my $f, q{-|}, qw{bash -c}, qq{$gt_check_cmd} or croak 'Failed to execute check'; - - my $json_results = <$f>; - - close $f or croak 'Failed to close check'; - - if(!$json_results) { - croak 'No results from check'; - } - - my $result = from_json($json_results); - - my $gt_caller_info = $self->current_version($self->samtools); - $self->result->set_info('Caller', $self->samtools); - $self->result->set_info('Caller_version', $gt_caller_info); - - $self->result->genotype_data_set($result->{genotype_data_set}); - - $self->result->snp_call_set($self->snp_call_set); - - my $bam_file_leaves = join q[;], (map { basename($_); } @{$self->input_files}); - $self->result->bam_file($bam_file_leaves); # name of result attribute should probably be changed to reflect the possibility of more than one bam file; check qc db - - $self->result->bam_file_md5($self->input_files_md5); - - my $reference_leaf = fileparse($self->reference_fasta); - $self->result->reference($reference_leaf); - - $self->result->bam_call_count($self->json_genotype->{number_of_calls}); - - my $bam_call_string = join q{}, map { $_->{call}; } @{$self->json_genotype->{calls}}{sort keys %{$self->json_genotype->{calls}}}; - $self->result->bam_call_string($bam_call_string); - - my $bam_gt_depths_string = join q{;}, map { defined $_->{depth}? $_->{depth}: q{0}; } @{$self->json_genotype->{calls}}{sort keys %{$self->json_genotype->{calls}}}; - $self->result->bam_gt_depths_string($bam_gt_depths_string); - - my $bam_gt_likelihood_string = join q{;}, map { defined $_->{gt_pl}? $_->{gt_pl}: q{0}; } @{$self->json_genotype->{calls}}{sort keys %{$self->json_genotype->{calls}}}; - $self->result->bam_gt_likelihood_string($bam_gt_likelihood_string); - - $self->result->expected_sample_name($self->sample_name); - $self->result->search_parameters($result->{params}); - $self->result->sample_name_match((grep { $_->{match_type} eq 'SampleNameMatch'; } @{$result->{comp_results}})[0]); - $self->result->sample_name_relaxed_match((grep { $_->{match_type} eq 'RM_SampleNameMatch'; } @{$result->{comp_results}})[0]); - - my @high_concordant_pos_dups = grep { $_->{match_type} eq 'HIGHconcordantPosDupDnaDiff' and $_->{matched_sample_name} ne $self->sample_name; } @{$result->{comp_results}}; - @high_concordant_pos_dups = reverse sort { $a->{match_pct} <=> $b->{match_pct}; } @high_concordant_pos_dups; - my $top_idx; - $top_idx = _cap_range(\@high_concordant_pos_dups, $MAX_ALT_MATCHES); - if ($top_idx > 0) { - @high_concordant_pos_dups = @high_concordant_pos_dups[0..$top_idx]; - } - if(@high_concordant_pos_dups) { - $self->result->alternate_matches([@high_concordant_pos_dups]); - } - - $self->result->alternate_match_count(0); - if(defined $self->result->alternate_matches) { - $self->result->alternate_match_count(scalar @{$self->result->alternate_matches}); - } - - my @rm_high_concordant_pos_dups = grep { $_->{match_type} eq 'RM_HIGHconcordantPosDupDnaDiff' and $_->{matched_sample_name} ne $self->sample_name; } @{$result->{comp_results}}; - @rm_high_concordant_pos_dups = reverse sort { $a->{match_pct} <=> $b->{match_pct}; } @rm_high_concordant_pos_dups; - $top_idx = _cap_range(\@rm_high_concordant_pos_dups, $MAX_ALT_MATCHES); - if($top_idx > 0) { - @rm_high_concordant_pos_dups = @rm_high_concordant_pos_dups[0..$top_idx]; - } - if(@rm_high_concordant_pos_dups) { - $self->result->alternate_relaxed_matches([@rm_high_concordant_pos_dups]); - } - - $self->result->alternate_relaxed_match_count(0); - if(defined $self->result->alternate_relaxed_matches) { - $self->result->alternate_relaxed_match_count(scalar @{$self->result->alternate_relaxed_matches()}); - } - - if(defined $self->result->sample_name_relaxed_match and $self->result->sample_name_relaxed_match->{common_snp_count} >= $DEFAULT_MIN_COMMON_SNPS) { - if($self->result->sample_name_relaxed_match->{match_pct} > $MATCH_PASS_THRESHOLD) { - $self->result->pass(1); - } - elsif($self->result->sample_name_relaxed_match->{match_pct} < $MATCH_FAIL_THRESHOLD) { - $self->result->pass(0); - } - } - - return 1; + my $gt_check_cmd = sprintf + q{set -o pipefail && printf "%s" | %s %s %s | %s %s %s}, + $self->tsv_genotype, + $self->gt_pack_cmd(), + $self->gt_pack_flags(), + $self->gt_pack_args, + $self->find_gt_match_cmd(), + $self->find_gt_match_flags(), + $self->find_gt_match_args() + ; + + open my $f, q{-|}, qw{bash -c}, qq{$gt_check_cmd} or croak 'Failed to execute check'; + + my $json_results = <$f>; + + close $f or croak 'Failed to close check'; + + if(!$json_results) { + croak 'No results from check'; + } + + my $result = from_json($json_results); + + my $gt_caller_info = $self->current_version($self->samtools); + $self->result->set_info('Caller', $self->samtools); + $self->result->set_info('Caller_version', $gt_caller_info); + + $self->result->genotype_data_set($result->{genotype_data_set}); + + $self->result->snp_call_set($self->snp_call_set); + + my $bam_file_leaves = join q[;], (map { basename($_); } @{$self->input_files}); + $self->result->bam_file($bam_file_leaves); # name of result attribute should probably be changed to reflect the possibility of more than one bam file; check qc db + + $self->result->bam_file_md5($self->input_files_md5); + + my $reference_leaf = fileparse($self->reference_fasta); + $self->result->reference($reference_leaf); + + $self->result->bam_call_count($self->json_genotype->{number_of_calls}); + + my $bam_call_string = join q{}, map { $_->{call}; } @{$self->json_genotype->{calls}}{sort keys %{$self->json_genotype->{calls}}}; + $self->result->bam_call_string($bam_call_string); + + my $bam_gt_depths_string = join q{;}, map { defined $_->{depth}? $_->{depth}: q{0}; } @{$self->json_genotype->{calls}}{sort keys %{$self->json_genotype->{calls}}}; + $self->result->bam_gt_depths_string($bam_gt_depths_string); + + my $bam_gt_likelihood_string = join q{;}, map { defined $_->{gt_pl}? $_->{gt_pl}: q{0}; } @{$self->json_genotype->{calls}}{sort keys %{$self->json_genotype->{calls}}}; + $self->result->bam_gt_likelihood_string($bam_gt_likelihood_string); + + $self->result->expected_sample_name($self->sample_name); + $self->result->search_parameters($result->{params}); + $self->result->sample_name_match((grep { $_->{match_type} eq 'SampleNameMatch'; } @{$result->{comp_results}})[0]); + $self->result->sample_name_relaxed_match((grep { $_->{match_type} eq 'RM_SampleNameMatch'; } @{$result->{comp_results}})[0]); + + my @high_concordant_pos_dups = grep { $_->{match_type} eq 'HIGHconcordantPosDupDnaDiff' and $_->{matched_sample_name} ne $self->sample_name; } @{$result->{comp_results}}; + @high_concordant_pos_dups = reverse sort { $a->{match_pct} <=> $b->{match_pct}; } @high_concordant_pos_dups; + my $top_idx; + $top_idx = _cap_range(\@high_concordant_pos_dups, $MAX_ALT_MATCHES); + if ($top_idx > 0) { + @high_concordant_pos_dups = @high_concordant_pos_dups[0..$top_idx]; + } + if(@high_concordant_pos_dups) { + $self->result->alternate_matches([@high_concordant_pos_dups]); + } + + $self->result->alternate_match_count(0); + if(defined $self->result->alternate_matches) { + $self->result->alternate_match_count(scalar @{$self->result->alternate_matches}); + } + + my @rm_high_concordant_pos_dups = grep { $_->{match_type} eq 'RM_HIGHconcordantPosDupDnaDiff' and $_->{matched_sample_name} ne $self->sample_name; } @{$result->{comp_results}}; + @rm_high_concordant_pos_dups = reverse sort { $a->{match_pct} <=> $b->{match_pct}; } @rm_high_concordant_pos_dups; + $top_idx = _cap_range(\@rm_high_concordant_pos_dups, $MAX_ALT_MATCHES); + if($top_idx > 0) { + @rm_high_concordant_pos_dups = @rm_high_concordant_pos_dups[0..$top_idx]; + } + if(@rm_high_concordant_pos_dups) { + $self->result->alternate_relaxed_matches([@rm_high_concordant_pos_dups]); + } + + $self->result->alternate_relaxed_match_count(0); + if(defined $self->result->alternate_relaxed_matches) { + $self->result->alternate_relaxed_match_count(scalar @{$self->result->alternate_relaxed_matches()}); + } + + if(defined $self->result->sample_name_relaxed_match and $self->result->sample_name_relaxed_match->{common_snp_count} >= $DEFAULT_MIN_COMMON_SNPS) { + if($self->result->sample_name_relaxed_match->{match_pct} > $MATCH_PASS_THRESHOLD) { + $self->result->pass(1); + } + elsif($self->result->sample_name_relaxed_match->{match_pct} < $MATCH_FAIL_THRESHOLD) { + $self->result->pass(0); + } + } + + return 1; }; sub _cap_range { - my ($arr_ref, $max_value) = @_; - my $top_value; + my ($arr_ref, $max_value) = @_; + my $top_value; - $top_value = $#{$arr_ref}; - if($top_value >= $max_value) { - $top_value = $max_value - 1; - } + $top_value = $#{$arr_ref}; + if($top_value >= $max_value) { + $top_value = $max_value - 1; + } - return $top_value; + return $top_value; } #################### @@ -574,28 +573,28 @@ sub _cap_range { # or 'GRCh38' (meaning chr1, chr2, ...) ############################################################################################################### has '_ref_to_snppos_suffix_map' => ( - isa => 'HashRef', - is => 'ro', - lazy_build => 1, + isa => 'HashRef', + is => 'ro', + lazy_build => 1, ); sub _build__ref_to_snppos_suffix_map { - my ($self) = @_; + my ($self) = @_; - my $chrconv_fn = $self->chrname_conv_fn; + my $chrconv_fn = $self->chrname_conv_fn; - if($chrconv_fn and -f $chrconv_fn) { # if a map file is available, use it - my $chrconv_map = {}; - my $s = read_file($chrconv_fn); - if($s) { - my $json = from_json($s); - $chrconv_map = $json->{ref_chrconv_map}; - } + if($chrconv_fn and -f $chrconv_fn) { # if a map file is available, use it + my $chrconv_map = {}; + my $s = read_file($chrconv_fn); + if($s) { + my $json = from_json($s); + $chrconv_map = $json->{ref_chrconv_map}; + } return $chrconv_map; - } - else { # default to these values when map file is unavailable - Readonly::Scalar my $NO_CHR_SUFFIX => '1000Genomes'; - Readonly::Scalar my $USE_CHR_SUFFIX => 'GRCh37'; - Readonly::Scalar my $USE_GRCH38_CHR_SUFFIX => 'GRCh38'; + + } else { # default to these values when map file is unavailable + Readonly::Scalar my $NO_CHR_SUFFIX => '1000Genomes'; + Readonly::Scalar my $USE_CHR_SUFFIX => 'GRCh37'; + Readonly::Scalar my $USE_GRCH38_CHR_SUFFIX => 'GRCh38'; my $ref_to_snppos_suffix_map = { q{human_g1k_v37.fasta} => $NO_CHR_SUFFIX, @@ -609,8 +608,8 @@ sub _build__ref_to_snppos_suffix_map { q{Homo_sapiens.GRCh38_full_analysis_set_plus_decoy_hla.fa} => $USE_GRCH38_CHR_SUFFIX, }; - return $ref_to_snppos_suffix_map; - } + return $ref_to_snppos_suffix_map; + } } ################################################################### @@ -618,22 +617,22 @@ sub _build__ref_to_snppos_suffix_map { ################################################################### has 'geno_refset' => ( - is => 'ro', - isa => 'Str | Undef', - lazy => 1, + is => 'ro', + isa => 'Str | Undef', + lazy => 1, builder => q[_build_geno_refset], ); sub _build_geno_refset { - my ($self) = @_; + my ($self) = @_; my $ref = $self->_get_grfind; return $ref->geno_refset_genotype_base ? $ref->geno_refset_genotype_base : q[]; } has 'alternate_sample_name' => ( - is => 'ro', - isa => 'Str | Undef', - lazy => 1, + is => 'ro', + isa => 'Str | Undef', + lazy => 1, builder => q[_build_alternate_sample_name], ); sub _build_alternate_sample_name { @@ -758,7 +757,7 @@ Kevin Lewis, kl2 Copyright (C) 2018 GRL - This file is part of NPG. +This file is part of NPG. NPG is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by From f4e86e656f2df705dbd92c9f662f625ac4293bf6 Mon Sep 17 00:00:00 2001 From: Marina Gourtovaia Date: Fri, 13 Oct 2023 11:21:41 +0100 Subject: [PATCH 04/10] Fixed warning in a test --- t/60-autoqc-results-result.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/60-autoqc-results-result.t b/t/60-autoqc-results-result.t index 2537334c..6fa1ff8f 100644 --- a/t/60-autoqc-results-result.t +++ b/t/60-autoqc-results-result.t @@ -96,7 +96,7 @@ subtest 'saving object to and loading from file' => sub { $r->store($saved_path); my $json = $r->freeze(); is ($r->_id_run_common, 2549, 'one of private attributes is set'); - unlike($json, qr/\"_[:a-z:]/, 'private attributes are not serialized'); + unlike($json, qr/\"_[a-z]/, 'private attributes are not serialized'); delete $r->{'filename_root'}; my $saved_r = npg_qc::autoqc::results::result->load($saved_path); sleep 1; From 80761246bec867c77e86b9d218132378fb09597b Mon Sep 17 00:00:00 2001 From: Marina Gourtovaia Date: Fri, 13 Oct 2023 15:35:27 +0100 Subject: [PATCH 05/10] Ensure snp_call_set attribute is always defined. Previously if the genotype check failed to run and exited early, this attribute was not defined in the result object. This gave an error on loading the result to the database. --- lib/npg_qc/autoqc/checks/genotype.pm | 13 +++--- t/60-autoqc-checks-genotype.t | 40 ++++++++++++++++--- t/60-autoqc-db_loader.t | 16 +++++++- .../short_results/47646_1#999.genotype.json | 1 + .../autoqc/samplesheets/samplesheet_47646.csv | 6 +++ 5 files changed, 65 insertions(+), 11 deletions(-) create mode 100644 t/data/autoqc/dbix_loader/short_results/47646_1#999.genotype.json create mode 100644 t/data/autoqc/samplesheets/samplesheet_47646.csv diff --git a/lib/npg_qc/autoqc/checks/genotype.pm b/lib/npg_qc/autoqc/checks/genotype.pm index f2d19ff9..ddc34f42 100644 --- a/lib/npg_qc/autoqc/checks/genotype.pm +++ b/lib/npg_qc/autoqc/checks/genotype.pm @@ -100,8 +100,8 @@ has 'sequenom_plex' => ( ); # snp_call_set - this specifies the set of loci to be called. This may be -# the same for different sequenom_plex data sets. It is used to construct -# the name of some information files (positions, alleles, etc) +# the same for different sequenom_plex data sets. It is used to construct +# the name of some information files (positions, alleles, etc) has 'snp_call_set' => ( is => 'ro', isa => 'Str', @@ -426,9 +426,9 @@ override 'can_run' => sub { if(! any { $_ eq fileparse($self->reference_fasta); } (keys %{$self->_ref_to_snppos_suffix_map})) { $self->result->add_comment('Specified reference genome may be non-human'); return 0; - } + } - return 1; + return 1; }; override 'execute' => sub { @@ -444,6 +444,9 @@ override 'execute' => sub { }; if(!$self->can_run()) { + # The value has to be set in order to be able to upload the result + # to the database; it is a part of the unique constraint. + $self->result->snp_call_set($self->snp_call_set); return 1; } @@ -658,7 +661,7 @@ sub _set_attrib_by_geno_refset { my $name = fileparse($self->geno_refset); $self->_set_sequenom_plex($name); - $self->_set_snp_call_set($name); + $self->_set_ssnp_call_setnp_call_set($name); $self->_set_gt_db($self->geno_refset); if($self->alternate_sample_name) { diff --git a/t/60-autoqc-checks-genotype.t b/t/60-autoqc-checks-genotype.t index 123cac60..3e88edbe 100644 --- a/t/60-autoqc-checks-genotype.t +++ b/t/60-autoqc-checks-genotype.t @@ -2,11 +2,15 @@ use strict; use warnings; use Cwd; use File::Temp qw/ tempdir /; -use Test::More tests => 10; +use Test::More tests => 11; use Test::Exception; +use File::Copy; +use Perl6::Slurp; + use WTSI::NPG::iRODS; use_ok ('npg_qc::autoqc::checks::genotype'); +use_ok ('npg_qc::autoqc::results::genotype'); my $dir = tempdir(CLEANUP => 1); my $pid = $$; @@ -23,6 +27,8 @@ if ($env_file && $have_irods_execs) { $irods_tmp_coll = $irods->add_collection("GenotypeTest.$pid") ; } +my $ref_repos = cwd . '/t/data/autoqc'; + sub exist_irods_executables { return 0 unless `which ienv`; return 0 unless `which imkdir`; @@ -37,10 +43,35 @@ END { } } +subtest 'Test early exit' => sub { + plan tests => 5; + + local $ENV{'NPG_CACHED_SAMPLESHEET_FILE'} = + 't/data/autoqc/samplesheets/samplesheet_47646.csv'; + my $input_file = "$dir/47646_1#999.cram"; + my $output_file = "$dir/47646_1#999.genotype.json"; + copy('t/data/autoqc/alignment.bam', $input_file); + mkdir("$dir/genotypes"); + + my $check = npg_qc::autoqc::checks::genotype->new( + rpt_list => '47646:1:999', + input_files => [$input_file], + qc_out => $dir, + repository => $ref_repos, + genotypes_repository => "$dir/genotypes" + ); + isa_ok ($check, 'npg_qc::autoqc::checks::genotype'); + lives_ok { $check->run() } 'check executed'; + ok (-e $output_file, "output file $output_file has been generated"); + my $result = npg_qc::autoqc::results::genotype->thaw(slurp($output_file)); + is ($result->comments(), 'Specified reference genome may be non-human', + 'correct comment is captured'); + ok ($result->snp_call_set(), 'the snp_call_set attribute is set'); +}; + SKIP: { - skip 'iRODS not available', 9 unless $irods_tmp_coll; + skip 'iRODS not available', 8 unless $irods_tmp_coll; - my $ref_repos = cwd . '/t/data/autoqc'; my $expected_md5 = q[a4790111996a3f1c0247d65f4998e492]; my $st = join q[/], $dir, q[samtools]; @@ -52,7 +83,7 @@ SKIP: { local $ENV{PATH} = join q[:], $dir, $ENV{PATH}; my $data_dir = $dir."/data"; mkdir($data_dir); - `cp t/data/autoqc/alignment.bam $data_dir/2_1.bam`; + copy('t/data/autoqc/alignment.bam', "$data_dir/2_1.bam"); `echo -n $expected_md5 > $data_dir/2_1.bam.md5`; # populate a temporary iRODS collection @@ -66,7 +97,6 @@ SKIP: { input_files => ["$data_dir/2_1.bam"], repository => $ref_repos, ); - isa_ok ($r, 'npg_qc::autoqc::checks::genotype'); lives_ok { $r->result; } 'No error creating result object'; lives_ok {$r->samtools } 'No error calling "samtools" accessor'; is($r->samtools, $st, 'correct samtools path'); diff --git a/t/60-autoqc-db_loader.t b/t/60-autoqc-db_loader.t index 2d46c2ca..9197015d 100644 --- a/t/60-autoqc-db_loader.t +++ b/t/60-autoqc-db_loader.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 21; +use Test::More tests => 22; use Test::Exception; use Test::Warn; use Moose::Meta::Class; @@ -874,4 +874,18 @@ subtest 'loading review and other results from path' => sub { is( $row->criteria_md5, '27c522a795e99e3aea57162541de75b1', 'criteria_md5 column populated'); }; +subtest 'loading partially defined results' => sub { + plan tests => 2; + + my $db = $db_helper->create_test_db(q[npg_qc::Schema], 't/data/fixtures'); + my $db_loader = npg_qc::autoqc::db_loader->new( + path => ['t/data/autoqc/dbix_loader/short_results'], + schema => $db, + verbose => 0, + ); + lives_ok { $db_loader->load() } 'no error loading an ncomplete result'; + is ($db->resultset('Genotype')->search({})->count(), 1, + 'one genotype record is created'); +}; + 1; diff --git a/t/data/autoqc/dbix_loader/short_results/47646_1#999.genotype.json b/t/data/autoqc/dbix_loader/short_results/47646_1#999.genotype.json new file mode 100644 index 00000000..1b2e4607 --- /dev/null +++ b/t/data/autoqc/dbix_loader/short_results/47646_1#999.genotype.json @@ -0,0 +1 @@ +{"__CLASS__":"npg_qc::autoqc::results::genotype","comments":"Specified reference genome may be non-human","composition":{"__CLASS__":"npg_tracking::glossary::composition-96.0.0","components":[{"__CLASS__":"npg_tracking::glossary::composition::component::illumina-96.0.0","id_run":47646,"position":1,"tag_index":999}]},"id_run":47646,"info":{"Check":"npg_qc::autoqc::checks::genotype","Check_version":"0"},"position":1,"snp_call_set":"W30467","tag_index":999} \ No newline at end of file diff --git a/t/data/autoqc/samplesheets/samplesheet_47646.csv b/t/data/autoqc/samplesheets/samplesheet_47646.csv new file mode 100644 index 00000000..33afb7e1 --- /dev/null +++ b/t/data/autoqc/samplesheets/samplesheet_47646.csv @@ -0,0 +1,6 @@ +[Data],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +Sample_ID,Sample_Name,GenomeFolder,Index,Index2,bait_name,default_library_type,default_tag_sequence,default_tagtwo_sequence,email_addresses,email_addresses_of_followers,email_addresses_of_managers,email_addresses_of_owners,gbs_plex_name,is_control,is_pool,lane_id,lane_priority,library_name,organism,organism_taxon_id,project_cost_code,project_id,project_name,purpose,qc_state,request_id,required_insert_size_range,sample_accession_number,sample_cohort,sample_common_name,sample_consent_withdrawn,sample_control_type,sample_description,sample_donor_id,sample_id,sample_is_control,sample_name,sample_public_name,sample_reference_genome,sample_supplier_name,spiked_phix_tag_index,study_accession_number,study_alignments_in_bam,study_contains_nonconsented_human,study_contains_nonconsented_xahuman,study_description,study_id,study_name,study_reference_genome,study_separate_y_chromosome_data,study_title,tag_index, +67859722,3073STDY13850377,,TGAACTGG,AGAGTAGA,,GBS,TGAACTGG,AGAGTAGA,user1@some.ac.uk user2@some.ac.uk user3@some.ac.uk user4@some.ac.uk,,user1@some.ac.uk user1@some.ac.uk user2@some.ac.uk user2@some.ac.uk user3@some.ac.uk user3@some.ac.uk user4@some.ac.uk user4@some.ac.uk,,PFA_GRC1_v1.0,0,0,68525973,0,67859722,,5833,S0910,,,standard,,,from:450 to:450,,,Plasmodium falciparum,0,,,3073STDY13850377,8762888,0,3073STDY13850377,,,110723_negative36,,,1,0,0,Development of sequencing and library prep protocols using Human DNA ,3073,Team51_Development,Homo_sapiens (GRCh38_full_analysis_set_plus_decoy_hla),0,Team51_Development,997, +67859770,3073STDY13850378,,TACTTCGG,AGAGTAGA,,GBS,TACTTCGG,AGAGTAGA,user1@some.ac.uk user2@some.ac.uk user3@some.ac.uk user4@some.ac.uk,,user1@some.ac.uk user1@some.ac.uk user2@some.ac.uk user2@some.ac.uk user3@some.ac.uk user3@some.ac.uk user4@some.ac.uk user4@some.ac.uk,,PFA_GRC1_v1.0,0,0,68525973,0,67859770,,5833,S0910,,,standard,,,from:450 to:450,,,Plasmodium falciparum,0,,,3073STDY13850378,8762889,0,3073STDY13850378,,,110723_negative37,,,1,0,0,Development of sequencing and library prep protocols using Human DNA ,3073,Team51_Development,Homo_sapiens (GRCh38_full_analysis_set_plus_decoy_hla),0,Team51_Development,998, +67859818,3073STDY13850379,,TCTCACGG,AGAGTAGA,,GBS,TCTCACGG,AGAGTAGA,user1@some.ac.uk user2@some.ac.uk user3@some.ac.uk user4@some.ac.uk,,user1@some.ac.uk user1@some.ac.uk user2@some.ac.uk user2@some.ac.uk user3@some.ac.uk user3@some.ac.uk user4@some.ac.uk user4@some.ac.uk,,PFA_GRC1_v1.0,0,0,68525973,0,67859818,,5833,S0910,,,standard,,,from:450 to:450,,,Plasmodium falciparum,0,,,3073STDY13850379,8762890,0,3073STDY13850379,,,110723_negative38,,,1,0,0,Development of sequencing and library prep protocols using Human DNA ,3073,Team51_Development,Homo_sapiens (GRCh38_full_analysis_set_plus_decoy_hla),0,Team51_Development,999, +67859866,3073STDY13850380,,TCAGGAGG,AGAGTAGA,,GBS,TCAGGAGG,AGAGTAGA,user1@some.ac.uk user2@some.ac.uk user3@some.ac.uk user4@some.ac.uk,,user1@some.ac.uk user1@some.ac.uk user2@some.ac.uk user2@some.ac.uk user3@some.ac.uk user3@some.ac.uk user4@some.ac.uk user4@some.ac.uk,,PFA_GRC1_v1.0,0,0,68525973,0,67859866,,5833,S0910,,,standard,,,from:450 to:450,,,Plasmodium falciparum,0,,,3073STDY13850380,8762891,0,3073STDY13850380,,,110723_negative39,,,1,0,0,Development of sequencing and library prep protocols using Human DNA ,3073,Team51_Development,Homo_sapiens (GRCh38_full_analysis_set_plus_decoy_hla),0,Team51_Development,1000, From a68fd7946bdfca53d1297467fa607b62bb5374cf Mon Sep 17 00:00:00 2001 From: Marina Gourtovaia Date: Fri, 13 Oct 2023 17:46:33 +0100 Subject: [PATCH 06/10] Set the reference_fasta attribute in the new test --- t/60-autoqc-checks-genotype.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/t/60-autoqc-checks-genotype.t b/t/60-autoqc-checks-genotype.t index 3e88edbe..90ef5f55 100644 --- a/t/60-autoqc-checks-genotype.t +++ b/t/60-autoqc-checks-genotype.t @@ -52,13 +52,19 @@ subtest 'Test early exit' => sub { my $output_file = "$dir/47646_1#999.genotype.json"; copy('t/data/autoqc/alignment.bam', $input_file); mkdir("$dir/genotypes"); + my $fasta = join q[/], $ref_repos, 'references', + 'Homo_sapiens/GRCh38_full_analysis_set_plus_decoy_hla/all/fasta', + 'GRCh38_full_analysis_set_plus_decoy_hla.fasta'; + # Set the reference_fasta path explicitly, the CI pipeline has + # difficulty inferring it. my $check = npg_qc::autoqc::checks::genotype->new( rpt_list => '47646:1:999', input_files => [$input_file], qc_out => $dir, repository => $ref_repos, - genotypes_repository => "$dir/genotypes" + genotypes_repository => "$dir/genotypes", + reference_fasta => $fasta ); isa_ok ($check, 'npg_qc::autoqc::checks::genotype'); lives_ok { $check->run() } 'check executed'; From c875044dfa815b0557c38741a2bd6e7079698faf Mon Sep 17 00:00:00 2001 From: Marina Gourtovaia Date: Fri, 13 Oct 2023 18:23:33 +0100 Subject: [PATCH 07/10] Explained what is being tested. --- t/60-autoqc-checks-genotype.t | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/t/60-autoqc-checks-genotype.t b/t/60-autoqc-checks-genotype.t index 90ef5f55..181004ea 100644 --- a/t/60-autoqc-checks-genotype.t +++ b/t/60-autoqc-checks-genotype.t @@ -44,7 +44,7 @@ END { } subtest 'Test early exit' => sub { - plan tests => 5; + plan tests => 6; local $ENV{'NPG_CACHED_SAMPLESHEET_FILE'} = 't/data/autoqc/samplesheets/samplesheet_47646.csv'; @@ -67,12 +67,17 @@ subtest 'Test early exit' => sub { reference_fasta => $fasta ); isa_ok ($check, 'npg_qc::autoqc::checks::genotype'); + # For a check that cannot be run in full in a meaningful way we + # need to save enough data in the output JSON file to allow for + # this output to be uploaded to the database. lives_ok { $check->run() } 'check executed'; ok (-e $output_file, "output file $output_file has been generated"); my $result = npg_qc::autoqc::results::genotype->thaw(slurp($output_file)); is ($result->comments(), 'Specified reference genome may be non-human', - 'correct comment is captured'); + 'correct reason for not running in full is captured'); ok ($result->snp_call_set(), 'the snp_call_set attribute is set'); + # Testing ability to run last to avoid duplicates in comments. + ok (!$check->can_run(), 'the check cannot be run in full'); }; SKIP: { From 8315fa71575f52e703192d887931daedc610d53e Mon Sep 17 00:00:00 2001 From: Marina Gourtovaia Date: Wed, 18 Oct 2023 09:53:52 +0100 Subject: [PATCH 08/10] Fixed accidental code edit --- lib/npg_qc/autoqc/checks/genotype.pm | 2 +- t/60-autoqc-db_loader.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/npg_qc/autoqc/checks/genotype.pm b/lib/npg_qc/autoqc/checks/genotype.pm index ddc34f42..cb34168e 100644 --- a/lib/npg_qc/autoqc/checks/genotype.pm +++ b/lib/npg_qc/autoqc/checks/genotype.pm @@ -661,7 +661,7 @@ sub _set_attrib_by_geno_refset { my $name = fileparse($self->geno_refset); $self->_set_sequenom_plex($name); - $self->_set_ssnp_call_setnp_call_set($name); + $self->_set_snp_call_set($name); $self->_set_gt_db($self->geno_refset); if($self->alternate_sample_name) { diff --git a/t/60-autoqc-db_loader.t b/t/60-autoqc-db_loader.t index 9197015d..e90c75a7 100644 --- a/t/60-autoqc-db_loader.t +++ b/t/60-autoqc-db_loader.t @@ -883,7 +883,7 @@ subtest 'loading partially defined results' => sub { schema => $db, verbose => 0, ); - lives_ok { $db_loader->load() } 'no error loading an ncomplete result'; + lives_ok { $db_loader->load() } 'no error loading an incomplete result'; is ($db->resultset('Genotype')->search({})->count(), 1, 'one genotype record is created'); }; From c040558cda8eb7a716a67d9be42f220362fe37cf Mon Sep 17 00:00:00 2001 From: Marina Gourtovaia Date: Mon, 23 Oct 2023 17:37:51 +0100 Subject: [PATCH 09/10] Updated DBIx classes from the prod database. Changes are due to the MySQL database server upgrade to v8.+ --- lib/npg_qc/Schema/Result/Adapter.pm | 6 +++--- lib/npg_qc/Schema/Result/AlignmentFilterMetrics.pm | 6 +++--- lib/npg_qc/Schema/Result/BamFlagstats.pm | 6 +++--- lib/npg_qc/Schema/Result/Bcfstats.pm | 6 +++--- lib/npg_qc/Schema/Result/Contamination.pm | 6 +++--- lib/npg_qc/Schema/Result/GcBias.pm | 6 +++--- lib/npg_qc/Schema/Result/GcFraction.pm | 6 +++--- lib/npg_qc/Schema/Result/Generic.pm | 6 +++--- lib/npg_qc/Schema/Result/Genotype.pm | 6 +++--- lib/npg_qc/Schema/Result/GenotypeCall.pm | 6 +++--- lib/npg_qc/Schema/Result/HaplotagMetrics.pm | 6 +++--- lib/npg_qc/Schema/Result/InsertSize.pm | 6 +++--- lib/npg_qc/Schema/Result/Interop.pm | 6 +++--- lib/npg_qc/Schema/Result/MqcLibraryOutcomeEnt.pm | 8 ++++---- lib/npg_qc/Schema/Result/MqcLibraryOutcomeHist.pm | 8 ++++---- lib/npg_qc/Schema/Result/MqcOutcomeEnt.pm | 8 ++++---- lib/npg_qc/Schema/Result/MqcOutcomeHist.pm | 8 ++++---- lib/npg_qc/Schema/Result/PulldownMetrics.pm | 6 +++--- lib/npg_qc/Schema/Result/QXYield.pm | 6 +++--- lib/npg_qc/Schema/Result/RefMatch.pm | 6 +++--- lib/npg_qc/Schema/Result/Review.pm | 6 +++--- lib/npg_qc/Schema/Result/RnaSeqc.pm | 6 +++--- lib/npg_qc/Schema/Result/SamtoolsStats.pm | 6 +++--- lib/npg_qc/Schema/Result/SeqComponentComposition.pm | 8 ++++---- lib/npg_qc/Schema/Result/SequenceError.pm | 6 +++--- lib/npg_qc/Schema/Result/SequenceSummary.pm | 6 +++--- lib/npg_qc/Schema/Result/SpatialFilter.pm | 6 +++--- lib/npg_qc/Schema/Result/SplitStats.pm | 6 +++--- lib/npg_qc/Schema/Result/SubstitutionMetrics.pm | 6 +++--- lib/npg_qc/Schema/Result/TagDecodeStats.pm | 6 +++--- lib/npg_qc/Schema/Result/TagMetrics.pm | 6 +++--- lib/npg_qc/Schema/Result/TagsReporters.pm | 6 +++--- lib/npg_qc/Schema/Result/UpstreamTags.pm | 6 +++--- lib/npg_qc/Schema/Result/UqcOutcomeEnt.pm | 8 ++++---- lib/npg_qc/Schema/Result/UqcOutcomeHist.pm | 8 ++++---- lib/npg_qc/Schema/Result/VerifyBamId.pm | 6 +++--- 36 files changed, 115 insertions(+), 115 deletions(-) diff --git a/lib/npg_qc/Schema/Result/Adapter.pm b/lib/npg_qc/Schema/Result/Adapter.pm index b0d88b0a..aba3aa11 100644 --- a/lib/npg_qc/Schema/Result/Adapter.pm +++ b/lib/npg_qc/Schema/Result/Adapter.pm @@ -257,7 +257,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -280,8 +280,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::adapter'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-19 12:16:50 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jxMC400VgMoWLi7VZ1BQvg +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:srapMIASvykpn0D/5X066w our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/AlignmentFilterMetrics.pm b/lib/npg_qc/Schema/Result/AlignmentFilterMetrics.pm index cb6204e6..d473a88f 100644 --- a/lib/npg_qc/Schema/Result/AlignmentFilterMetrics.pm +++ b/lib/npg_qc/Schema/Result/AlignmentFilterMetrics.pm @@ -184,7 +184,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -207,8 +207,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::alignment_filter_metrics'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UVRsbLgCI8N3LzjV6YBB7A +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ak1mGBgWlfmsIfmzT/4XvQ our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/BamFlagstats.pm b/lib/npg_qc/Schema/Result/BamFlagstats.pm index eaddcfe0..d0621562 100644 --- a/lib/npg_qc/Schema/Result/BamFlagstats.pm +++ b/lib/npg_qc/Schema/Result/BamFlagstats.pm @@ -454,7 +454,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -477,8 +477,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::bam_flagstats'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-04-17 14:56:54 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YsrYNzYhK4jAltTpq12t+g +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:axfkgZIrumpoJiNjfj7yyA # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/lib/npg_qc/Schema/Result/Bcfstats.pm b/lib/npg_qc/Schema/Result/Bcfstats.pm index 4db93b85..14b9da8c 100644 --- a/lib/npg_qc/Schema/Result/Bcfstats.pm +++ b/lib/npg_qc/Schema/Result/Bcfstats.pm @@ -233,7 +233,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -256,8 +256,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::bcfstats'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2018-07-24 17:13:35 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:niEMJnu89gCh6Yx6PzR7hw +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gJt3V2S2ree5E94xu6xn1A # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/lib/npg_qc/Schema/Result/Contamination.pm b/lib/npg_qc/Schema/Result/Contamination.pm index e2241fe1..2fb96a94 100644 --- a/lib/npg_qc/Schema/Result/Contamination.pm +++ b/lib/npg_qc/Schema/Result/Contamination.pm @@ -219,7 +219,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -242,8 +242,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::contamination'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9/I9ZNNFeUTRJb7yJXunBQ +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q/Lh45owtn/TU8GHHf4jwA our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/GcBias.pm b/lib/npg_qc/Schema/Result/GcBias.pm index 0ad88e6a..587d36c8 100644 --- a/lib/npg_qc/Schema/Result/GcBias.pm +++ b/lib/npg_qc/Schema/Result/GcBias.pm @@ -269,7 +269,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -292,8 +292,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::gc_bias'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E6k6Zr3VAt0RkqAEH2ZBrA +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Y0t2xa+NCczKCwOEWAjUcQ our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/GcFraction.pm b/lib/npg_qc/Schema/Result/GcFraction.pm index 53520d5d..fb2d380e 100644 --- a/lib/npg_qc/Schema/Result/GcFraction.pm +++ b/lib/npg_qc/Schema/Result/GcFraction.pm @@ -237,7 +237,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -260,8 +260,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::gc_fraction'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XCy84rstloTadFcE32SIoQ +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uyOmbQl5nmU4uibxbxB8QQ our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/Generic.pm b/lib/npg_qc/Schema/Result/Generic.pm index a875a138..fbb5a185 100644 --- a/lib/npg_qc/Schema/Result/Generic.pm +++ b/lib/npg_qc/Schema/Result/Generic.pm @@ -177,7 +177,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -200,8 +200,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::generic'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-07-14 09:16:04 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uIYLagwKxxyrYTKAgv6eYA +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iCSGbCy41Xe5K29fq54DUg our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/Genotype.pm b/lib/npg_qc/Schema/Result/Genotype.pm index 8b9d49cc..10af717c 100644 --- a/lib/npg_qc/Schema/Result/Genotype.pm +++ b/lib/npg_qc/Schema/Result/Genotype.pm @@ -323,7 +323,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -346,8 +346,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::genotype'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dOkisnN8FSpBKaEVOtq9tg +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CcmXuEJl5SNEZEWrWJ1jnw our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/GenotypeCall.pm b/lib/npg_qc/Schema/Result/GenotypeCall.pm index 9582416c..06232d47 100644 --- a/lib/npg_qc/Schema/Result/GenotypeCall.pm +++ b/lib/npg_qc/Schema/Result/GenotypeCall.pm @@ -250,7 +250,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -273,8 +273,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::genotype_call'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2018-05-14 16:35:48 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z3A8Bv3NKskL8diAXznyaw +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Vo+ZhpU991FKH7gAzXd59Q # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/lib/npg_qc/Schema/Result/HaplotagMetrics.pm b/lib/npg_qc/Schema/Result/HaplotagMetrics.pm index e833eb56..8b61b88f 100644 --- a/lib/npg_qc/Schema/Result/HaplotagMetrics.pm +++ b/lib/npg_qc/Schema/Result/HaplotagMetrics.pm @@ -198,7 +198,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -219,8 +219,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-08-16 11:54:35 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bckQUhv6suXghL1wTChGug +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2kmSW9SZAyLFgSoUJCzYcg our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/InsertSize.pm b/lib/npg_qc/Schema/Result/InsertSize.pm index 07b26cfe..642e0aef 100644 --- a/lib/npg_qc/Schema/Result/InsertSize.pm +++ b/lib/npg_qc/Schema/Result/InsertSize.pm @@ -337,7 +337,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -360,8 +360,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::insert_size'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dvQeKZR2d4Wtz0s3OEccog +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pJmotNRbztmi5AvC3ovrOg our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/Interop.pm b/lib/npg_qc/Schema/Result/Interop.pm index 1a385bb4..109bcb7e 100644 --- a/lib/npg_qc/Schema/Result/Interop.pm +++ b/lib/npg_qc/Schema/Result/Interop.pm @@ -154,7 +154,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -177,8 +177,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::interop'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-01-23 16:45:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3OsEWKDv2Wiwgvz81Osg/A +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eBRUARW2DJk9PeWPDbh+3Q # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/lib/npg_qc/Schema/Result/MqcLibraryOutcomeEnt.pm b/lib/npg_qc/Schema/Result/MqcLibraryOutcomeEnt.pm index efd60aff..e68d894e 100644 --- a/lib/npg_qc/Schema/Result/MqcLibraryOutcomeEnt.pm +++ b/lib/npg_qc/Schema/Result/MqcLibraryOutcomeEnt.pm @@ -215,7 +215,7 @@ __PACKAGE__->belongs_to( 'mqc_outcome', 'npg_qc::Schema::Result::MqcLibraryOutcomeDict', { id_mqc_library_outcome => 'id_mqc_outcome' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head2 seq_composition @@ -230,12 +230,12 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-15 14:33:11 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ToJTCdCmZugE5pmrRj0z1A +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AnOBRE7DAQwsNVRnlZ3VDQ use Carp; with qw/npg_qc::Schema::Mqc::OutcomeEntity/; diff --git a/lib/npg_qc/Schema/Result/MqcLibraryOutcomeHist.pm b/lib/npg_qc/Schema/Result/MqcLibraryOutcomeHist.pm index f706fcfa..31c725ba 100644 --- a/lib/npg_qc/Schema/Result/MqcLibraryOutcomeHist.pm +++ b/lib/npg_qc/Schema/Result/MqcLibraryOutcomeHist.pm @@ -184,7 +184,7 @@ __PACKAGE__->belongs_to( 'mqc_outcome', 'npg_qc::Schema::Result::MqcLibraryOutcomeDict', { id_mqc_library_outcome => 'id_mqc_outcome' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head2 seq_composition @@ -199,12 +199,12 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-15 14:33:11 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FHRyyISjIlkr7To6IAI5eg +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LcwccF+lrvx8CzrPw4riqQ our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/MqcOutcomeEnt.pm b/lib/npg_qc/Schema/Result/MqcOutcomeEnt.pm index 1d23c9fc..8ffee985 100644 --- a/lib/npg_qc/Schema/Result/MqcOutcomeEnt.pm +++ b/lib/npg_qc/Schema/Result/MqcOutcomeEnt.pm @@ -205,7 +205,7 @@ __PACKAGE__->belongs_to( 'mqc_outcome', 'npg_qc::Schema::Result::MqcOutcomeDict', { id_mqc_outcome => 'id_mqc_outcome' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head2 seq_composition @@ -220,12 +220,12 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-15 14:33:12 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CER7lXmkdjHi1Q12USNB+Q +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:U9PH+AyBX2DFQLrVDTfK/Q use Carp; diff --git a/lib/npg_qc/Schema/Result/MqcOutcomeHist.pm b/lib/npg_qc/Schema/Result/MqcOutcomeHist.pm index 742e5ced..07d1390a 100644 --- a/lib/npg_qc/Schema/Result/MqcOutcomeHist.pm +++ b/lib/npg_qc/Schema/Result/MqcOutcomeHist.pm @@ -177,7 +177,7 @@ __PACKAGE__->belongs_to( 'mqc_outcome', 'npg_qc::Schema::Result::MqcOutcomeDict', { id_mqc_outcome => 'id_mqc_outcome' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head2 seq_composition @@ -192,12 +192,12 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-15 14:33:12 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jzcSpLhPAHC3W3XkadX0XA +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nqqsNCkoxbS5qEs0VkLHeA our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/PulldownMetrics.pm b/lib/npg_qc/Schema/Result/PulldownMetrics.pm index 86ae3627..9ecffe54 100644 --- a/lib/npg_qc/Schema/Result/PulldownMetrics.pm +++ b/lib/npg_qc/Schema/Result/PulldownMetrics.pm @@ -323,7 +323,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -346,8 +346,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::pulldown_metrics'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T6yxVg96ts6jOfEGLy4Veg +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SDBKSU52gWsUOwOJAkyoQg our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/QXYield.pm b/lib/npg_qc/Schema/Result/QXYield.pm index f56a345b..bf74c2e7 100644 --- a/lib/npg_qc/Schema/Result/QXYield.pm +++ b/lib/npg_qc/Schema/Result/QXYield.pm @@ -269,7 +269,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -292,8 +292,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::qX_yield'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-19 12:16:50 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LHzBwbDWKgAAeb8bUrM8og +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:o6vntkhfrLEMyYVCPe7+Yg our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/RefMatch.pm b/lib/npg_qc/Schema/Result/RefMatch.pm index beb58e19..d89b6254 100644 --- a/lib/npg_qc/Schema/Result/RefMatch.pm +++ b/lib/npg_qc/Schema/Result/RefMatch.pm @@ -219,7 +219,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -242,8 +242,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::ref_match'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tz6CkYNlRjjnVZaXpsYBeQ +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oI6uqypErTD9z8fjbZZ93A our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/Review.pm b/lib/npg_qc/Schema/Result/Review.pm index f3c9e4d8..1aac0e56 100644 --- a/lib/npg_qc/Schema/Result/Review.pm +++ b/lib/npg_qc/Schema/Result/Review.pm @@ -198,7 +198,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -219,8 +219,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-06-04 14:47:17 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DeTa7xq61g7m5KPDAyzGyQ +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VDZxa2LBAMuUJiqejIgB/w # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/lib/npg_qc/Schema/Result/RnaSeqc.pm b/lib/npg_qc/Schema/Result/RnaSeqc.pm index 7900cb45..b223e4c8 100644 --- a/lib/npg_qc/Schema/Result/RnaSeqc.pm +++ b/lib/npg_qc/Schema/Result/RnaSeqc.pm @@ -289,7 +289,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -312,8 +312,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::rna_seqc'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2018-10-15 15:29:49 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4nnuhEoMDc9Hi+l1YZc6HQ +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3+97qDxhVY1DW63gOT4qdg # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/lib/npg_qc/Schema/Result/SamtoolsStats.pm b/lib/npg_qc/Schema/Result/SamtoolsStats.pm index 363a193c..8ab8b813 100644 --- a/lib/npg_qc/Schema/Result/SamtoolsStats.pm +++ b/lib/npg_qc/Schema/Result/SamtoolsStats.pm @@ -150,7 +150,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -173,8 +173,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::samtools_stats'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-03-22 11:40:42 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CHtNIASw5kdMTguj8RfNcw +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sxNenAOzmWppQbH3MEoVNg # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/lib/npg_qc/Schema/Result/SeqComponentComposition.pm b/lib/npg_qc/Schema/Result/SeqComponentComposition.pm index 705bfcdc..3957987b 100644 --- a/lib/npg_qc/Schema/Result/SeqComponentComposition.pm +++ b/lib/npg_qc/Schema/Result/SeqComponentComposition.pm @@ -163,7 +163,7 @@ __PACKAGE__->belongs_to( 'seq_component', 'npg_qc::Schema::Result::SeqComponent', { id_seq_component => 'id_seq_component' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head2 seq_composition @@ -178,12 +178,12 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition', size => 'size' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); -# Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-09-11 16:26:51 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:l9HRSiRUN47Baf3NyuVG+Q +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wCYXZ7/Kxyw/9x+nXi3ddQ # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/lib/npg_qc/Schema/Result/SequenceError.pm b/lib/npg_qc/Schema/Result/SequenceError.pm index c49bba25..1c9f4e7c 100644 --- a/lib/npg_qc/Schema/Result/SequenceError.pm +++ b/lib/npg_qc/Schema/Result/SequenceError.pm @@ -328,7 +328,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -351,8 +351,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::sequence_error'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T1ERbTzmxAuKdLmWOwJJyA +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1MEh1Rmgjlz9AfkwVdCoEQ our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/SequenceSummary.pm b/lib/npg_qc/Schema/Result/SequenceSummary.pm index 41330d79..a6b1a6ee 100644 --- a/lib/npg_qc/Schema/Result/SequenceSummary.pm +++ b/lib/npg_qc/Schema/Result/SequenceSummary.pm @@ -196,7 +196,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -217,8 +217,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-06-13 15:19:01 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YAWYbAzDsh2BsfEYPQYZHg +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:O6FEnHuEWYgpVVO7OK41yQ # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/lib/npg_qc/Schema/Result/SpatialFilter.pm b/lib/npg_qc/Schema/Result/SpatialFilter.pm index 826a67ac..8e01f679 100644 --- a/lib/npg_qc/Schema/Result/SpatialFilter.pm +++ b/lib/npg_qc/Schema/Result/SpatialFilter.pm @@ -176,7 +176,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -197,8 +197,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jvqukWoMZdGlwz/oQjDrFw +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qpHbDBw2SVmIJ2n0UikTjQ our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/SplitStats.pm b/lib/npg_qc/Schema/Result/SplitStats.pm index ab0b95c8..c287d560 100644 --- a/lib/npg_qc/Schema/Result/SplitStats.pm +++ b/lib/npg_qc/Schema/Result/SplitStats.pm @@ -275,7 +275,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head2 split_stats_coverages @@ -311,8 +311,8 @@ __PACKAGE__->has_many( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T7PoM/FxAC3pSymaQtEGsA +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0SokhBA6X2ZxX1uvkPPC5A use MooseX::Aliases; diff --git a/lib/npg_qc/Schema/Result/SubstitutionMetrics.pm b/lib/npg_qc/Schema/Result/SubstitutionMetrics.pm index 563f7639..bb73e2ed 100644 --- a/lib/npg_qc/Schema/Result/SubstitutionMetrics.pm +++ b/lib/npg_qc/Schema/Result/SubstitutionMetrics.pm @@ -277,7 +277,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -298,8 +298,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-06-13 22:43:13 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZOL2iYj4stZnrInK/eUXAw +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cek531jCaTF8qrVyGCpj5g our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/TagDecodeStats.pm b/lib/npg_qc/Schema/Result/TagDecodeStats.pm index 6a2d20d0..28a9e8f3 100644 --- a/lib/npg_qc/Schema/Result/TagDecodeStats.pm +++ b/lib/npg_qc/Schema/Result/TagDecodeStats.pm @@ -216,7 +216,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -239,8 +239,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::tag_decode_stats'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fSmJktYbIQROKCSfFrpEnA +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E3dwbjxFVhWK1fZ+xfnFAg our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/TagMetrics.pm b/lib/npg_qc/Schema/Result/TagMetrics.pm index 7864ebc8..f567d9af 100644 --- a/lib/npg_qc/Schema/Result/TagMetrics.pm +++ b/lib/npg_qc/Schema/Result/TagMetrics.pm @@ -300,7 +300,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -323,8 +323,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::tag_metrics'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-19 13:25:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:X85s6Sx84dZtx0r2CpnPQA +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1d2K5torBGwUuJ/rMuVvfw our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/TagsReporters.pm b/lib/npg_qc/Schema/Result/TagsReporters.pm index c14cf658..ab6b4326 100644 --- a/lib/npg_qc/Schema/Result/TagsReporters.pm +++ b/lib/npg_qc/Schema/Result/TagsReporters.pm @@ -225,7 +225,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -248,8 +248,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::tags_reporters'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RQcWkb8ZRskffujtCa/lsw +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:28gJ3S2ZfnH6IXT8FmcNAw our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/UpstreamTags.pm b/lib/npg_qc/Schema/Result/UpstreamTags.pm index 685f5b8b..c458a397 100644 --- a/lib/npg_qc/Schema/Result/UpstreamTags.pm +++ b/lib/npg_qc/Schema/Result/UpstreamTags.pm @@ -252,7 +252,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -275,8 +275,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::upstream_tags'; -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-09-14 16:25:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VjcBJxeNEyHRqcsAeV3qUg +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iZvSrIKZMURUOr4CL3EMmQ our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/UqcOutcomeEnt.pm b/lib/npg_qc/Schema/Result/UqcOutcomeEnt.pm index aa7a5b73..89bfaa71 100644 --- a/lib/npg_qc/Schema/Result/UqcOutcomeEnt.pm +++ b/lib/npg_qc/Schema/Result/UqcOutcomeEnt.pm @@ -189,7 +189,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head2 uqc_outcome @@ -204,12 +204,12 @@ __PACKAGE__->belongs_to( 'uqc_outcome', 'npg_qc::Schema::Result::UqcOutcomeDict', { id_uqc_outcome => 'id_uqc_outcome' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-10-10 16:47:36 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oG/q5dOkJ/e9LH72FaUPzw +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4cAGzehlGMRDfWK+CZbizw use Carp; diff --git a/lib/npg_qc/Schema/Result/UqcOutcomeHist.pm b/lib/npg_qc/Schema/Result/UqcOutcomeHist.pm index e3d5896a..9ca823cc 100644 --- a/lib/npg_qc/Schema/Result/UqcOutcomeHist.pm +++ b/lib/npg_qc/Schema/Result/UqcOutcomeHist.pm @@ -175,7 +175,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head2 uqc_outcome @@ -190,12 +190,12 @@ __PACKAGE__->belongs_to( 'uqc_outcome', 'npg_qc::Schema::Result::UqcOutcomeDict', { id_uqc_outcome => 'id_uqc_outcome' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); -# Created by DBIx::Class::Schema::Loader v0.07047 @ 2017-10-10 16:47:36 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:W25wZbDnVcThChyx0ZEQNw +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MXLb6JGrqH30hXUJPeZwgQ our $VERSION = '0'; diff --git a/lib/npg_qc/Schema/Result/VerifyBamId.pm b/lib/npg_qc/Schema/Result/VerifyBamId.pm index 79cdef92..79f8fa67 100644 --- a/lib/npg_qc/Schema/Result/VerifyBamId.pm +++ b/lib/npg_qc/Schema/Result/VerifyBamId.pm @@ -227,7 +227,7 @@ __PACKAGE__->belongs_to( 'seq_composition', 'npg_qc::Schema::Result::SeqComposition', { id_seq_composition => 'id_seq_composition' }, - { is_deferrable => 1, on_delete => 'NO ACTION', on_update => 'NO ACTION' }, + { is_deferrable => 1, on_delete => 'RESTRICT', on_update => 'RESTRICT' }, ); =head1 L ROLES APPLIED @@ -250,8 +250,8 @@ __PACKAGE__->belongs_to( with 'npg_qc::Schema::Composition', 'npg_qc::Schema::Flators', 'npg_qc::autoqc::role::result', 'npg_qc::autoqc::role::verify_bam_id'; -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-08-29 10:31:30 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g2285gY2V+24Dah34YMHvQ +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2023-10-23 17:35:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kWZoVzbPdiZeXweKMz5GYg our $VERSION = '0'; From d4266593cef46f1df590971b24b90586549a3b3d Mon Sep 17 00:00:00 2001 From: Marina Gourtovaia Date: Tue, 28 Nov 2023 14:10:45 +0000 Subject: [PATCH 10/10] Recorded changes for release 71.1.0 --- Changes | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index ae5dec10..8085ba91 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,15 @@ LIST OF CHANGES FOR NPG-QC PACKAGE +release 71.1.0 + - Updated DBIC ORM following the production MySQL database server upgrade + to MySQL v8.+ + - Fixed a problem with archival of incomplete genotyping autoqc results + - Removed unused CI scripts + - Removed listing of non-existing files fro MANIFEST + - Fixed a warning when running the t/60-autoqc-results-result.t test + release 71.0.1 - - Change to Perl versions from Perlbrew + - Change to Perl versions from Perlbrew for CI release 71.0.0 - Removed the plugin that enable to run the SeqQC server under the