Results for "Print"

Wire posts

  • Fasta sequence length: awk '/^>/ {if (seqlen){print seqlen}; print ;seqlen=0;next; } { seqlen += length($0)}END{print seqlen}' file.fa #Length #Linux #OneLiner

    2673 days ago

  • Remove all blank lines from file. perl -i.bak -n -e "print if /\S/" ../finalSample.fa #Perl #Tricks #PerlOneliner

    2636 days ago

  • #Extract a #sequence from #multi-fasta file: $ perl -ne 'if(/^>(\S+)/){$c=grep{/^$1$/}qw(id1 id2)}print if $c' fasta.file

    2624 days ago

  • To clean up a fasta file so only first column of the header is outputted:$ awk '{print $1}' file.fa > output.fa #Sed #Clean #Header #Fasta

    2585 days ago

  • Rename/number the multi-fasta file in ascending order. $ awk '/^>/{print ">" ++i; next}{print}' < Mix_assembly.fasta > Mix_assembly2.fasta #awk #oneliner

    2553 days ago

  • Count the number of bases in fasta file. grep -v ">" file.fasta | wc | awk '{print $3-$1}' #Fasta #Count #Bases

    2522 days ago

  • Find a pattern in first 7 characters of reads. bioawk -c fastx 'substr($seq,0,7) == $TAG { print }' reads.fq.gz #Reads #NGS #Extract #Pattern

    2515 days ago

  • Print each command before executing? Bash script to print each command before executing. $ bash -x myscript.sh #Print #Command #Bash

    2486 days ago

  • Get the reads in fastq file: awk '{s++}END{print s/4}' file.fastq #reads #count #ngs #fastq

    2384 days ago

  • Remove the fasta with zero size: awk 'BEGIN {RS = ">" ; FS = "\n" ; ORS = ""} $2 {print ">"$0}' input.fas > output.fas #fasta #remove

    2359 days ago