annotate fastqc_stats.pl @ 0:2c74c5c70520 draft default tip

planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
author nml
date Wed, 11 Oct 2017 16:22:08 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
1 #!/usr/bin/env perl
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
2 package nml_fastqc_stats;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
3 use strict;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
4 use warnings;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
5 use Pod::Usage;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
6 use Getopt::Long;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
7 use autodie;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
8 use File::Basename;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
9 use Bio::SeqIO;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
10 use File::Temp qw/ tempdir /;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
11 __PACKAGE__->run unless caller;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
12
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
13
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
14
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
15 sub run {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
16 #grabbing arguments either from command line or from another module/script
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
17 my ( $rawdatas, $fastqs,$num_bps,$sample,$out) = get_parameters(@_);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
18
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
19 print_header($out,scalar @$fastqs);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
20 my @results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
21 foreach my $rawdata ( @$rawdatas) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
22 my %results = %{ parse_FastQC($rawdata) } ;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
23 push @results,\%results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
24 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
25
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
26
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
27 my %results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
28
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
29
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
30 if ( scalar @$rawdatas ==1 ) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
31 %results = % { $results[0]};
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
32
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
33 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
34 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
35 #need to combine the info into a SINGLE results file
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
36
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
37 my ($r1,$r2) = ($results[0],$results[1]);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
38
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
39
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
40 foreach my $key( keys %$r1) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
41 if ( exists $r2->{$key}) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
42 my ($value1,$value2) = ($r1->{$key},$r2->{$key});
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
43
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
44 #check to see if data that could/should be different
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
45 my %diff_ignore = ('Filename'=>1);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
46 my %combine = ('duplicate_lvl'=>1,'dist_length'=>1,'overre'=>1,'Total Sequences'=>1,'Sequence length'=>1,'%GC'=>1);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
47 if (exists $combine{$key} ) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
48 if ( $key eq 'duplicate_lvl') {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
49 $results{'Duplicate level R1'} = $value1;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
50 $results{'Duplicate level R2'} = $value2;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
51 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
52 elsif ( $key eq 'dist_length') {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
53 my %dist=%{$value1};
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
54 foreach my $key( keys %$value2) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
55 #adding the number of reads to either existing range or new
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
56 if ( exists $dist{$key}) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
57 $dist{$key}{'count'}+=$value2->{$key}{'count'};
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
58
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
59 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
60 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
61 $dist{$key} = $value2->{$key};
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
62 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
63 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
64
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
65 $results{$key} = \%dist;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
66
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
67 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
68 elsif ( $key eq 'Total Sequences') {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
69 $results{$key}= $value1 + $value2;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
70 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
71 elsif ( $key eq 'overre') {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
72 $results{$key}=$value1 + $value2;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
73 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
74 elsif ( $key eq '%GC') {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
75 $results{$key}=($value1 + $value2)/2;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
76 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
77 elsif ( $key eq 'Sequence length') {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
78 if ( $value1 eq $value2) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
79 $results{$key}= $value1;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
80 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
81 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
82 #figure out the range by splitting all values into array then sort
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
83 my @number = split /-/,$value1;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
84 map { push @number,$_ } split'-',$value2;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
85 @number = sort {$a <=> $b } @number;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
86 $results{$key} = $number[0] . '-' . $number[$#number];
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
87 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
88 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
89
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
90 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
91 #both the same we are good
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
92 elsif ( $value1 eq $value2) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
93 $results{$key}=$value1;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
94 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
95 elsif ( ! exists $diff_ignore{$key}) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
96 die "Have different value between fastqc files for '$key'\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
97 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
98
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
99
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
100
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
101 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
102 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
103 die "Cannot find key : '$key' in reverse fastqc file\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
104 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
105 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
106
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
107
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
108 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
109
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
110 #add sample name given by user
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
111 $results{'filename'} = $sample;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
112
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
113 #perform coverage, total base pair and SE or PE
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
114 if ( $fastqs) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
115 my $result = determine_stats($fastqs,$num_bps);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
116 if ( $result) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
117 foreach ( keys %$result) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
118 if ( exists $results{$_}) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
119 die "Have two functions with key: '$_'\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
120 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
121 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
122 $results{$_}= $result->{$_};
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
123 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
124 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
125 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
126 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
127
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
128 print_csv($out,\%results);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
129
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
130
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
131
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
132 return 1;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
133 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
134
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
135 sub determine_stats {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
136 my ($fastqs,$num_bps) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
137
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
138
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
139 my %results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
140 my $number = scalar @$fastqs;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
141 my $status;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
142
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
143 if ( $number ==1) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
144 $status='SE';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
145 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
146 elsif ( $number ==2) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
147 $status='PE';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
148 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
149 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
150 $status='N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
151 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
152
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
153 $results{'pe_status'} = $status;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
154
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
155 #determine total base pair
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
156
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
157 my $all_fastq = join (' ' , map { "\"$_\"" } @$fastqs);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
158
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
159 #one liner from : http://onetipperday.blogspot.ca/2012/05/simple-way-to-get-reads-length.html with some modification by Philip Mabon
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
160 my $total=`cat $all_fastq | perl -ne '\$s=<>;<>;<>;chomp(\$s);print length(\$s)."\n";' | sort | uniq -c | perl -e 'while(my \$line=<>){chomp \$line; \$line =~s/^\\s+//;(\$l,\$n)=split/\\s+/,\$line; \$t+= \$l*\$n;} print "\$t\n"'`;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
161 chomp $total;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
162
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
163 $results{'total_bp'} = $total;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
164
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
165 if ($total) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
166
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
167 $results{'coverage'} = sprintf "%.2f", ($total/$num_bps);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
168
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
169 #reference name stuff
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
170 #my $name = basename($reference);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
171 #$name =~ s/\.fasta//;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
172
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
173 $results{'reference'} = $num_bps;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
174
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
175
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
176 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
177
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
178 return \%results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
179
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
180 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
181
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
182
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
183 sub print_csv {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
184 my ($out_fh,$results) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
185 my %results = %{$results};
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
186
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
187 my @line;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
188
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
189 #Name
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
190 my $name = $results{'filename'} || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
191 $name =~ s/.fastq//;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
192 push @line,$name;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
193
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
194 #Indicate if PE,SE or multiple
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
195 my $status= $results{'pe_status'} || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
196 push @line,$status;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
197
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
198 #encoding of fastq file
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
199 push @line, $results{'Encoding'} || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
200
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
201 #number of reads found
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
202 my $reads = $results{'Total Sequences'} || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
203
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
204 push @line,$reads || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
205
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
206 #number of Total Base Pairs
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
207 push @line, $results{'total_bp'} || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
208
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
209 #sequence read length range
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
210 push @line, $results{'Sequence length'} || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
211
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
212 #most abundant read length
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
213
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
214 my ($most_abundant) = sort {$results{'dist_length'}{$b}{'count'} <=> $results{'dist_length'}{$a}{'count'} } keys %{$results{'dist_length'}};
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
215 my ($most_count) = $results{'dist_length'}{$most_abundant}{'count'} || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
216
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
217 push @line, $most_abundant;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
218 push @line, $most_count;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
219
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
220 #coverage against reference
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
221 push @line, $results{'coverage'} || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
222 push @line, $results{'reference'} || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
223
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
224
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
225 #duplicate level
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
226 if ( $results{'pe_status'} eq 'SE') {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
227 push @line, $results{'duplicate_lvl'} || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
228 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
229 elsif ( $results{'pe_status'} eq 'PE') {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
230 push @line, $results{'Duplicate level R1'} || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
231 push @line, $results{'Duplicate level R2'} || 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
232 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
233
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
234
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
235
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
236 #determine percentage of reads that are over-represented sequences
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
237 push @line, exists $results{'overre'} ? $results{'overre'} : 'N/A';
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
238
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
239 print $out_fh join("\t",@line) . "\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
240
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
241 return;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
242 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
243
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
244 sub print_header {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
245 my ($out_fh,$fastqs) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
246
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
247 my @headers;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
248 if ( $fastqs==2) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
249 @headers = ('Name','SE/PE','Encoding' , '# of Reads', 'Total # Base Pairs', 'Sequence length range','Most abundant read length','# of reads for abundant','Estimated Coverage','Reference length','Duplicate % R1','Duplicate % R2','# of Overrepresented sequences');
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
250 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
251 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
252 @headers = ('Name','SE/PE','Encoding' , '# of Reads', 'Total # Base Pairs', 'Sequence length range','Most abundant read length','# of reads for abundant','Estimated Coverage','Reference length','Duplicate %','# of Overrepresented sequences');
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
253 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
254
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
255 print $out_fh join("\t",@headers) . "\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
256
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
257
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
258 return;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
259 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
260
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
261
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
262
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
263 sub parse_FastQC {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
264 my ($file) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
265
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
266 my %results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
267
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
268 my %todo = (
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
269 'Per base sequence quality' => \&per_base_quality,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
270 'Per sequence quality scores' => \&per_seq_quality,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
271 'Per base sequence content' => \&per_seq_content,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
272 'Per base GC content' => \&per_base_gc_content,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
273 'Per sequence GC content' => \&per_seq_gc_content,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
274 'Per base N content' => \&per_base_n_content,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
275 'Sequence Length Distribution' => \&seq_length_dis,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
276 'Sequence Duplication Levels' => \&seq_dupli_lvl,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
277 'Overrepresented sequences' => \&overrepresented_seq,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
278 'Kmer Content' => \&kmer_content,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
279 'Basic Statistics' => \&basic_stats
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
280
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
281 );
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
282
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
283
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
284 open my $in , '<', $file;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
285
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
286 #get header
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
287 my $version = <$in>;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
288
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
289 #create functional code
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
290 my $next_sec = next_section($in);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
291
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
292 my %sections;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
293
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
294 while ( my ($sec_name,$fh_lines) = $next_sec->()) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
295 if (! ($sec_name || $fh_lines)) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
296 last;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
297 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
298
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
299
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
300 #see if we are at a beginning of new section
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
301 if ($sec_name =~ /^>>(.*)\s+(warn|fail|pass)$/) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
302 my ($name,$status) = ($1,$2);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
303 $sections{$name}= $status;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
304
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
305 if ( exists $todo{$name}) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
306 my $result =$todo{$name}->($fh_lines);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
307
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
308 if ( $result) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
309 #combine results together
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
310 foreach ( keys %$result) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
311 if ( exists $results{$_}) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
312 die "Have two functions with key: '$_'\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
313 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
314 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
315 $results{$_}= $result->{$_};
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
316 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
317 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
318 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
319 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
320 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
321 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
322
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
323
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
324 return \%results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
325 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
326
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
327
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
328 sub basic_stats {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
329 my ($lines) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
330 my $header = <$lines>;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
331
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
332 my %stats;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
333
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
334 while (<$lines>) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
335 chomp;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
336 my @data = split/\t/;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
337 my $value = pop @data;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
338 if ( $value eq '>>END_MODULE') {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
339 last;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
340 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
341 my $key = join(' ',@data);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
342 $stats{$key}=$value;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
343 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
344
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
345 return \%stats;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
346 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
347
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
348
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
349
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
350 sub per_base_quality {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
351 my ($lines) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
352 my %results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
353
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
354 return \%results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
355 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
356
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
357 sub per_seq_quality {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
358 my ($lines) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
359 my %results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
360
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
361 return \%results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
362 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
363
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
364 sub per_seq_content {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
365 my ($lines) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
366 my %results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
367
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
368 return \%results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
369 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
370 sub per_base_gc_content {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
371 my ($lines) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
372 my %results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
373
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
374 return \%results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
375 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
376
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
377 sub per_seq_gc_content {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
378 my ($lines) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
379 my %results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
380
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
381 return \%results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
382 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
383
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
384 sub per_base_n_content {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
385 my ($lines) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
386 my %results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
387
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
388 return \%results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
389 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
390
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
391 sub seq_length_dis {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
392 my ($lines) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
393 my %results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
394
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
395 my $header = <$lines>;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
396 my %lengths;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
397 while (<$lines>) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
398 chomp;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
399 if ( $_ =~ /^>>/) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
400 next;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
401 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
402
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
403 my ($key,$value) = split/\s+/;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
404 if ( $key =~ /(\d+)-(\d+)/) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
405 $lengths{$1}{'count'} =$value;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
406 $lengths{$1}{'key'} =$key;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
407
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
408 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
409 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
410 $lengths{$key}{'count'} =$value;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
411 $lengths{$key}{'key'} =$key;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
412 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
413
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
414 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
415
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
416
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
417 return {'dist_length' => \%lengths};
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
418 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
419 sub seq_dupli_lvl {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
420 my ($lines) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
421
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
422 my $perc_dupl = <$lines>;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
423 my $perc;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
424 if ( $perc_dupl =~ /^\#Total Duplicate Percentage\s+(.*)$/ ) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
425 $perc = $1;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
426 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
427 elsif ($perc_dupl =~ /^\#Total Deduplicated Percentage\s+(.*)$/ ) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
428 $perc = $1;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
429 #version 0.11.2 and above, it indicates as Deduplicate insetad of Duplicated
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
430 #we want to know % of Duplicate sequences instead
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
431 $perc = $perc - 100.00;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
432 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
433
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
434 my $header = <$lines>;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
435 #ignoring the results of the graph for now
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
436
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
437 $perc = sprintf "%.2f",$perc;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
438
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
439 return {'duplicate_lvl' => $perc};
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
440 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
441
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
442 sub overrepresented_seq {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
443 my ($lines) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
444
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
445 my %results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
446
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
447 my $header = <$lines>;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
448 my %seqs;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
449 my $total;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
450
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
451 while ( <$lines>) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
452 chomp;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
453 if ( $_=~ />>END_MODULE/) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
454 last;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
455 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
456 my @data = split/\s+/;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
457
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
458 $seqs{$data[0]} =$data[2];
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
459 $total+=$data[2];
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
460
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
461 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
462
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
463 if ( ! $total) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
464 $results{'overre'}=0;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
465
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
466 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
467 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
468 $results{'overre'} = sprintf "%.2f",$total;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
469 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
470
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
471
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
472
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
473 return \%results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
474 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
475
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
476 sub kmer_content {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
477 my ($lines) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
478 my %results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
479
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
480 return \%results;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
481 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
482
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
483
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
484
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
485 sub next_section {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
486 my ($in)=@_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
487 my $lines;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
488
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
489 return sub {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
490 local $/ = ">>END_MODULE\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
491 $lines= <$in>;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
492 my ($name,$sec);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
493 {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
494 if ($lines) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
495 local $/ = "\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
496 open $sec ,'<',\$lines;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
497 $name = <$sec>;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
498 chomp $name;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
499 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
500
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
501 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
502
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
503
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
504 return ($name,$sec);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
505 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
506 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
507
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
508
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
509 sub get_parameters {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
510 my ($out,$sample,@rawdatas,@fastq,$ref,$rawdataSE,$rawdataPE_R1,$rawdataPE_R2,$fastqSE,$fastqPE_R1,$fastqPE_R2,$galaxy,$num_bps);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
511 #determine if our input are as sub arguments or getopt::long
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
512 if ( @_ && $_[0] eq __PACKAGE__ ) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
513 # Get command line options
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
514 GetOptions(
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
515 'o|out=s' => \$out,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
516 'fastq_se=s' => \$fastqSE,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
517 'fastq_pe_1=s' => \$fastqPE_R1,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
518 'fastq_pe_2=s' => \$fastqPE_R2,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
519 'g_rawdata_se=s' => \$rawdataSE,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
520 'g_rawdata_pe_1=s' => \$rawdataPE_R1,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
521 'g_rawdata_pe_2=s' => \$rawdataPE_R2,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
522 'sample=s' => \$sample,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
523 'ref=s' => \$ref,
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
524 'num_bps=s' => \$num_bps
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
525 );
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
526 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
527 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
528 die "NYI\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
529 #( $file, $out ) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
530 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
531
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
532 if ( !$sample) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
533 $sample = "Unknown sample";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
534 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
535
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
536 if ( $fastqSE) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
537 if ( ! (-e $fastqSE) ) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
538 print "ERROR: Was given a fastq SE file but could not find it: '$fastqSE'\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
539 pod2usage( -verbose => 1 );
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
540 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
541 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
542 push @fastq,$fastqSE;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
543 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
544 if ( !$rawdataSE || !( -e $rawdataSE)) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
545 print "ERROR: Was not given or could not rawdata file: '$rawdataSE'\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
546 pod2usage( -verbose => 1 );
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
547 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
548 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
549 push @rawdatas,$rawdataSE;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
550 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
551
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
552 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
553 elsif ( !$fastqPE_R1 || ! (-e $fastqPE_R1) || !$fastqPE_R2 || ! (-e $fastqPE_R2) ) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
554 print "ERROR: Was given a fastqPE R1 or R2 file but could not find it: '$fastqPE_R1' , '$fastqPE_R2'\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
555 pod2usage( -verbose => 1 );
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
556
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
557 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
558 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
559 push @fastq,$fastqPE_R1;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
560 push @fastq,$fastqPE_R2;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
561
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
562
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
563 for my $rawdata ( ($rawdataPE_R1,$rawdataPE_R2)) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
564 if (!$rawdata || !(-e $rawdata)) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
565 print "ERROR: Was not given or could not rawdata file: '$rawdata'\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
566 pod2usage( -verbose => 1 );
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
567 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
568 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
569 push @rawdatas,$rawdata;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
570 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
571 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
572 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
573
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
574 if ( $ref && !( -e $ref ) ) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
575 print "ERROR: Was given a reference file but could not find it: '$ref'\n";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
576 pod2usage( -verbose => 1 );
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
577 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
578
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
579 if ($ref && $num_bps)
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
580 {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
581 print "ERROR: Was given both a reference file and number of base pairs. One or the other please.";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
582 pod2usage( -verbose => 1 );
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
583 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
584
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
585 if ($ref)
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
586 {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
587 $num_bps = 0;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
588 my $in = Bio::SeqIO->new(-format=>'fasta' , -file => $ref);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
589 while ( my $seq = $in->next_seq()) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
590 $num_bps += $seq->length();
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
591 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
592
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
593 if ($num_bps == 0)
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
594 {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
595 print "ERROR: number of base pairs read from reference file is 0. Please check validity of reference file.";
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
596 pod2usage( -verbose=> 1 );
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
597 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
598 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
599
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
600 $out = _set_out_fh($out);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
601
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
602 return (\@rawdatas,\@fastq,$num_bps,$sample,$out);
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
603 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
604
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
605
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
606
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
607 sub _set_out_fh {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
608 my ($output) = @_;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
609 my $out_fh;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
610
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
611 if ( defined $output && ref $output && ref $output eq 'GLOB' ) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
612 $out_fh = $output;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
613 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
614 elsif ( defined $output ) {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
615 open( $out_fh, '>', $output );
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
616 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
617 else {
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
618 $out_fh = \*STDOUT;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
619 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
620
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
621 return $out_fh;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
622 }
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
623
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
624
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
625
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
626 1;
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
627
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
628 =head1 NAME
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
629
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
630 nml_fastqc_stats.pl.pl - (Galaxy only script) Parse fastqc runs into a csv summary report
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
631
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
632
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
633 =head1 SYNOPSIS
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
634
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
635 nml_fastqc_stats.pl.pl -z fastqc.txt
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
636 nml_fastqc_stats.pl.pl -z fastqc.txt -o results.csv --ref NC_33333.fa
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
637 nml_fastqc_stats.pl.pl -z fastqc.txt -o results.csv --ref NC_33333.fa --fastq ya_R1.fastq --fatq ya_R2.fastq
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
638
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
639 =head1 OPTIONS
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
640
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
641 =over
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
642
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
643
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
644 =item B<-z>
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
645
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
646 FastQC txt rawdata file
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
647
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
648
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
649 =item B<-o> B<--out>
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
650
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
651 Output csv file
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
652
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
653 =item B<--fastq>
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
654
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
655 Path to fastq file(s) . Used for providing total base pairs and coverage information
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
656
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
657
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
658 =item B<--ref>
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
659
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
660 Path to reference file. Needed for providing coverage information
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
661
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
662 =back
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
663
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
664 =head1 DESCRIPTION
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
665
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
666
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
667
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
668
2c74c5c70520 planemo upload for repository https://github.com/phac-nml/galaxy_tools commit d5b7cb71616c0ac20e02ff8cb8c147b9d4a31691
nml
parents:
diff changeset
669 =cut