-
-
Save maasha/da77da2bfa106a476af6 to your computer and use it in GitHub Desktop.
Hangs after printing here1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Open3.popen3(cmd.join(" ")) do |stdin, stdout, stderr, wait_thr| | |
input.each_with_index do |record, i| | |
if record[:SEQ] | |
entry = BioPieces::Seq.new_bp(record) | |
entry.seq_name ||= i | |
stdin.puts entry.to_fasta | |
end | |
if output | |
output << record | |
status[:records_out] += 1 | |
end | |
end | |
puts "here0" | |
stdin.close | |
puts "here1" | |
tree_data = stdout.read.chomp | |
puts "here2" | |
stdout.close | |
puts "here3" | |
exit_status = wait_thr.value | |
puts "here4" | |
raise stderr.read unless exit_status.success? | |
if options[:output] | |
File.open(options[:output], 'w') do |ios| | |
ios.puts tree_data | |
end | |
else | |
puts tree_data | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment