This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Turning Seq objects into strings

There are any way that i can transform a input string in to a byopython Seq object? I try a lot of things and search in the google but not a answer. Thanks

sequence

Not really @joe. He might be a biologist and not a programmer like yourself and I.

seq1 = SeqIO.read("example_fasta_files/homo_sapiens_lactate.fasta", "fasta")
print(type(seq1.seq)) #this is the seq attribute of the seq1 object
strrep = str(seq1.seq) #so cast the seq attribute to str
print(type(strrep)) #this shows type string, it worked
print(strrep) # this is the string

0 answers

No answers yet.

Log in to answer this question.