From: Marcelo Laia Date: 2012-11-05T06:35:04+09:00 Subject: undefined method `map' Hi, A biostar user helped me with a code to help me download fasta files from KEGG. The code is named get_fasta4 -----CODE START HERE-------- #!/usr/bin/env ruby require "rubygems" require "bio" serv = Bio::KEGG::API.new # search for xac + hypothetical xac = serv.bfind("T00084 hypothetical") # get the IDS into an array ids = xac.map { |gene| $1 if gene =~/^(.*?)\s+/ } # retrieve fasta and print ids.each { |id| puts serv.bget("-f -n 1 #{id}") } -----CODE END HERE-------- However, in my system, Debian Testing, I got an error: marcelo@marcelo:~$ get_fasta4 /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. /home/marcelo/bin/scripts/get_fasta4:10:in `
': undefined method `map' for # (NoMethodError) marcelo@marcelo:~$ marcelo@marcelo:~$ ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [i486-linux] marcelo@marcelo:~$ marcelo@marcelo:~$ gem search soap *** LOCAL GEMS *** soap4r (1.5.8) soap4r-ruby1.9 (2.0.5) soap4r-ruby19 (1.5.9) marcelo@marcelo:~$ Could you help me? Thank you very much! -- O___ - Marcelo Luiz de Laia c/ /'_ - Diamantina (*) \(*)- Minas Gerais ~~~~~~~~~- Brazil ^^^^^^^^^- Linux user number 487797