ensembl-hive  2.8.1
FastaSplitter_conf.pm
Go to the documentation of this file.
1 =pod
2 
3 =head1 NAME
4 
6 
7 =head1 SYNOPSIS
8 
9  init_pipeline.pl Bio::EnsEMBL::Hive::Examples::Factories::PipeConfig::FastaSplitter_conf -inputfile reference.fasta -chunks_dir reference_chunks
10 
11 =head1 LICENSE
12 
13  See the NOTICE file distributed with this work for additional information
14  regarding copyright ownership.
15 
16  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
17  You may obtain a copy of the License at
18 
19  http://www.apache.org/licenses/LICENSE-2.0
20 
21  Unless required by applicable law or agreed to in writing, software distributed under the License
22  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23  See the License for the specific language governing permissions and limitations under the License.
24 
25 =head1 CONTACT
26 
27  Please subscribe to the Hive mailing list: http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users to discuss Hive-related questions or to be notified of our updates
28 
29 =cut
30 
31 
32 package Bio::EnsEMBL::Hive::Examples::Factories::PipeConfig::FastaSplitter_conf;
33 
34 use strict;
35 use warnings;
36 
37 use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf'); # All Hive databases configuration files should inherit from HiveGeneric, directly or indirectly
38 
39 
40 sub default_options {
41  my ($self) = @_;
42  return {
43  %{ $self->SUPER::default_options() }, # inherit other stuff from the base class
44 
45  'pipeline_name' => 'split_fasta', # name used by the beekeeper to prefix job names on the farm
46 
47  # runnable-specific parameters' defaults:
48  'max_chunk_length' => 500000,
49  'output_prefix' => 'chunk_number_',
50  'output_suffix' => '.fasta',
51 
52  'chunks_dir' => 'fasta_split_chunks',
53  };
54 }
55 
56 
57 sub pipeline_create_commands {
58  my ($self) = @_;
59  return [
60  @{$self->SUPER::pipeline_create_commands}, # inheriting database and hive tables' creation
61 
62  'mkdir -p '.$self->o('chunks_dir'),
63  ];
64 }
65 
66 
67 sub pipeline_analyses {
68  my ($self) = @_;
69  return [
70  { -logic_name => 'split_fasta',
72  -input_ids => [ {
73  'inputfile' => $self->o('inputfile'),
74  'max_chunk_length' => $self->o('max_chunk_length'),
75  'output_prefix' => $self->o('chunks_dir').'/'.$self->o('output_prefix'),
76  'output_suffix' => $self->o('output_suffix'),
77  } ],
78  -flow_into => {
79  2 => [ 'align' ], # will create a fan of jobs
80  },
81  },
82 
83  { -logic_name => 'align',
85  },
86  ];
87 }
88 
89 1;
90 
Bio::EnsEMBL::Hive::RunnableDB::Dummy
Definition: Dummy.pm:28
Bio::EnsEMBL::Hive::Examples::Factories::PipeConfig::FastaSplitter_conf
Definition: FastaSplitter_conf.pm:13
Bio::EnsEMBL::Hive::RunnableDB::FastaFactory
Definition: FastaFactory.pm:53