annotate seqtk_nml.pl @ 1:f49992c79fe4 draft default tip

planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 969557932bff35913d93068d16facb8da4d64123
author nml
date Thu, 02 Nov 2017 14:09:07 -0400
parents e1867440ed36
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
1 #!/usr/bin/env perl
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
2 package seqtk_nml;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
3 use warnings;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
4 use strict;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
5 use Bio::SeqIO;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
6 use Getopt::Long;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
7 use Pod::Usage;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
8 use File::Copy;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
9 __PACKAGE__->run unless caller;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
10
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
11
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
12 my $rv;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
13
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
14 sub get_parameters {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
15 my ($fastaref, $type, $coverage, $length,$log);
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
16 my ($for,$rev,$out_for,$out_rev);
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
17 #determine if our input are as sub arguments or getopt::long
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
18 if ( @_ && $_[0] eq __PACKAGE__ ) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
19 Getopt::Long::Configure('bundling');
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
20 GetOptions(
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
21 'ref=s' => \$fastaref,
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
22 'type=s' => \$type,
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
23 'forward=s' => \$for,
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
24 'reverse=s' => \$rev,
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
25 'out_forward=s' => \$out_for,
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
26 'out_reverse=s' => \$out_rev,
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
27 'log=s'=> \$log,
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
28 'cov=s' => \$coverage
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
29 );
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
30 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
31
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
32 if ( !$for || !( -e $for ) ) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
33 print "ERROR: Was not given or could not find fastq file: '$for'\n";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
34 pod2usage( -verbose => 1 );
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
35 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
36
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
37 if ( !$out_for ) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
38 print "ERROR: Was not given output file path for fastq\n";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
39 pod2usage( -verbose => 1 );
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
40 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
41
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
42 if ( $type eq 'paired') {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
43 if ( !$rev || !( -e $rev ) ) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
44 print "ERROR: Was not given or could not find reverse fastq file: '$rev'\n";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
45 pod2usage( -verbose => 1 );
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
46 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
47
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
48 if ( !$out_rev ) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
49 print "ERROR: Was not given output file path for reverse fastq\n";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
50 pod2usage( -verbose => 1 );
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
51 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
52 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
53
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
54 if ( !$coverage ) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
55 print "ERROR: Was not given a coverage number\n";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
56 pod2usage( -verbose => 1 );
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
57 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
58
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
59 if ( $coverage <=0 ) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
60 print "ERROR: Was given a coverage less than 0\n";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
61 pod2usage( -verbose => 1 );
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
62 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
63
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
64
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
65
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
66 if ( !$log ) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
67 print "ERROR: Was not given a log file\n";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
68 pod2usage( -verbose => 1 );
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
69 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
70
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
71
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
72 return ($fastaref, $type, $coverage, $length, $log,$for,$rev,$out_for,$out_rev);
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
73 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
74
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
75
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
76 sub run {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
77 my ($fastaref, $type, $coverage, $length, $log,$for,$rev,$out_for,$out_rev) = get_parameters(@_);
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
78 my $subsample_size;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
79
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
80
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
81 #open log fh here
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
82 open my $log_fh,">" ,"$log";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
83
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
84
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
85 my @in_fastqs;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
86 my @out_fastqs;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
87
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
88
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
89 if ($type eq "single"){
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
90 $in_fastqs[0] = $for;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
91 $out_fastqs[0] = $out_for;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
92 }elsif ($type eq 'paired' ) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
93 $in_fastqs[0] = $for;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
94 $in_fastqs[1] = $rev;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
95 $out_fastqs[0] = $out_for;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
96 $out_fastqs[1] = $out_rev;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
97 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
98 else {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
99 die "Given unknown read type of '$type'";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
100 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
101
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
102 #get total read lengths from all fastq files given
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
103 my $total= get_total_length(@in_fastqs);
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
104
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
105
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
106 if (!($coverage)){
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
107 $coverage = 50;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
108 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
109
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
110 my $seq_in = Bio::SeqIO->new(
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
111 -format => 'fasta',
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
112 -file => $fastaref,
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
113 );
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
114
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
115 while ( my $seq = $seq_in->next_seq()) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
116 $length += $seq->length();
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
117 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
118
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
119
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
120 print $log_fh "Downsampling to coverage of: $coverage\n";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
121 print $log_fh "Total number of Basepairs: $total\n";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
122 print $log_fh "Length of Reference: $length\n";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
123
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
124 my $rawcoverage = $total/$length;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
125 printf $log_fh "Raw Coverage: %.3f\n",$rawcoverage;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
126
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
127 if($rawcoverage > $coverage){
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
128 #need to downsample
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
129 #calculate $subsample_size
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
130 $subsample_size = $coverage/$rawcoverage;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
131 printf $log_fh "subsample: %.3f",$subsample_size;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
132
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
133 foreach my $fastq (@in_fastqs){
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
134 my $out = shift @out_fastqs;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
135 #seed always set to 42 for reproducibility
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
136 my $seqCommand = "seqtk sample -s42 $fastq $subsample_size > $out";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
137 $rv = system($seqCommand);
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
138 #need to bit shift 8 bit because seqtk exit code for some reason are greater then standard 0-255 values that most unix application expect
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
139 die "Error when running '$seqCommand' command" if $rv >>8;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
140 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
141 } else {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
142 #no sampling needed, just copy the fastq's to the output
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
143 print "Subsampling not required\n";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
144 foreach my $fastq (@in_fastqs){
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
145 my $out = shift @out_fastqs;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
146 copy($fastq,$out) || die "Not able to copy '$fastq' to '$out' with error $!";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
147 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
148 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
149
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
150
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
151
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
152 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
153
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
154
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
155 sub get_total_length {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
156 my (@files) = @_;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
157 my $total;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
158 foreach my $fastq( @files) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
159
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
160 open my $in, "<",$fastq || die "Could not open file '$fastq'";
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
161 #skip first 3 lines
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
162 for ( 0..2) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
163 my $line = <$in>;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
164 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
165
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
166 while ( <$in>) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
167 chomp;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
168 $total+=length($_);
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
169 #skip first 3 lines
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
170 for ( 0..2) {
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
171 my $line = <$in>;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
172 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
173 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
174 close $in;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
175
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
176
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
177 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
178
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
179 return $total;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
180
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
181 }
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
182
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
183 1;
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
184
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
185
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
186 =head1 NAME
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
187
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
188
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
189
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
190 seqtk_nml.pl - Down sample fastq(s) if raw coverage is above user provided level
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
191
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
192
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
193 =head1 SYNOPSIS
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
194
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
195 seqtk_nml.pl --ref reference.fasta --forward first_R1.fastq --reverse --reverse_R2.fastq --out_forward answer_R1.fastq --out_reverse answer_R2.fastq --log log-file
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
196
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
197
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
198 =head1 OPTIONS
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
199
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
200 =over
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
201
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
202 =item
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
203
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
204 =item B<--ref>
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
205
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
206 Reference fasta file that we getting the expected length [Required]
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
207
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
208
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
209 =item B<--cov>
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
210
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
211 Coverage desired i.e 50.0
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
212
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
213
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
214 =item B<--forward>
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
215
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
216 Forward fastq read file. [Required]
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
217
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
218 =item B<--reverse>
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
219
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
220 Reverse fastq read file. Can be optional
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
221
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
222
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
223 =item B<--out_forward>
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
224
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
225 Downsampled forward fastq read file. [Required]
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
226
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
227 =item B<--out_reverse>
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
228
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
229 Downsampled reverse fastq read file. Can be optional
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
230
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
231
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
232 =item B<--log>
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
233
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
234 Log file that indicate what has happen. [Required]
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
235
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
236 =item B<--type>
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
237
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
238 Indicate to application if we are receiving one or two fastq files [Required] ['paired','single']
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
239
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
240
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
241
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
242 =back
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
243
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
244 =head1 DESCRIPTION
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
245
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
246
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
247 Downsample fastq(s) reads based on the raw coverage from reference fasta file. Needed when we have too much data to run correctly in downstream analyses tools. i.e spades , snvphyl , etc..
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
248
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
249
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
250 =cut
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
251
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
252
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
253
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
254
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
255
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
256 =back
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
257
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
258
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
259 =head1 SYNOPSIS
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
260
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
261
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
262
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
263 =head1 DESCRIPTION
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
264
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
265
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
266
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
267 =cut
e1867440ed36 planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 008f4667b70be22e9ddf496738b3f74bb942ed28
nml
parents:
diff changeset
268