tab to fasta file conversion
can someone kindly help me out how to convert tab delimited protein file (ID in one column and sequence in second column) into fasta file ?? any simple solution plz
thanks
• 12,258 views
•
link
2 answers
I think you could do this with awk, give this a try:
awk '{print ">"$1"\n"$2}' tab.tsv > seqs.fa
Let me know if that works for you!
Dennis
edit: $1 is your name column and $2 is your sequence column, so switch those if the order is sequence, name.
• 1 views
•
link
if first column doesn't have >:
awk -v OFS="\n" '{print ">"$1,$2}' test.txt
sed -e 's/^/>/;s/\t/\n/g' test.txt
parallel --colsep '\t' echo -e '\>{1}\\n{2}' :::: test.txt
• 1 views
•
link
Log in to answer this question.
Try something-there are multiple solutions. If you get stuck, post your efforts and errors.
some example data?
Something like
Biopython version: A: Biopython: SeqIO.write () function to write dictionary object to fasta file
it is easy to make, using for example the interface galaxy, this function is present here