File Coverage

lib/Bio/VertRes/Config/Pipelines/RnaSeqExpression.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1             package Bio::VertRes::Config::Pipelines::RnaSeqExpression;
2              
3             # ABSTRACT: The base class for the RNA seq expression and TraDis pipeline.
4              
5              
6 1     1   136798 use Moose;
  0            
  0            
7             use Bio::VertRes::Config::Pipelines::Common;
8             use Bio::VertRes::Config::References;
9             use Bio::VertRes::Config::Pipelines::Roles::MetaDataFilter;
10             use Bio::VertRes::Config::Pipelines::Roles::MultiplePrefix;
11             extends 'Bio::VertRes::Config::Pipelines::Common';
12             with 'Bio::VertRes::Config::Pipelines::Roles::MetaDataFilter';
13             with 'Bio::VertRes::Config::Pipelines::Roles::MultiplePrefix';
14             with 'Bio::VertRes::Config::Pipelines::Roles::FilenameWithReference';
15              
16             has 'pipeline_short_name' => ( is => 'ro', isa => 'Str', default => 'rna_seq' );
17             has 'module' => ( is => 'ro', isa => 'Str', default => 'VertRes::Pipelines::RNASeqExpression' );
18             has 'reference' => ( is => 'ro', isa => 'Str', required => 1 );
19             has 'reference_lookup_file' => ( is => 'ro', isa => 'Str', required => 1 );
20             has 'toplevel_action' => ( is => 'ro', isa => 'Str', default => '__VRTrack_RNASeqExpression__' );
21              
22             has '_annotation_file' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build__annotation_file' );
23             has '_sequencing_file_suffix' => ( is => 'ro', isa => 'Str', default => 'markdup.bam' );
24             has 'protocol' => ( is => 'ro', isa => 'Str', required => 1 );
25             has '_mapping_quality' => ( is => 'ro', isa => 'Int', default => 1 );
26             has '_intergenic_regions' => ( is => 'ro', isa => 'Bool', default => 1 );
27             has '_ignore_rnaseq_called_status' => ( is => 'ro', isa => 'Bool', default => 1 );
28              
29             sub _build__annotation_file {
30             my ($self) = @_;
31             my $reference_file = Bio::VertRes::Config::References->new( reference_lookup_file => $self->reference_lookup_file )
32             ->get_reference_location_on_disk( $self->reference );
33             $reference_file =~ s!\.fa$!.gff!i;
34             return $reference_file;
35             }
36              
37             override 'to_hash' => sub {
38             my ($self) = @_;
39             my $output_hash = super();
40              
41             $output_hash->{vrtrack_processed_flags} = { import => 1, stored => 1, mapped => 1 };
42             $output_hash->{limits} = $self->_escaped_limits;
43              
44             $output_hash->{data}{sequencing_file_suffix} = $self->_sequencing_file_suffix;
45             $output_hash->{data}{protocol} = $self->protocol;
46             $output_hash->{data}{annotation_file} = $self->_annotation_file;
47             $output_hash->{data}{mapping_quality} = $self->_mapping_quality;
48             $output_hash->{data}{intergenic_regions} = $self->_intergenic_regions;
49             $output_hash->{data}{ignore_rnaseq_called_status} = $self->_ignore_rnaseq_called_status;
50              
51             return $output_hash;
52             };
53              
54             __PACKAGE__->meta->make_immutable;
55             no Moose;
56             1;
57              
58             __END__
59              
60             =pod
61              
62             =head1 NAME
63              
64             Bio::VertRes::Config::Pipelines::RnaSeqExpression - The base class for the RNA seq expression and TraDis pipeline.
65              
66             =head1 VERSION
67              
68             version 1.133090
69              
70             =head1 SYNOPSIS
71              
72             The base class for the RNA seq expression and TraDis pipeline.
73             use Bio::VertRes::Config::Pipelines::RnaSeqExpression;
74              
75             my $pipeline = Bio::VertRes::Config::Pipelines::RnaSeqExpression->new(
76             database => 'abc',
77             reference => 'Staphylococcus_aureus_subsp_aureus_ABC_v1',
78             limits => {
79             project => ['ABC study'],
80             species => ['EFG']
81             }
82              
83             );
84             $pipeline->to_hash();
85              
86             =head1 AUTHOR
87              
88             Andrew J. Page <ap13@sanger.ac.uk>
89              
90             =head1 COPYRIGHT AND LICENSE
91              
92             This software is Copyright (c) 2013 by Wellcome Trust Sanger Institute.
93              
94             This is free software, licensed under:
95              
96             The GNU General Public License, Version 3, June 2007
97              
98             =cut