def test_attributes_high_coverage(self): tcs = get_top_contigs(self.REFERENCE, 25) als = op.join(self._data_dir, "alignment_summary.lambda.gff") pls = _get_contigs_to_plot(als, tcs) contig = tcs[0] c_cov = pls[contig.header] stats = _get_reference_coverage_stats(pls.values()) att = _get_att_mean_coverage(stats) # This was in coverage.xml for the alignment summary gff used # attribute hidden="true" id="depth_coverage_mean" name="Coverage" # value="2958.16">2958.16</attribute> self.assertAlmostEqual(2958.16, att.value, places=2) att = _get_att_percent_missing(stats) self.assertEqual(0, att.value)
def test_attributes_high_coverage(self): tcs = get_top_contigs(self.REFERENCE, 25) als = op.join(self._data_dir, "alignment_summary.lambda.gff") pls = _get_contigs_to_plot(als, tcs) contig = tcs[0] c_cov = pls[contig.header] stats = _get_reference_coverage_stats(pls.values()) att = _get_att_mean_coverage(stats) # This was in coverage.xml for the alignment summary gff used # attribute hidden="true" id="depth_coverage_mean" name="Coverage" # value="2958.16">2958.16</attribute> self.assertEqual(2958, int(att.value)) att = _get_att_percent_missing(stats) self.assertEqual(0, att.value)
def test_attributes(self): """ Test that attribute values match expected """ tcs = get_top_contigs(self.REFERENCE, 25) als = self.GFF pls = _get_contigs_to_plot(als, tcs) contig = tcs[0] c_cov = pls[contig.header] stats = _get_reference_coverage_stats(pls.values()) att = _get_att_mean_coverage(stats) # This was in coverage.xml for the alignment summary gff used # attribute hidden="true" id="depth_coverage_mean" name="Coverage" # value="2958.16">2958.16</attribute> self.assertAlmostEqual(1.228, att.value, places=3) att = _get_att_percent_missing(stats) self.assertAlmostEqual(58.4, att.value, places=1)
def test_attributes(self): """ Test that attribute values match expected """ tcs = get_top_contigs(self.REFERENCE, 25) als = self.GFF pls = _get_contigs_to_plot(als, tcs) contig = tcs[0] c_cov = pls[contig.header] stats = _get_reference_coverage_stats(pls.values()) att = _get_att_mean_coverage(stats) # This was in coverage.xml for the alignment summary gff used # attribute hidden="true" id="depth_coverage_mean" name="Coverage" # value="2958.16">2958.16</attribute> self.assertEqual(1, int(att.value)) att = _get_att_percent_missing(stats) self.assertAlmostEqual(0.584, att.value, places=3)
def test_attributes(self): """ Test that attribute values match expected """ ref = os.path.join(self._data_dir, 'references', 'lambda') tcs = get_top_contigs(ref, 25) als = os.path.join(self._data_dir, 'alignment_summary.lambda.gff') pls = _get_contigs_to_plot(als, tcs) contig = tcs[0] c_cov = pls[contig.header] stats = _get_reference_coverage_stats(pls.values()) att = _get_att_mean_coverage(stats) # This was in coverage.xml for the alignment summary gff used # attribute hidden="true" id="depth_coverage_mean" name="Coverage" value="2958.16">2958.16</attribute> self.assertEqual(2958.1640346377467, att.value) att = _get_att_percent_missing(stats) self.assertEqual(0, att.value)