I have a txt files(very huge one) about genes, the txt file contains gene names, gene entrez_id, chrom,start, end and sequence columns. I want to put gene names, gene entrez_id, chr, start and end columns into one, and sequence will be in a new line. Basically, I want to convert txt file to fasta format with Linux command. ex: > SAMD11_148398_chr1_879534_879961 GGTTGC
I tried to use online converter, but my file is so huge, so it will be good to use command line to convert.
Did you try anything? If yes, please show us, people here try to correct your code. If not, try
awk
.I tried some online tools, but it failed. I was thinking use awk. And Pierre's just gave me exactly what I wanted.
I would suggest you to write an example of input and output lines. Just to let the people figure out more easily what are you expecting :)
Thanks to both of you.very efficient
Please use
ADD REPLY/ADD COMMENT
when responding to existing posts to keep threads logically organized.Remember to accept one (or more) answers as correct (use the check-mark symbol against the answer).