Dear all,
I want to change the header of big fasta file as this:
>JH208680.1 dna:scaffold scaffold:PelSin_1.0:JH208680.1:1:16024077:1 REF
CTACCCATTCCTTTCCTTTGGTGTACTGTAGTCCTTCTATTAGGGGAACTAATGGGGAAC
TTTTCTTTATGCACCCTCTCCACACCACTCTTGCTTTTATAGACCTCTATCATATCCCCC
CTCCGTCTCCTCTTCTCTAAGCTGAAAAGTCCCAGTCTCTTTAGCCTCTCTTCATATGGG
ACCTGTTCCAAACCC
And change it to
>JH208680.1
CTACCCATTCCTTTCCTTTGGTGTACTGTAGTCCTTCTATTAGGGGAACTAATGGGGAAC
TTTTCTTTATGCACCCTCTCCACACCACTCTTGCTTTTATAGACCTCTATCATATCCCCC
CTCCGTCTCCTCTTCTCTAAGCTGAAAAGTCCCAGTCTCTTTAGCCTCTCTTCATATGGG
ACCTGTTCCAAACCC
I use this command, but take a little time as:
awk '{if($1 ~ /^>/){split($1,a,"\s"); print a[1]}else{print}}' input.fasta > input.rename.fasta
Did this fast or not? did any one have better solution for faster?
thanks
P.S. the ">" was not shown here, but it is as fasta file ZQ
Are you losing money on this. Why worry if it is working :)
it is working, but slow. so I want some better one.