Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)
Esempio n. 6
0
 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)