Results for "Trick"

Tags

  • Sort FASTA sequence by length: cat f1.fasta| awk '{if($0 ~ /^>/){printf "%st", $0}else{print length($0)"t"$0}}'| sort -k2n,2| awk '{print $1"n"$3}' > sequence.fasta #Sort #Fasta #Trick #Onliner

    Tags: Sort, Fasta, Trick, Onliner

    3151 days ago

  • Display top 10 Mrmory resource intensive processes in order $ line=$(ps aux | head -n 1) && echo $line; ps aux | sort -nrk 5 | head #Display #Top10 #Memory #Processes #Linux #Trick

    Tags: Display, Top10, Memory, Processes, Linux, Trick

    3126 days ago

  • Search and replace the string 'this' with the string 'that' in the file filename. perl -p -i -e 's/this/that/g' filename #Perl #Trick #PerlOneLiner #Tipsoftheday #Replace #FindandReplace

    Tags: Perl, Trick, PerlOneLiner, Tipsoftheday, Replace, FindandReplace

    3126 days ago

  • Extract sequences by their ID from a fasta file. perl -ne 'if(/^>(\S+)/){$c=$i{$1}}$c?print:chomp;$i{$_}=1 if @ARGV' ids.txt sample1.fa #Extract #Sequences #IDs #Fasta #Perl #Trick #Oneliner

    Tags: Extract, Sequences, IDs, Fasta, Perl, Trick, Oneliner

    3123 days ago

  • Remove the fasta description and just keep the identifier. perl -p -i -e 's/>(.+?) .+/>$1/g' sample1.fa #Perl #Oneliner #Trick #Tips #Fasta #Identifier #Remove

    Tags: Perl, Oneliner, Trick, Tips, Fasta, Identifier, Remove

    3123 days ago

  • To uninstall a perl module $ cpanm --uninstall <Module::Name> #Perl #Trick #Uninstall #Module

    Tags: Perl, Trick, Uninstall, Module

    2979 days ago

  • Delete space from FASTA header: perl -pe 's/>\S+\K.+//' < file.fasta > new_file.fasta #PerlOneLiner #Trick #Perl #Space #Fasta

    Tags: PerlOneLiner, Trick, Perl, Space, Fasta

    2942 days ago

  • Print all text after a matching string perl -ne "print unless 1 .. m(String)" #Perl #OneLiner #String #Perl #Trick

    Tags: Perl, OneLiner, String, Perl, Trick

    2938 days ago

  • Perl common flags http://perldoc.perl.org/functions/-X.html # Perl #Flags #Trick

    Tags: Flags, Trick

    2935 days ago

  • Check if BAM file is sorted or not use: for F in `find . -name "*.bam"`; do echo $F; samtools index ${F} ; done #Sort #BAM #Trick

    Tags: Sort, BAM, Trick

    2832 days ago