Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View maasha's full-sized avatar
💭
HackHackHack...

Martin Asser Hansen maasha

💭
HackHackHack...
View GitHub Profile
#!/usr/bin/perl -w
use strict;
# Filenames
my $start10 = 'start10.dat';
my $res10 = 'res10.dat';
# Opening the files
open (START, '<', $start10) or die "Could not read file\n";
my %names = ();
while (defined (my $line = <START>)) {
chomp $line;
$names{$line};
}
#!/usr/bin/perl -w
use strict;
# Lea Benedicte Skov Hansen, Mar 2013
# This program reads a table, sums the rows and create a histogram of the sums
my $input = 'test_count.txt'; #'count.matrix.ratio_new';
my $output = 'row_sum_his.txt';
my $interval = 5;
@maasha
maasha / gist:5151814
Last active December 14, 2015 21:29 — forked from anonymous/gist:5151700
#!/usr/bin/env perl
use warnings;
use strict;
use Data::Dumper;
# Lea Benedicte Skov Hansen, Mar 2013
# This program reads a table, sums the rows and create a histogram of the sums
maasha@maxwell:~/data/qiime_tutorial-v1.5.0$ print_qiime_config.py -t
System information
==================
Platform: linux2
Python version: 2.7.3 (default, Jan 28 2013, 09:50:08) [GCC 4.4.5]
Python executable: /disk/orsted/install/maasha/QIIME1.6/bin/python
Dependency versions
===================
maasha@maxwell:~/data$ unzip qiime_tutorial-v1.5.0.zip
Archive: qiime_tutorial-v1.5.0.zip
creating: qiime_tutorial-v1.5.0/
creating: qiime_tutorial-v1.5.0/18S_tutorial_files/
inflating: qiime_tutorial-v1.5.0/18S_tutorial_files/18S_tutorial_sample_seqs.fna
inflating: qiime_tutorial-v1.5.0/Fasting_Example.fna
inflating: qiime_tutorial-v1.5.0/Fasting_Example.qual
inflating: qiime_tutorial-v1.5.0/Fasting_Example.sff
inflating: qiime_tutorial-v1.5.0/Fasting_Example.sff.txt
inflating: qiime_tutorial-v1.5.0/Fasting_Map.txt
maasha@maxwell:~/data/qiime_tutorial-v1.5.0$ pick_otus_through_otu_table.py -i TEST/split_library_output/seqs.fna -o TEST/otus
Traceback (most recent call last):
File "/home/maasha/install/QIIME1.6/bin/pick_otus_through_otu_table.py", line 131, in <module>
main()
File "/home/maasha/install/QIIME1.6/bin/pick_otus_through_otu_table.py", line 128, in main
status_update_callback=status_update_callback)
File "/home/maasha/install/QIIME1.6/lib/python2.7/site-packages/qiime/workflow.py", line 471, in run_pick_otus_through_otu_table
close_logger_on_success=close_logger_on_success)
File "/home/maasha/install/QIIME1.6/lib/python2.7/site-packages/qiime/workflow.py", line 135, in call_commands_serially
raise WorkflowError, msg
# Function to run a command and handle errors.
function run()
{
local cmd=$@
log "INIT" $cmd
if error=$($cmd); then
log "OK" $cmd
echo_green "OK"
#!/usr/bin/env ruby -w
require 'pp'
File.open("tyt", "r") do |ios|
ios.each_line do |line|
line.chomp!
fields = line.split("\t")
#!/bin/bash
function run()
{
cmd=$1
if error=$($cmd); then
echo "OK"
else
echo "FAIL"