New to coding. New to Pytho/biopython; this is my first question online, ever. How do I open a compressed fasta.gz file to extract info and perform calcuations in my functi
Are you using python3?
This ("r" --> "rt") could solve your problem.
import gzip from Bio import SeqIO with gzip.open("practicezip.fasta.gz", "rt") as handle: for record in SeqIO.parse(handle, "fasta"): print(record.id)