Exemplo n.º 1
0
 def test_autodetect_fastq_format(self):
     path = os.path.join(self._tmpdir, 'tmp.fastq')
     fmt = get_format(path)
     with open_output(path, "w") as f:
         for seq in simple_fastq:
             f.write(fmt.format(seq))
     assert list(openseq(path)) == simple_fastq
Exemplo n.º 2
0
	def test_autodetect_fastq_format(self):
		path = os.path.join(self._tmpdir, 'tmp.fastq')
		fmt = get_format(path)
		with open_output(path, "w") as f:
			for seq in simple_fastq:
				f.write(fmt.format(seq))
		assert list(openseq(path)) == simple_fastq
Exemplo n.º 3
0
 def test_write_qualities_to_fasta(self):
     path = os.path.join(self._tmpdir, 'tmp.fasta')
     fmt = get_format(path, qualities=True)
     assert isinstance(fmt, FastaFormat)
     with open_output(path, "w") as f:
         for seq in simple_fastq:
             f.write(fmt.format(seq))
     assert list(openseq(path)) == simple_fasta
Exemplo n.º 4
0
	def test_write_qualities_to_fasta(self):
		path = os.path.join(self._tmpdir, 'tmp.fasta')
		fmt = get_format(path, qualities=True)
		assert isinstance(fmt, FastaFormat)
		with open_output(path, "w") as f:
			for seq in simple_fastq:
				f.write(fmt.format(seq))
		assert list(openseq(path)) == simple_fasta
Exemplo n.º 5
0
 def test_fastq_qualities_missing(self):
     with raises(ValueError):
         path = os.path.join(self._tmpdir, 'tmp.fastq')
         get_format(path, qualities=False)
Exemplo n.º 6
0
	def test_fastq_qualities_missing(self):
		path = os.path.join(self._tmpdir, 'tmp.fastq')
		get_format(path, qualities=False)