fgpyo
fgpyo copied to clipboard
Add `as_fastafile` method to `FastaBuilder`
It'd be convenient to have a method that exposes the built FASTA as a pysam.FastaFile
, e.g. to condense the following
fasta_path = tmp_path / "foo.fa"
fasta_builder.to_file(fasta_path)
fasta_file = FastaFile(str(fasta_path))