User:Timothee Flutre/Notebook/Postdoc/2012/05/25
From OpenWetWare
(Difference between revisions)
(→Awk one-liner to convert fasta file into fastq format: dedicate this page for one-liners) |
(→One-liners with GNU tools: add tutorial + list of other tools) |
||
| Line 8: | Line 8: | ||
==One-liners with GNU tools== | ==One-liners with GNU tools== | ||
| - | * [http://en.wikipedia.org/wiki/AWK AWK] | + | * '''Tutorial''': [http://www.ibm.com/developerworks/aix/library/au-unixtext/index.html Introduction to text manipulation on UNIX-based systems] by Brad Yoes (IBM) |
| + | |||
| + | |||
| + | * '''Toolbox''': | ||
| + | ** [http://en.wikipedia.org/wiki/AWK AWK] | ||
| + | ** grep | ||
| + | ** sed | ||
| + | ** cut | ||
| + | ** tr | ||
| + | ** wc | ||
Revision as of 03:01, 22 November 2012
Main project page Previous entry Next entry
| |
One-liners with GNU tools
awk 'function abs(x){return (((x < 0.0) ? -x : x) + 0.0)} {print abs($1)}' input.txt
awk 'BEGIN{RS=">"} {if(NF==0)next; split($0,a,"\n"); printf "@"a[1]"\n"a[2]"\n+\n"; \
for(i=1;i<=length(a[2]);i++)printf "}"; printf"\n"}' probes.fa > probes.fq
| |



