Summary | Included libraries | Package variables | Synopsis | Description | General documentation | Methods |
WebCvs | Raw content |
my $runnable = new Bio::EnsEMBL::Analysis::Runnable::Lagan
(-workdir => $workdir,
-fasta_files => $fasta_files,
-program => "/path/to/program");
$runnable->run;
my @output = @{$runnable->output};
fasta_files | No description | Code |
new | Description | Code |
parameters | No description | Code |
parse_results | Description | Code |
run_analysis | Description | Code |
run_lagan | No description | Code |
new | code | next | Top |
Arg [1] : -workdir => "/path/to/working/directory" |
parse_results | code | prev | next | Top |
Arg [1] : Bio::EnsEMBL::Analysis::Runnable::Mlagan |
run_analysis | code | prev | next | Top |
Arg [1] : Bio::EnsEMBL::Analysis::Runnable::Mlagan |
fasta_files | description | prev | next | Top |
my $self = shift; $self->{'_fasta_files'} = shift if(@_); foreach my $this_file (@{$self->{'_fasta_files'}}) { # $self->files_to_delete($this_file);}
} return $self->{'_fasta_files'};
new | description | prev | next | Top |
my ($class,@args) = @_; my $self = $class->SUPER::new(@args); my ($workdir, $fasta_files, $tree_string, $parameters) = rearrange(['WORKDIR', 'FASTA_FILES', 'CONSTRAINTS_FILE'], @args); unless (defined $self->program) { $self->program("$BIN_DIR/lagan.pl"); } chdir $self->workdir; $self->fasta_files($fasta_files) if (defined $fasta_files); return $self;}
parameters | description | prev | next | Top |
my $self = shift; $self->{'_parameters'} = shift if(@_); return $self->{'_parameters'};}
parse_results | description | prev | next | Top |
my ($self, $run_number) = @_; my $alignment_file = $self->workdir . "/lagan.mfa"; my $gab = new Bio::EnsEMBL::Compara::GenomicAlignBlock; open F, $alignment_file || throw("Could not open $alignment_file"); my $id; my $seq = ""; while (<F>) { next if (/^\s*$/); chomp; ## The "DnaFrag" and "."}
## are used to avoid having two sequence names where one of them is a
## substring of the other (this confuses MLAGAN) and maybe Lagan as well... :-)
if (/^>DnaFrag(\d+)\./) { my $new_id = $1; if (defined $id && defined $seq) { my $ga = new Bio::EnsEMBL::Compara::GenomicAlign; $ga->dnafrag_id($id); $ga->aligned_sequence($seq); $gab->add_GenomicAlign($ga); $id = undef; $seq = ""; } $id = $new_id; } else { $seq .= $_; } } close F; my $ga = new Bio::EnsEMBL::Compara::GenomicAlign; $ga->dnafrag_id($id); $ga->aligned_sequence($seq); $gab->add_GenomicAlign($ga); $self->output([$gab]); } 1;
run_analysis | description | prev | next | Top |
my ($self, $program) = @_; $self->run_lagan; $self->parse_results; return 1;}
run_lagan | description | prev | next | Top |
my $self = shift; chdir $self->workdir; throw($self->program . " is not executable Lagan::run_analysis ") unless ($self->program && -x $self->program); my $command = $self->program; foreach my $fasta_file (@{$self->fasta_files}) { $command .= " $fasta_file"; } if ($self->parameters) { $command .= " " . $self->parameters; } $command .= " -mfa -out lagan.mfa 1>/dev/null 2>&1"; print "Running mlagan " . $command . "\n"; unless (system($command) == 0) { throw("lagan execution failed\n"); }}
CONTACT | Top |