示例#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
示例#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
示例#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
示例#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
示例#5
0
 def test_fastq_qualities_missing(self):
     with raises(ValueError):
         path = os.path.join(self._tmpdir, 'tmp.fastq')
         get_format(path, qualities=False)
示例#6
0
	def test_fastq_qualities_missing(self):
		path = os.path.join(self._tmpdir, 'tmp.fastq')
		get_format(path, qualities=False)