Script en python para convertir secuencias de proteínas de Stockholm a fasta

Aquí os dejo un pequeño python script que convierte “multiple sequence alignments” del formato Stockholm a Fasta de una forma sencilla y rápida.
[code language=”python”]
import sys
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
if(len(sys.argv) <3):
print(‘two arguments needed: input path, output path’)
with open(sys.argv[1],’r’) as inFile:
with open(sys.argv[2], "w") as output_handle:
SeqIO.write(list(SeqIO.parse(inFile,’stockholm’)), output_handle, "fasta")

Newsletter subscription

Leave a Reply

Your email address will not be published. Required fields are marked *