Mercurial > repos > jdv > porechop
annotate 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 |
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 |