Esempio n. 1
0
    def test_srna_profile_3(self):
        """
        Test 2 reads aligning to the same reference once - 1 sense and 1 anti-sense
        :return:
        """
        test_seq = self.load_test_read_file()

        single_ref = self.load_test_ref_file("test_ref_3.fa")

        aligned = self.align_reads(single_ref, test_seq)

        test_aligned = ar.AlignedReads()
        test_aligned[dna.DNA("GTGCGTATGGCGATGAGAGTA")] = [[47, -250000.0]]
        test_aligned[dna.DNA("ATGCGTATGGCGATGAGAGTA")] = [[0, 500000.0]]

        self.assertEqual(aligned, test_aligned)
Esempio n. 2
0
    def test_srna_profile_1(self):
        """
        Test a single read aligning a reference once in the sense orientation

        """
        test_seq = self.load_test_read_file()

        single_ref = self.load_test_ref_file("test_ref_1.fa")

        aligned = self.align_reads(single_ref, test_seq)

        test_aligned = ar.AlignedReads()
        test_aligned[dna.DNA("ATGCGTATGGCGATGAGAGTA")] = [[0, 500000.0]]
        self.assertEqual(aligned, test_aligned)
Esempio n. 3
0
    def test_srna_profile_5(self):
        """
        Test a single read aligning a reference twice in the sense orientation
        Split of aligned read count

        """
        test_seq = self.load_test_read_file()

        single_ref = self.load_test_ref_file("test_ref_4.fa")

        aligned = self.align_reads(single_ref, test_seq)
        aligned.split()
        test_aligned = ar.AlignedReads()
        test_aligned[dna.DNA("ATGCGTATGGCGATGAGAGTA")] = [[0, 250000.0],
                                                          [27, 250000.0]]
        self.assertEqual(aligned, test_aligned)