annotate porechop_summarize.pl @ 3:80408ff0c1f5 draft

planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
author jdv
date Sat, 14 Oct 2017 22:23:22 -0400
parents
children 64fcb9c72e47
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
1 #!/usr/bin/env perl
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
2
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
3 use strict;
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
4 use warnings;
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
5 use 5.012;
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
6
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
7 my $flag = 0;
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
8 my $table;
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
9
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
10 while (my $line = <STDIN>) {
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
11
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
12 print STDERR $line;
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
13
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
14 if ($line =~ /Barcode\s+Reads\s+Bases\s+File/) {
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
15 $flag = 1;
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
16 }
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
17 next if (! $flag);
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
18
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
19 $table .= $line;
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
20
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
21 }
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
22
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
23 $table =~ s/(^\s+|\e\[\d+m)//gms;
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
24 say $table;
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
25
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
26 exit;
80408ff0c1f5 planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff changeset
27