def test_getIntervalWhereProbeAlignsToTruth_probeMapsReturnsInterval(self, *mock): classification = Classification() actual = PrecisionMasker.get_interval_where_probe_aligns_to_truth( classification ) expected = Interval(34, 37, "chrom1") assert actual == expected
def test_getIntervalWhereProbeAlignsToTruth_ProbeIsUnmappedReturnsNone(self, *mock): classification = Classification() actual = PrecisionMasker.get_interval_where_probe_aligns_to_truth( classification ) expected = None assert actual == expected
def test_getIntervalWhereProbeAlignsToTruth_refPositionsQueryAlignsToIsEmpty_returnsNone( self, *mock ): classification = Classification() actual = PrecisionMasker.get_interval_where_probe_aligns_to_truth( classification ) expected = None assert actual == expected
def test_getIntervalWhereProbeAlignsToTruth_refPositionsWhereProbeMapsContainsZeroDontReturnNegative( self, *mock ): classification = Classification() actual = PrecisionMasker.get_interval_where_probe_aligns_to_truth( classification ) expected = Interval(0, 2, "chrom1") assert actual == expected
def test_getIntervalWhereProbeAlignsToTruth_probeIsInsertionWithTwoNonesBeforeReturnsIntervalAroundInsertion( self, *mock ): classification = Classification() actual = PrecisionMasker.get_interval_where_probe_aligns_to_truth( classification ) expected = Interval(50, 52, "chrom1") assert actual == expected
"tool": [tool], "nb_of_records_before_mapq_sam_records_filter": [nb_of_records_before_mapq_sam_records_filter], "nb_of_records_after_mapq_sam_records_filter": [nb_of_records_after_mapq_sam_records_filter], "nb_of_records_removed_with_mapq_sam_records_filter": [nb_of_records_removed_with_mapq_sam_records_filter], "nb_of_records_removed_with_mapq_sam_records_filter_proportion": [nb_of_records_removed_with_mapq_sam_records_filter_proportion] }) nb_of_records_removed_with_mapq_sam_records_filter_df.to_csv( nb_of_records_removed_with_mapq_sam_records_filter_filepath, index=False) logging.info(f"Masking SAM records") with open(mask_filepath) as bed: masker = PrecisionMasker.from_bed(bed) records = masker.filter_records(records) logging.info("Creating classifier") classifier = PrecisionClassifier(sam=records, name=sample_id) logging.info("Creating reporter") reporter = PrecisionReporter(classifiers=[classifier]) logging.info("Generating report") report = reporter.generate_report() # output logging.info("Saving report") with open(variant_call_precision_report, "w") as output: reporter.save_report(report, output)