Пример #1
0
 def influenza_impute(self, aligner):
     outImputeFasta = util.file.mkstempfname('.fasta')
     expected = os.path.join(self.inDir, 'expected.influenza.impute.'+aligner+'.fasta')
     # ensure we can run impute_from_reference from the output of order_and_orient
     # without errors, but don't actually check the output
     assembly.impute_from_reference(
         self.outOrientFasta,
         self.refFasta,
         outImputeFasta,
         minLengthFraction=0.8,
         minUnambig=0.2,
         replaceLength=5,
         newName='test_influenza.genome',
         aligner=aligner)
 def influenza_impute(self, aligner):
     outImputeFasta = util.file.mkstempfname('.fasta')
     expected = os.path.join(
         self.inDir, 'expected.influenza.impute.' + aligner + '.fasta')
     # ensure we can run impute_from_reference from the output of order_and_orient
     # without errors, but don't actually check the output
     assembly.impute_from_reference(self.outOrientFasta,
                                    self.refFasta,
                                    outImputeFasta,
                                    minLengthFraction=0.8,
                                    minUnambig=0.2,
                                    replaceLength=5,
                                    newName='test_influenza.genome',
                                    aligner=aligner)
Пример #3
0
 def test_small_mummer(self):
     inDir = util.file.get_test_input_path(self)
     outFasta = util.file.mkstempfname('.fasta')
     expected = os.path.join(inDir, 'expected.sub.ebov.impute.fasta')
     assembly.impute_from_reference(
         os.path.join(inDir, 'test.pseudo.fasta'),
         os.path.join(inDir, 'ref.sub.ebov.fasta'),
         outFasta,
         minLengthFraction=0.8,
         minUnambig=0.2,
         replaceLength=5,
         newName='test_sub-EBOV.genome',
         aligner='mummer')
     self.assertEqual(
         str(Bio.SeqIO.read(outFasta, 'fasta').seq),
         str(Bio.SeqIO.read(expected, 'fasta').seq))
Пример #4
0
 def test_varicella_big_muscle(self):
     inDir = util.file.get_test_input_path(self)
     outFasta = util.file.mkstempfname('.fasta')
     expected = os.path.join(inDir, 'expected.hhv3.muscle.fasta')
     inDirBase = util.file.get_test_input_path()
     assembly.impute_from_reference(
         os.path.join(inDirBase, 'TestOrderAndOrient', 'expected.hhv3.fasta'),
         os.path.join(inDirBase, 'TestOrderAndOrient', 'ref.hhv3.fasta'),
         outFasta,
         minLengthFraction=0.8,
         minUnambig=0.6,
         replaceLength=55,
         newName='HHV3-test')
     self.assertEqual(
         str(Bio.SeqIO.read(outFasta, 'fasta').seq),
         str(Bio.SeqIO.read(expected, 'fasta').seq))
Пример #5
0
 def test_small_mummer(self):
     inDir = util.file.get_test_input_path(self)
     outFasta = util.file.mkstempfname('.fasta')
     expected = os.path.join(inDir, 'expected.sub.ebov.impute.fasta')
     assembly.impute_from_reference(os.path.join(inDir,
                                                 'test.pseudo.fasta'),
                                    os.path.join(inDir,
                                                 'ref.sub.ebov.fasta'),
                                    outFasta,
                                    minLengthFraction=0.8,
                                    minUnambig=0.2,
                                    replaceLength=5,
                                    newName='test_sub-EBOV.genome',
                                    aligner='mummer')
     self.assertEqual(str(Bio.SeqIO.read(outFasta, 'fasta').seq),
                      str(Bio.SeqIO.read(expected, 'fasta').seq))
Пример #6
0
 def test_varicella_big_muscle(self):
     inDir = util.file.get_test_input_path(self)
     outFasta = util.file.mkstempfname('.fasta')
     expected = os.path.join(inDir, 'expected.hhv3.muscle.fasta')
     inDirBase = util.file.get_test_input_path()
     assembly.impute_from_reference(
         os.path.join(inDirBase, 'TestOrderAndOrient', 'expected.hhv3.fasta'),
         os.path.join(inDirBase, 'TestOrderAndOrient', 'ref.hhv3.fasta'),
         outFasta,
         minLengthFraction=0.8,
         minUnambig=0.6,
         replaceLength=55,
         newName='HHV3-test')
     self.assertEqual(
         str(Bio.SeqIO.read(outFasta, 'fasta').seq),
         str(Bio.SeqIO.read(expected, 'fasta').seq))