Perl way to check if an array contains values
...ue exist in an array. do_something if 'flour' ~~ @ingredients # ~~ operand. BEWARE: it is broken.do_something if grep {$_ eq 'flour'} @ingredients # grep (slower than 'any')do_somethi...2655 days ago
Basic command-line to run BLAST
...stead of nucleotides. How many sequences are in each one? grep -c '^>' cow.1.protein.faa grep -c '^>' human.1.protein.fa...otein.faa > cow.medium.faa What size is this db? grep -c '^>' cow.medium.faa...2286 days ago
Linux command line exercises for NGS data processing
...wk in the exercises as it is a language in itself and is used more often to manipulate NGS data as compared to the other command line tools such as grep, sed, perl etc. Furthermore,...2915 days ago
Many-Core Engine (MCE) for Perl example
...model. MCE::Flow is similar to MCE::Loop, but allows for multiple code blocks to run in parallel with a slight change to syntax. MCE::Grep Provides a parallel grep implementation similar to the...2692 days ago
2193 days ago
Check the Size of a directory & Free disk space.
...Hence instead of kilobytes as the unit the output would have 'M' for Megabytes and 'G' for Gigabytes.Example: Linux installed on /dev/hda1$ df -h | grep /dev/hda1 All right, this is...3744 days ago
3656 days ago
Most Commonly used Awk by Bioinformatician
...n many practical cases. Why awk? You can replace a pipeline of 'stuff | grep | sed | cut...' with a single...he average of column 2: awk '{x+=$2}END{print x/NR}' input.txt regex (egrep): awk '/^test[0-9]+/' input....3954 days ago
Perl one-liner for bioinformatician !!!
...ne 'printf "%-5d %s", $., $_' : for all the lines)perl -le 'print scalar(grep{/./}<>)' #prints the to..., @ascii)'#converts ascii values into character strings.perl -le '@odd = grep {$_ % 2 == 1} 1..100; print "...3669 days ago
3222 days ago
Genetic Algorithms demonstration with word DNA in Perl
...have only the fitness come through my @weights = map { $_->{fitness} } grep { $_->{survived} } @$pop...rds over $max_entry_length letters, and uppercase them @dictionary = grep { length($_) > 1 && length($...2413 days ago
2193 days ago
1562 days ago
Comment on "Perl script to count number of Ns in a multifasta file !"
If you want to count all 'N' in miltifasta file. (base) ? output_2_test git:(master) ? more scaffolds.fasta | grep -Ho N * | uniq -c 12 draf...1604 days ago