Skip to content

Commit

Permalink
work on consistency check
Browse files Browse the repository at this point in the history
  • Loading branch information
dfornika committed Jun 11, 2024
1 parent 1f40b0d commit fda31bb
Showing 1 changed file with 58 additions and 17 deletions.
75 changes: 58 additions & 17 deletions .github/scripts/check_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,41 +93,80 @@ def main(args):
'HA_contigs': {"upstream": os.path.join(sample_id, "HA_contigs.fa"),
"origin": os.path.join(sample_id,
"analysis_by_stage",
"01_assemble_contigs",
"03_scaffolding",
"HA_contigs.fa")},
'HA_contigs_alignment': {"upstream": os.path.join(sample_id, "HA_contigs.afa"),
"origin": os.path.join(sample_id,
"analysis_by_stage",
"01_assemble_contigs",
"03_scaffolding",
"HA_contigs.afa")},
'NA_contigs': {"upstream": os.path.join(sample_id, "NA_contigs.fa"),
"origin": os.path.join(sample_id, "NA_contigs.fa")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"03_scaffolding",
"NA_contigs.fa")},
'NA_contigs_alignment': {"upstream": os.path.join(sample_id, "NA_contigs.afa"),
"origin": os.path.join(sample_id, "NA_contigs.afa")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"03_scaffolding",
"NA_contigs.afa")},
'NP_contigs': {"upstream": os.path.join(sample_id, "NP_contigs.fa"),
"origin": os.path.join(sample_id, "NP_contigs.fa")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"03_scaffolding",
"NP_contigs.fa")},
'NP_contigs_alignment': {"upstream": os.path.join(sample_id, "NP_contigs.afa"),
"origin": os.path.join(sample_id, "NP_contigs.afa")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"03_scaffolding",
"NP_contigs.afa")},
'PA_contigs': {"upstream": os.path.join(sample_id, "PA_contigs.fa"),
"origin": os.path.join(sample_id, "PA_contigs.fa")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"03_scaffolding",
"PA_contigs.fa")},
'PA_contigs_alignment': {"upstream": os.path.join(sample_id, "PA_contigs.afa"),
"origin": os.path.join(sample_id, "PA_contigs.afa")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"03_scaffolding",
"PA_contigs.afa")},
'PB1_contigs': {"upstream": os.path.join(sample_id, "PB1_contigs.fa"),
"origin": os.path.join(sample_id, "PB1_contigs.fa")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"03_scaffolding",
"PB1_contigs.fa")},
'PB1_contigs_alignment': {"upstream": os.path.join(sample_id, "PB1_contigs.afa"),
"origin": os.path.join(sample_id, "PB1_contigs.afa")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"03_scaffolding",
"PB1_contigs.afa")},
'PB2_contigs': {"upstream": os.path.join(sample_id, "PB2_contigs.fa"),
"origin": os.path.join(sample_id, "PB2_contigs.fa")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"03_scaffolding",
"PB2_contigs.fa")},
'PB2_contigs_alignment': {"upstream": os.path.join(sample_id, "PB2_contigs.afa"),
"origin": os.path.join(sample_id, "PB2_contigs.afa")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"03_scaffolding",
"PB2_contigs.afa")},
'normalized_reads_r1': {"upstream": os.path.join(sample_id, "R1.fq"),
"origin": os.path.join(sample_id, "R1.fq")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"00_normalize_depth",
f"{sample_id}-normalized_R1.fastq.gz")},
'normalized_reads_r2': {"upstream": os.path.join(sample_id, "R2.fq"),
"origin": os.path.join(sample_id, "R2.fq")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"00_normalize_depth",
f"{sample_id}-normalized_R2.fastq.gz")},
'alignment_sam': {"upstream": os.path.join(sample_id, "alignment.sam"),
"origin": os.path.join(sample_id, "alignment.sam")},
'ambig_tsv': {"upstream": os.path.join(sample_id, "ambig.tsv"),
"origin": os.path.join(sample_id, "ambig.tsv")},
"origin": os.path.join(sample_id,
"analysis_by_stage",
"",
"ambig.tsv")},
'contigs_blast': {"upstream": os.path.join(sample_id, "contigs_blast.tsv"),
"origin": os.path.join(sample_id, "contigs_blast.tsv")},
'depth_of_cov_freebayes': {"upstream": os.path.join(sample_id, "depth_of_cov_freebayes.tsv"),
Expand Down Expand Up @@ -172,6 +211,8 @@ def main(args):
all_expected_files_exist = all([check['upstream_exists'] and check['origin_exists'] for check in expected_files_exist_checks])

files_whose_md5sums_are_not_expected_to_match = [
'normalized_reads_r1',
'normalized_reads_r2',
'alignment_sam',
'pileup_vcf',
]
Expand Down Expand Up @@ -220,10 +261,10 @@ def main(args):
writer = csv.DictWriter(f, fieldnames=output_fields, extrasaction='ignore')
writer.writeheader()
for test in tests:
test["test_result"] = "FAIL"
if test["test_passed"]:
test["test_result"] = "PASS"
else:
test["test_result"] = "FAIL"

writer.writerow(test)

for test in tests:
Expand Down

0 comments on commit fda31bb

Please sign in to comment.