Tag Archives: <code>
Python ChIP-seq BED file reader
A simple BED file reader in Python. import csv class CommentedFileReader: """ Helper class for file reading. Skips lines starting with ‘#’ tsv_file = csv.reader(CommentedFileReader("inputfile.txt"), delimiter=’\t’) for row in tsv_file: print row[2] # prints column 3 of each line """ def __init__(self, f, commentstring="#"): self.f = open(f, ‘rU’) self.commentstring = commentstring def next(self): line = self.f.next() while line.startswith(self.commentstring): line … Continue reading
WordPress Syntax Highlighting: SyntaxHighlighter Plus Review
Plugin: SyntaxHighlighter Plus 0.18 Backend: Google Syntax Highlighter Javascripts Score: 7/10 The SyntaxHighlighter Plus is another WordPress highlighting plugin based off of the Google SyntaxHighlighter. (See my Google Syntax Highlighter Review) But while the Google Syntax Highlighter plugin simply inserts links to the javascripts, SyntaxHighlighter Plus is more integrated into WordPress. It uses BBcode tags instead of <pre> and doesn’t … Continue reading
WordPress Syntax Highlighting: Google Syntax Highlighter Review
Plugin: Google Syntax Highlighter 1.5.1 Backend: Google Syntax Highlighter Javascripts Score: 7/10 Google Syntax Highlighter uses Google’s Syntax Highlighter by Alex Gorbatchev. Installation is easy, just unzip and activate. If it doesn’t work, make sure that your theme has a <?php wp_footer(); ?> tag just before the </body> tag. Google Syntax Highlighter supports C++, C#, css, delphi, java, javascript, php, … Continue reading
WordPress Syntax Highlighting: WP Chili Review
Plugin: WP Chili 1.1 Backend: Chili 2.2 Score: 3/10 WP Chili was the #1 pick by Chris Cagle’s WordPress Syntax Highlighting Plugins Review, so I thought I’d give it a try. I’m looking for a highlighter for c/c++ code and probably bash/perl/python scripts I’ll be posting here. My test platform is Utuntu Hardy with Firefox 3.0.1 and Opera 9.50 beta … Continue reading