Skip to content

Instantly share code, notes, and snippets.

@aptitudepi
Last active February 20, 2021 04:08
Show Gist options
  • Save aptitudepi/3f140a629c9bceba1e779a0c39e9f3da to your computer and use it in GitHub Desktop.
Save aptitudepi/3f140a629c9bceba1e779a0c39e9f3da to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
first_line = true
while line = STDIN.gets
line.chomp!
if line =~ /^>/
puts unless first_line
print line[1..-1]
print "," # <-- Change this to "\t" and it's a convert-fasta-to-tab
else
print line
end
first_line = false
end
puts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment