Skip to content

Commit

Permalink
allow bad rna samples in somatic an_rna step
Browse files Browse the repository at this point in the history
  • Loading branch information
Ott-Alexander committed Apr 4, 2023
1 parent 5772567 commit b94b8f1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Pipelines/somatic_dna.php
Original file line number Diff line number Diff line change
Expand Up @@ -945,13 +945,12 @@ function($str) { return explode("\t", $str); },
//get related RNA samples from NGSD
if (count($res) >= 1)
{
$res = $db->executeQuery("SELECT * FROM sample_relations WHERE relation='same sample' AND (sample1_id=:sid OR sample2_id=:sid)", array("sid" => $sample_id));
foreach($res as $row)
$relations = $db->executeQuery("SELECT * FROM sample_relations WHERE relation='same sample' AND (sample1_id=:sid OR sample2_id=:sid)", array("sid" => $sample_id));
foreach($relations as $row)
{
$sample_id_annotation = $row['sample1_id'] != $sample_id ? $row['sample1_id'] : $row['sample2_id'];

$res = $db->executeQuery("SELECT ps.sample_id, ps.process_id, ps.processing_system_id, ps.quality, sys.id, sys.type, CONCAT(s.name, '_', LPAD(ps.process_id, 2, '0')) as psample FROM processed_sample as ps, processing_system as sys, sample as s WHERE ps.sample_id=:sid AND sys.type='RNA' AND ps.processing_system_id=sys.id AND ps.sample_id=s.id AND (NOT ps.quality='bad')", array("sid" => $sample_id_annotation));

$res = $db->executeQuery("SELECT ps.sample_id, ps.process_id, ps.processing_system_id, ps.quality, sys.id, sys.type, CONCAT(s.name, '_', LPAD(ps.process_id, 2, '0')) as psample FROM processed_sample as ps, processing_system as sys, sample as s WHERE ps.sample_id=:sid AND sys.type='RNA' AND ps.processing_system_id=sys.id AND ps.sample_id=s.id", array("sid" => $sample_id_annotation));
$rna_ids = array_column($res, 'psample');
foreach($rna_ids as $rna_id)
{
Expand Down

0 comments on commit b94b8f1

Please sign in to comment.