def test_attrs(self):
        """
        Create all report attributes, test values
        """
        c_reads = self._data[CONTROL_READS][1]
        f_reads = self._data[FILTERED_READS]
        control_data, sample_data = _process_reads(c_reads, f_reads)

        n_control = control_data.shape[1]
        n_sample = sample_data.shape[1]

        self.assertEqual(333, _get_attr_n_control_reads(n_control).value)

        self.assertEqual(0.01235759082643708,
                         _get_attr_fraction_control_reads(n_control,
                                                          n_sample).value)
        self.assertEqual(0.84888366464380027,
                         _get_attr_control_subread_acc(control_data).value)

        self.assertEqual(2468,
                         _get_attr_control_mean_readlength(control_data).value)

        self.assertEqual(7804,
                         _get_attr_control_95_readlength(control_data).value)
        self.assertEqual(3912, _get_attr_n50(control_data).value)
Example #2
0
    def test_attrs(self):
        """
        Create all report attributes, test values
        """
        c_reads = self._data[CONTROL_READS][1]
        f_reads = self._data[FILTERED_READS]
        control_data, sample_data = _process_reads(c_reads, f_reads)

        n_control = control_data.shape[1]
        n_sample = sample_data.shape[1]

        self.assertEqual(333, _get_attr_n_control_reads(n_control).value)

        self.assertEqual(
            0.01235759082643708,
            _get_attr_fraction_control_reads(n_control, n_sample).value)
        self.assertEqual(0.84888366464380027,
                         _get_attr_control_subread_acc(control_data).value)

        self.assertEqual(2468,
                         _get_attr_control_mean_readlength(control_data).value)

        self.assertEqual(7804,
                         _get_attr_control_95_readlength(control_data).value)
        self.assertEqual(3912, _get_attr_n50(control_data).value)
    def test_create_length_figure(self):
        """
        Test that the length figure obj is not None
        """
        c_reads = self._data[CONTROL_READS][1]
        f_reads = self._data[FILTERED_READS]
        control_data, sample_data = _process_reads(c_reads, f_reads)

        fig = _create_length_figure(control_data, sample_data)
        self.assertIsNotNone(fig)
Example #4
0
    def test_create_length_figure(self):
        """
        Test that the length figure obj is not None
        """
        c_reads = self._data[CONTROL_READS][1]
        f_reads = self._data[FILTERED_READS]
        control_data, sample_data = _process_reads(c_reads, f_reads)

        fig = _create_length_figure(control_data, sample_data)
        self.assertIsNotNone(fig)
    def test_process_reads(self):
        """
        Assert length of sample and control arrays
        """
        c_reads = self._data[CONTROL_READS][1]
        f_reads = self._data[FILTERED_READS]
        control_data, sample_data = _process_reads(c_reads, f_reads)

        self.assertTrue(len(control_data[0]) == len(control_data[1]) == len(
            control_data[2]) == len(control_data[3]))
        self.assertEqual(333, len(control_data[0]))
        self.assertEqual(26614, len(sample_data[0]))
Example #6
0
    def test_process_reads(self):
        """
        Assert length of sample and control arrays
        """
        c_reads = self._data[CONTROL_READS][1]
        f_reads = self._data[FILTERED_READS]
        control_data, sample_data = _process_reads(c_reads, f_reads)

        self.assertTrue(
            len(control_data[0]) == len(control_data[1]) == len(
                control_data[2]) == len(control_data[3]))
        self.assertEqual(333, len(control_data[0]))
        self.assertEqual(26614, len(sample_data[0]))