def testProcessForwardDataset(self): args.truncate = None args.paired = False args.forward_fastq = 'test/test1.fastq' args.reverse_fastq = None args.output_prefix = 'test/test_output/forward' args.output_compression = 'none' moira.main(args) self.assertEqual( open('test/test_output/forward.qc.good.fasta').read(), open('test/test_results/forward.qc.good.fasta').read()) self.assertEqual( open('test/test_output/forward.qc.good.qual').read(), open('test/test_results/forward.qc.good.qual').read()) self.assertEqual( open('test/test_output/forward.qc.good.names').read(), open('test/test_results/forward.qc.good.names').read()) self.assertEqual( open('test/test_output/forward.qc.bad.fasta').read(), open('test/test_results/forward.qc.bad.fasta').read()) self.assertEqual( open('test/test_output/forward.qc.bad.qual').read(), open('test/test_results/forward.qc.bad.qual').read()) self.assertEqual( open('test/test_output/forward.qc.bad.names').read(), open('test/test_results/forward.qc.bad.names').read())
def testCompression(self): args.truncate = None args.paired = True args.forward_fastq = 'test/test1.fastq.gz' args.reverse_fastq = 'test/test2.fastq.bz2' args.output_prefix = 'test/test_output/paired' args.output_compression = 'gz' moira.main(args) self.assertEqual(gzip.GzipFile('test/test_output/paired.qc.good.fasta.gz').read(), open('test/test_results/paired.qc.good.fasta').read()) args.output_compression = 'bz2' moira.main(args) self.assertEqual(bz2.BZ2File('test/test_output/paired.qc.good.fasta.bz2').read(), open('test/test_results/paired.qc.good.fasta').read())
def testProcessPairedDataset(self): args.truncate = None args.paired = True args.forward_fastq = 'test/test1.fastq' args.reverse_fastq = 'test/test2.fastq' args.output_prefix = 'test/test_output/paired' args.output_compression = 'none' moira.main(args) self.assertEqual(open('test/test_output/paired.qc.good.fasta').read(), open('test/test_results/paired.qc.good.fasta').read()) self.assertEqual(open('test/test_output/paired.qc.good.qual').read(), open('test/test_results/paired.qc.good.qual').read()) self.assertEqual(open('test/test_output/paired.qc.good.names').read(), open('test/test_results/paired.qc.good.names').read()) self.assertEqual(open('test/test_output/paired.qc.bad.fasta').read(), open('test/test_results/paired.qc.bad.fasta').read()) self.assertEqual(open('test/test_output/paired.qc.bad.qual').read(), open('test/test_results/paired.qc.bad.qual').read()) self.assertEqual(open('test/test_output/paired.qc.bad.names').read(), open('test/test_results/paired.qc.bad.names').read())
def testCompression(self): args.truncate = None args.paired = True args.forward_fastq = 'test/test1.fastq.gz' args.reverse_fastq = 'test/test2.fastq.bz2' args.output_prefix = 'test/test_output/paired' args.output_compression = 'gz' moira.main(args) self.assertEqual( gzip.GzipFile('test/test_output/paired.qc.good.fasta.gz').read(), open('test/test_results/paired.qc.good.fasta').read()) args.output_compression = 'bz2' moira.main(args) self.assertEqual( bz2.BZ2File('test/test_output/paired.qc.good.fasta.bz2').read(), open('test/test_results/paired.qc.good.fasta').read())