def test_execution(self): inDir = util.file.get_test_input_path(self) inBam = os.path.join(inDir, 'G3952.1.subsamp.bam') clipDb = os.path.join(inDir, 'clipDb.fasta') outFasta = util.file.mkstempfname('.fasta') assembly.assemble_trinity(inBam, outFasta, clipDb, threads=4) self.assertGreater(os.path.getsize(outFasta), 0) os.unlink(outFasta)
def test_empty_input_succeed(self): inDir = util.file.get_test_input_path() inBam = os.path.join(inDir, 'empty.bam') clipDb = os.path.join(inDir, 'TestAssembleTrinity', 'clipDb.fasta') outFasta = util.file.mkstempfname('.fasta') assembly.assemble_trinity(inBam, clipDb, outFasta, always_succeed=True) self.assertEqual(os.path.getsize(outFasta), 0) os.unlink(outFasta)
def test_assembly(self): inDir = util.file.get_test_input_path(self) inBam = os.path.join(inDir, '..', 'G5012.3.subset.bam') clipDb = os.path.join(inDir, 'clipDb.fasta') outFasta = util.file.mkstempfname('.fasta') assembly.assemble_trinity(inBam, clipDb, outFasta) self.assertGreater(os.path.getsize(outFasta), 0) contig_lens = list(sorted(len(seq.seq) for seq in Bio.SeqIO.parse(outFasta, 'fasta'))) self.assertEqual(contig_lens, [328, 348, 376, 381]) os.unlink(outFasta)
def test_assembly(self): inDir = util.file.get_test_input_path(self) inBam = os.path.join(inDir, '..', 'G5012.3.subset.bam') clipDb = os.path.join(inDir, 'clipDb.fasta') outFasta = util.file.mkstempfname('.fasta') assembly.assemble_trinity(inBam, clipDb, outFasta, threads=4) self.assertGreater(os.path.getsize(outFasta), 0) contig_lens = list(sorted(len(seq.seq) for seq in Bio.SeqIO.parse(outFasta, 'fasta'))) self.assertEqual(contig_lens, [328, 348, 376, 381]) os.unlink(outFasta)