Exemple #1
0
    def test_split_ionfile_by_results(self):
        ion_file = "NGS/ion_file.fastq"
        blast_chunk = "NGS/_reaa.csv"

        NGS.split_ionfile_by_results(ion_file, blast_chunk)
        cmd = "grep -c '^@' NGS/_reaa.fastq"
        p = subprocess.check_output(cmd, shell=True)
        self.assertEqual(p.strip(), '1001')
        shutil.copyfile("NGS/_reaa.fastq.bak", "NGS/_reaa.fastq")
    def test_split_ionfile_by_results(self):
        ion_file = os.path.join(self.cwd, "NGS/ion_file.fastq")
        blast_chunk = os.path.join(self.cwd, "NGS/_reaa.csv")

        NGS.split_ionfile_by_results(ion_file, blast_chunk)
        cmd = "grep -c '^@' " + os.path.join(self.cwd, "NGS", "_reaa.fastq")
        p = subprocess.check_output(cmd, shell=True)
        self.assertEqual(int(p.strip()), 1001)
        os.remove(os.path.join(self.cwd, "NGS", "_reaa.fastq"))