Skip to content

Commit

Permalink
Merge pull request #861 from wtsi-npg/devel
Browse files Browse the repository at this point in the history
pull from devel to master to create release 72.1.0
  • Loading branch information
jmtcsngr committed Apr 19, 2024
2 parents d9fa1e0 + 050ec7c commit f8631b8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 59 deletions.
9 changes: 9 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
LIST OF CHANGES FOR NPG-QC PACKAGE

release 72.1.0
- Fixed the bug that was introduced while updating the SeqQC summary display
for pulldown_metrics incomplete results. The bug manifestation is a display
appearence of an unexpected raw mean depth value just before the coverage
value. All values that should be displayed were unaffected by the bug.
- Removed an unused part of the bin/call_gtck_composite_rpt.pl script.
This part contained the code that failed the compilation following the
deletion of the short_info role in wtsi-npg/npg_tracking#812

release 72.0.1
- Ensured that retrieving values from a partially defined pulldown_metrics
result does not trigger an error. Added a test to demonstrate that such
Expand Down
74 changes: 17 additions & 57 deletions bin/call_gtck_composite_rpt.pl
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@
use lib ( -d "$Bin/../lib/perl5" ? "$Bin/../lib/perl5" : "$Bin/../lib" );

use Getopt::Std;

use Moose::Meta::Class;
use Data::Dumper;
use Carp;
use Readonly;

use Moose::Meta::Class;
use npg_tracking::illumina::run::short_info;
use npg_tracking::illumina::run::folder;
use npg_tracking::illumina::run::long_info;
use npg_qc::autoqc::checks::genotype;

##no critic
Expand All @@ -51,9 +47,9 @@
my $ext = $opts{b}? q[bam]: q[cram];
my $rpt_list = $opts{r};
if($rpt_list) {
@bam_file_list = map { my ($r, $p, $t) = (split ":", $_); find_runlanefolder($r, $p, $t, $ext) or sprintf "irods:/seq/%d/%d_%d%s.%s", $r, $r, $p, $t? "#$t": "", $ext; } (split ";", $rpt_list);
@bam_file_list = map { my ($r, $p, $t) = (split ":", $_); sprintf "irods:/seq/%d/%d_%d%s.%s", $r, $r, $p, $t? "#$t": "", $ext; } (split ";", $rpt_list);

carp qq[bam_file_list:\n\t], join("\n\t", @bam_file_list), "\n";
carp qq[bam_file_list:\n\t], join("\n\t", @bam_file_list), "\n";
}

#######################################################
Expand Down Expand Up @@ -82,31 +78,31 @@

my $of;
if($output_file) {
open $of, ">$output_file" or croak "Failed to open $output_file for output\n";
open $of, ">$output_file" or croak "Failed to open $output_file for output\n";
}
else {
$of = *STDOUT;
$of = *STDOUT;
}

my %attribs = (
sample_name => $sample_name,
alignments_in_bam => 1,
reference_fasta => $reference_genome,
input_files => [ (@bam_file_list) ],
sample_name => $sample_name,
alignments_in_bam => 1,
reference_fasta => $reference_genome,
input_files => [ (@bam_file_list) ],
);
if(defined $plex_name) {
$attribs{sequenom_plex} = $plex_name;
$attribs{sequenom_plex} = $plex_name;

$pos_snpname_map_filename ||= $gt_repos . q[/] . $plex_name . q[_chrpos_snpname_map_] . $chr_name_set . q[.tsv];
$pos_snpname_map_filename ||= $gt_repos . q[/] . $plex_name . q[_chrpos_snpname_map_] . $chr_name_set . q[.tsv];
}
if(defined $pos_snpname_map_filename) {
$attribs{pos_snpname_map_fn} = $pos_snpname_map_filename;
$attribs{pos_snpname_map_fn} = $pos_snpname_map_filename;
}
if(defined $poss_dup_level) {
$attribs{poss_dup_level} = $poss_dup_level;
$attribs{poss_dup_level} = $poss_dup_level;
}
if(defined $gt_exec_path) {
$attribs{genotype_executables_path} = $gt_exec_path;
$attribs{genotype_executables_path} = $gt_exec_path;
}

$attribs{rpt_list} = $rpt_list;
Expand All @@ -119,48 +115,12 @@

my $result_string;
if($json_gt) {
$result_string = $gtck->result->freeze;
$result_string = $gtck->result->freeze;
}
else {
$result_string = Dumper($gtck->result);
$result_string = Dumper($gtck->result);
}

print $of $result_string;

sub find_runlanefolder {
my ($id_run, $lane, $tag_index, $ext) = @_;

# temporarily disable search for run folder (assumptions about its structure are out of date)
return;

# the methods hash ref passed to create_anon_class looks peculiar, but seems to be necessary to create a new object
# from an anonymous class in this way
my $runfolder = Moose::Meta::Class->create_anon_class(
roles => [qw/npg_tracking::illumina::run::short_info
npg_tracking::illumina::run::folder
npg_tracking::illumina::run::long_info/],
methods => { runfolder_path => sub {}})
->new_object({id_run => $id_run});

my $rf;
eval {
$rf = $runfolder->runfolder_path;
};
if($rf) {
my $ls = $rf . q[/Latest_Summary];
die qq[Latest_summary link $ls not found] unless(-l $ls);

my $full_path = sprintf "%s/archive/", $ls;
if($tag_index) {
$full_path .= sprintf "lane%d/%d_%d#%d.%s", $lane, $id_run, $lane, $tag_index, $ext;
}
else {
$full_path .= sprintf "%d_%d.%s", $id_run, $lane, $ext;
}

return $full_path;
}

return;
}

1;
4 changes: 2 additions & 2 deletions npg_qc_viewer/root/src/ui_lanes/lane.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ END
[% href='#pdmc_' _ result.id_run _ ':' _ result.position _ ':' _ result.tag_index %]

[%-
mcoverage;
mcoverage = -1;
IF result.unique_bases_aligned_num.defined && result.unique_bases_aligned_num != 0;
mcoverage = result.mean_target_coverage / (result.unique_bases_aligned_num / 1000000000);
END;
Expand All @@ -439,7 +439,7 @@ END
END;
coverage = result.target_bases_coverage_percent.20 ? result.target_bases_coverage_percent.20 : 0;
-%]
[% IF mcoverage.defined %]
[% IF mcoverage >= 0 %]
[% IF result.interval_files_identical.defined && result.interval_files_identical == 1 %]
<span class="pdmc_na" title="Bait and target intervals identical"><a href="[% href %]">NA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NA<br/></a></span>
<span class="dark_blue" title="On-bait bases %age"><a href="[% href %]">[% FILTER format('%2.2f');on_bait;END %]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></span>
Expand Down

0 comments on commit f8631b8

Please sign in to comment.