Skip to content

Instantly share code, notes, and snippets.

David Fredman davfre

Block or report user

Report or block davfre

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davfre
davfre / jgi2gtf.pl
Last active Aug 29, 2015
Convert JGI gtf-like annotation file to GTF2.2 format
View jgi2gtf.pl
#!/usr/bin/perl -w
use strict;
use warnings;
=head1
Author: david.fredman@uib.no
This script converts a JGI gtf-like file:
scaffold_1 JGI exon 46078 46218 . + . name "gw.1.597.1"; transcriptId 65742
@davfre
davfre / filterById.pl
Last active Aug 29, 2015
Filter a textfile to output only the lines where a given identifier is present.
View filterById.pl
#!/usr/bin/perl
use strict;
my $usage = "cat input.gtf | $! idlist.txt > filtered.gtf\n";
my %ids;
my $FN_idlist = $ARGV[0];
open my $FH_idlist, "<", $FN_idlist or die $usage;
# read id list to memory
@davfre
davfre / bamfilter_oneliners.md
Last active Nov 21, 2019
SAM and BAM filtering oneliners
View bamfilter_oneliners.md
@davfre
davfre / git_cheat-sheet.md
Last active Dec 7, 2019
git commandline cheat-sheet
View git_cheat-sheet.md
@davfre
davfre / IBM Tivoli 6.4.0 Installation on Ubuntu 12.10.md
Last active Jul 9, 2019
Installation procedure for the IBM Tivoli 6.4.0 client for Ubuntu 12.10.
View IBM Tivoli 6.4.0 Installation on Ubuntu 12.10.md

The procedure below documents how to install the IBM Tivoli client on the Ubuntu linux distribution. The steps involve unpacking the distributed RPMs, removing and renaming a few files in the resulting folders, and editing and adding a few configuration text files, followed by packaging .deb files for installation.

Adapted from http://adsm.org/forum/showthread.php?21143-How-To-Install-TSM-Client-552-on-Ubuntu-10.04-amd64

Current versions: IBM Tivoli 6.4.0 Ubuntu 12.10

View .tmux.conf
#go to last active window (hit C-b twice)
bind-key C-b last-window
#split windows key bindings
unbind %
bind | split-window -h
bind - split-window -v
#status bar
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H'
@davfre
davfre / Pattern.t
Created Nov 14, 2012
Test script for AppliedProgramming course, Exercise 6
View Pattern.t
use Test::More tests => 15;
use Pattern;
use Restriction;
use strict;
use warnings;
# sequences for testing
my $testsequence0 = "AAAAAAAAAACGATCTAAAAAAA" ; #should not match
my $testsequence1 = "AAAAAAAAAAAGATCCAAAAAAA" ; #should match
my $testsequence2 = "AAAAAAAAAAGGATCTAAAAAAA" ; #should match
@davfre
davfre / MultiPipingExamples.md
Created Oct 31, 2012
# Multiple pipes to/from one process
View MultiPipingExamples.md
View .screenrc
escape ^Tt
caption string "%?%F%{= Bk}%? %C%A %D %d-%m-%Y %{= kB} %t%= %?%F%{= Bk}%:%{= wk}%? %n "
shell bash
defscrollback 10000
hardstatus on
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
vbell off
@davfre
davfre / day2_exercise1_template.pl
Created Oct 17, 2012
Applied Programming course examples
View day2_exercise1_template.pl
#!/usr/bin/perl
# Template for Applied Programming course exercise Day2 Exercise 1
use strict;
use warnings;
my @sampleA = (65,69,70,63,70,68);
my @sampleB = (102,95,98,110);
my @sampleC = (112,115,113,109,95,98,100);
You can’t perform that action at this time.