Last active
February 20, 2021 04:08
-
-
Save aptitudepi/3f140a629c9bceba1e779a0c39e9f3da to your computer and use it in GitHub Desktop.
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
#!/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