Results for "awk"

Wire posts

  • Awk hack for bioinformatician https://www.shellhacks.com/awk-print-column-change-field-separator-linux-bash/ #Hack #Bioinfo #Bash

    1558 days ago

  • Extract the underscore separated values. $ awk '{split($0,a,"_"); print a[1]"_"a[2]}' aaa.txt | sort | uniq -u > all_ids_sm.txt #awk #bash #underscore #list

    1483 days ago

  • Split the #multifasta to #singlefasta awk '$0 ~ "^>" { match($1, /^>([^:]+)/, id); filename=id[1]} {print >> filename".fa"}' input.fa

    1393 days ago

  • Count number of fasta sequence $ awk '/^>/ { f = !a[$0]++ } f' aaaa.fa > bbbb.fa #count #fasta #oneliner

    968 days ago

  • Delete all the headers from multifasta file $ awk 'BEGIN {print ">"ARGV[1]};!/^>/{print}' test.fa #fasta #delete #header #multifasta

    96 days ago

  • #Multi-line fasta to #Single-line Fasta $ awk '/^>/ {if (NR>1) print ""; printf("%s\n", $0); next; } { printf("%s", $0) } END { printf("\n"); }' multi_line.fasta > single_line.fasta

    87 days ago