This is a test version of Biostars. For the public version, visit https://www.biostars.org.
sequence head change!

Hi, I have a lot of like as

HWI-ST1234:231:H2CNTADXY:1:1101:6127:2223       ACGAATCCGTGCGACGTGGGGCTGGAT     71
HWI-ST1234:231:H2CNTADXY:1:1101:19654:2083      CCTTTCTCCTCTTCGGCCTTCAAAGTTC    63.

I want to change to format like as

>HWI-ST1234:231:H2CNTADXY:1:1101:6127:2223 71
ACGAATCCGTGCGACGTGGGGCTGGAT
>HWI-ST1234:231:H2CNTADXY:1:1101:19654:2083 63
CCTTTCTCCTCTTCGGCCTTCAAAGTTC

Have some ways do like this for a lot of sequence? Thanks Fuyou

rna-seq

It's not immediately clear to me what has to be changed and what format your data is in...

2 answers

awk '{printf(">%s %s\n%s\n",$1,$3,$2);}' in > out

and that's not much different from a previous answer for a question you asked: C: Add a sequence name!

Thanks. It works.

so mark this question as answered, (icon on the left), as well as your previous question. Thanks.

awk -F " " '{print">"$1,$3,$2"\n>"$4,$6,$5}' in.fastq > out.fastq

Hi rbagnall, Thanks, your results is HWI-ST1234:231:H2CNTADXY:1:1101:6127:2223 71 ACGAATCCGTGCGACGTGGGGCTGGAT , it is not like

HWI-ST1234:231:H2CNTADXY:1:1101:6127:2223 71 ACGAATCCGTGCGACGTGGGGCTGGAT.

Thanks Rbagnall. It works well. Fuyou

Log in to answer this question.