Mercurial > repos > jdv > porechop
annotate porechop_summarize.pl @ 10:0cb1ba651e9e draft default tip
planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 83364d7d78ca5524a08065daef995bfcd54a379d-dirty
author | jdv |
---|---|
date | Fri, 01 Dec 2017 21:36:54 -0500 |
parents | 64fcb9c72e47 |
children |
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; |
5
64fcb9c72e47
planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60-dirty
jdv
parents:
3
diff
changeset
|
24 pos($table) = 0; |
64fcb9c72e47
planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60-dirty
jdv
parents:
3
diff
changeset
|
25 $table =~ s/[ \t]+/\t/gms; |
3
80408ff0c1f5
planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff
changeset
|
26 say $table; |
80408ff0c1f5
planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff
changeset
|
27 |
80408ff0c1f5
planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff
changeset
|
28 exit; |
80408ff0c1f5
planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/porechop commit 2a0c81f39a2d50819a327cb889f336b136612d60
jdv
parents:
diff
changeset
|
29 |