Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

biopython parse fasta

from Bio import SeqIO

fasta_sequences = SeqIO.parse(open(input_file),'fasta')
with open(output_file) as out_file:
    for fasta in fasta_sequences:
        name, sequence = fasta.id, str(fasta.seq)
        new_sequence = some_function(sequence)
        write_fasta(out_file)
Source by www.biostars.org #
 
PREVIOUS NEXT
Tagged: #biopython #parse #fasta
ADD COMMENT
Topic
Name
6+8 =