[BioRuby] how to convert sequence to fasta format with header information?
rozziite at gmail.com
Thu Jul 30 22:04:59 UTC 2009
I want to retrieve sequence from a pdb file and save it in fasta format
where* header holds the pdb entry id*. This is how I did it:
file = File.new('1OOP.pdb').gets(nil)
structure = Bio::PDB.new(file)
seq = structure.seqres['A']
puts seq.to_fasta("1OOP", 70)
it works and produces result i want:
However, according to documation Bio::Sequence::Common#to_fasta is a
deprecated method and it suggests to use Bio::Sequence#output, but when I
modify code to
it gives error that method is not defined. Also I don't see a way how to
define the header.
What should i use in place of the deprecated to_fasta method?
More information about the BioRuby