Mercurial > repos > jdv > nanopolish
comparison nanopolish_variants.pl @ 10:c00a942cfc0b draft
planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/nanopolish commit 1eeffb2cd0b8115ca185f7fcb2df2920dff33e3b
author | jdv |
---|---|
date | Mon, 12 Feb 2018 23:59:21 -0500 |
parents | f1141f6a2d65 |
children | 550ac6458c07 |
comparison
equal
deleted
inserted
replaced
9:f1141f6a2d65 | 10:c00a942cfc0b |
---|---|
96 push @cmd, '--threads', $n_threads; | 96 push @cmd, '--threads', $n_threads; |
97 | 97 |
98 my @regions :shared; | 98 my @regions :shared; |
99 | 99 |
100 # build region tags to pass to nanopolish | 100 # build region tags to pass to nanopolish |
101 my $parser = BioX::Seq::Stream->new($fn_genome); | 101 if (-s $fn_genome) { # gracefully handle empty inputs |
102 while (my $seq = $parser->next_seq) { | 102 my $parser = BioX::Seq::Stream->new($fn_genome); |
103 push @regions, join( ':', $seq->id, | 103 while (my $seq = $parser->next_seq) { |
104 join( '-', 1, length($seq) ), | 104 push @regions, join( ':', $seq->id, |
105 ); | 105 join( '-', 1, length($seq) ), |
106 ); | |
107 } | |
106 } | 108 } |
107 | 109 |
108 my @workers; | 110 my @workers; |
109 for (1..$n_workers) { | 111 for (1..$n_workers) { |
110 push @workers, threads->create(\&run); | 112 push @workers, threads->create(\&run); |