Greg Slodkowicz Chris Workman Group Center For Biological Sequence Analysis
Greg Slodkowicz Chris Workman Group Center For Biological Sequence Analysis
Greg Slodkowicz Chris Workman group Center for Biological Sequence Analysis
Overview Language usage trends Practical language comparison Perl design Bioinformatics library comparison
Overview Language usage trends Practical language comparison Perl design Bioinformatics library comparison
Software engineering perspective Effort (/time) to solve a problem is proportional to the number of lines needed for the solution [1] The number of bugs per line of code is constant regardless of the language used [2]
Practical comparison
We compare several small problems implemented in each language: dna2prot Translate DNA to amino acid sequence fasta* Generate and write random DNA sequences reverse-complement* Read DNA sequences and write their reverse-complement k-nucleotide* Repeatedly update hashtables and k-nucleotide strings regex-dna* Match DNA 8-mers and substitute nucleotides for IUB code
Overview Language usage trends Practical language comparison Perl design Bioinformatics library comparison
Unix legacy
Perl
$str =~ /xxx$/ $str !~ /xxx$/ `cmd` s/xxx/yyy/ tr/abc/xyz/ <FILE>
Python
str.endswith(xxx) not str.endswith(xxx) os.system(cmd)
Java
str.endsWith(xxx) !str.endsWith(xxx) Runtime.exec(cmd)
Perl philosophy
() Perl is chock-full of exceptions to its rules. This is a good thing, as real life is chock-full of exceptions to rules.
Overview Language usage trends Practical language comparison Perl design Bioinformatics library comparison
Summary Changing landscape of programming practice Scripting languages are more suited for teaching bioinformatics New languages emerge and can make teaching bioinformatics easier There are more and more viable bioinformatics libraries
Questions?