« lib/Bio/AssemblyImprovement/DigitalNormalisation/Khmer/Main.pm
↑ Summary
lib/Bio/AssemblyImprovement/Assemble/SGA/PreprocessReads.pm »
| 1 | package Bio::AssemblyImprovement::AdapterRemoval::Trimmomatic::Main; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: Remove adapter sequences from paired reads using Trimmomatic | ||||||||||
| 4 | |||||||||||
| 5 | # =head1 SYNOPSIS | ||||||||||
| 6 | |||||||||||
| 7 | # =cut | ||||||||||
| 8 | |||||||||||
| 9 | 2 | ▶ | use File::Spec; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 2 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | |||||||||||
| 13 | 2 | has 'minlen' => ( is => 'ro', isa => 'Int', required => 0, default => 50 ); | |||||||||
| 14 | 2 | has 'reads_in_1' => ( is => 'ro', isa => 'Str', required => 1 ); | |||||||||
| 15 | 2 | has 'reads_in_2' => ( is => 'ro', isa => 'Str', required => 1 ); | |||||||||
| 16 | 2 | has 'paired_out_1' => ( is => 'ro', isa => 'Str', required => 1 ); | |||||||||
| 17 | 2 | has 'paired_out_2' => ( is => 'ro', isa => 'Str', required => 1 ); | |||||||||
| 18 | 2 | has 'unpaired_out_1' => ( is => 'ro', isa => 'Str', required => 0, default => '/dev/null' ); | |||||||||
| 19 | 2 | has 'unpaired_out_2' => ( is => 'ro', isa => 'Str', required => 0, default => '/dev/null' ); | |||||||||
| 20 | 2 | has 'trimmomatic_exec' => ( is => 'ro', isa => 'Str', required => 1 ); | |||||||||
| 21 | 2 | has 'adapters_file' => ( is => 'ro', isa => 'Str', required => 1 ); | |||||||||
| 22 | 2 | has 'threads' => ( is => 'ro', isa => 'Int', required => 0, default => 1 ); | |||||||||
| 23 | |||||||||||
| 24 | |||||||||||
| 25 | 1 | ▶ | sub run { | ||||||||
|
Subroutine
run: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||
| 26 | 1 | my ($self) = @_; | |||||||||
| 27 | 1 | my $cmd = join( | |||||||||
| 28 | ' ', | ||||||||||
| 29 | ( | ||||||||||
| 30 | 'java -Xmx1000m -jar', $self->trimmomatic_exec, | ||||||||||
| 31 | 'PE', | ||||||||||
| 32 | '-threads', $self->threads, | ||||||||||
| 33 | $self->reads_in_1, | ||||||||||
| 34 | $self->reads_in_2, | ||||||||||
| 35 | $self->paired_out_1, | ||||||||||
| 36 | $self->unpaired_out_1, | ||||||||||
| 37 | $self->paired_out_2, | ||||||||||
| 38 | $self->unpaired_out_2, | ||||||||||
| 39 | "ILLUMINACLIP:" . File::Spec->rel2abs($self->adapters_file) . ":2:10:7:1", | ||||||||||
| 40 | "MINLEN:50", | ||||||||||
| 41 | ) | ||||||||||
| 42 | ); | ||||||||||
| 43 | |||||||||||
| 44 | 1 | ▶ | if (system($cmd)) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 45 | 1 | die "Error running Trimmomatic with:\n$cmd"; | |||||||||
| 46 | } | ||||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | |||||||||||
| 50 | 2 | ▶ | no Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 51 | 2 | __PACKAGE__->meta->make_immutable; | |||||||||
| 52 | 2 | 1; | |||||||||
| 53 | |||||||||||
| 54 | __END__ | ||||||||||