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