view porechop_summarize.pl @ 8:852b3fe95c20 draft

planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit aa6136c5fa32b987f64bd2b0dc1f72018038b0bb
author jdv
date Fri, 20 Oct 2017 23:11:21 -0400
parents 64fcb9c72e47
children
line wrap: on
line source

#!/usr/bin/env perl

use strict;
use warnings;
use 5.012;

my $flag = 0;
my $table;

while (my $line = <STDIN>) {

    print STDERR $line;

    if ($line =~ /Barcode\s+Reads\s+Bases\s+File/) {
        $flag = 1;
    }
    next if (! $flag);

    $table .= $line;

}

$table =~ s/(^\s+|\e\[\d+m)//gms;
pos($table) = 0;
$table =~ s/[ \t]+/\t/gms;
say $table;

exit;