line |
bran |
sub |
pod |
code |
1
|
|
|
|
package Sanger::CGP::Vcf::Sample; |
2
|
|
|
|
|
3
|
|
|
|
##########LICENCE########## |
4
|
|
|
|
# Copyright (c) 2014,2015 Genome Research Ltd. |
5
|
|
|
|
# |
6
|
|
|
|
# Author: Jon Hinton <cgpit@sanger.ac.uk> |
7
|
|
|
|
# |
8
|
|
|
|
# This file is part of cgpVcf. |
9
|
|
|
|
# |
10
|
|
|
|
# cgpVcf is free software: you can redistribute it and/or modify it under |
11
|
|
|
|
# the terms of the GNU Affero General Public License as published by the Free |
12
|
|
|
|
# Software Foundation; either version 3 of the License, or (at your option) any |
13
|
|
|
|
# later version. |
14
|
|
|
|
# |
15
|
|
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT |
16
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
17
|
|
|
|
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more |
18
|
|
|
|
# details. |
19
|
|
|
|
# |
20
|
|
|
|
# You should have received a copy of the GNU Affero General Public License |
21
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
22
|
|
|
|
# |
23
|
|
|
|
# 1. The usage of a range of years within a copyright statement contained within |
24
|
|
|
|
# this distribution should be interpreted as being equivalent to a list of years |
25
|
|
|
|
# including the first and last year specified and all consecutive years between |
26
|
|
|
|
# them. For example, a copyright statement that reads âCopyright (c) 2005, 2007- |
27
|
|
|
|
# 2009, 2011-2012â should be interpreted as being identical to a statement that |
28
|
|
|
|
# reads âCopyright (c) 2005, 2007, 2008, 2009, 2011, 2012â and a copyright |
29
|
|
|
|
# statement that reads âCopyright (c) 2005-2012â should be interpreted as being |
30
|
|
|
|
# identical to a statement that reads âCopyright (c) 2005, 2006, 2007, 2008, |
31
|
|
|
|
# 2009, 2010, 2011, 2012â." |
32
|
|
|
|
########## LICENCE ########## |
33
|
|
|
|
|
34
|
|
|
|
|
35
|
|
3
|
|
use Sanger::CGP::Vcf; |
36
|
|
|
|
our $VERSION = Sanger::CGP::Vcf->VERSION; |
37
|
|
|
|
|
38
|
|
3
|
|
use strict; |
39
|
|
3
|
|
use warnings FATAL => 'all'; |
40
|
|
|
|
|
41
|
|
|
|
1; |
42
|
|
|
|
|
43
|
|
|
|
sub new{ |
44
|
|
6
|
0
|
my $proto = shift; |
45
|
|
|
|
my (%args) = @_; |
46
|
|
|
|
my $class = ref($proto) || $proto; |
47
|
|
|
|
|
48
|
|
|
|
my $self = { |
49
|
|
|
|
_name => $args{'-name'}, |
50
|
|
|
|
_study => $args{'-study'}, |
51
|
|
|
|
_accession => $args{'-accession'}, |
52
|
|
|
|
_accession_source => $args{'-accession_source'}, |
53
|
|
|
|
_platform => $args{'-platform'}, |
54
|
|
|
|
_seq_protocol => $args{'-seq_protocol'}, |
55
|
|
|
|
_description => $args{'-description'}, |
56
|
|
|
|
}; |
57
|
|
|
|
bless $self, $class; |
58
|
|
|
|
return $self; |
59
|
|
|
|
} |
60
|
|
|
|
|
61
|
|
|
|
sub name{ |
62
|
|
24
|
0
|
my($self,$value) = @_; |
63
|
100
|
|
|
$self->{_name} = $value if defined $value; |
64
|
|
|
|
return $self->{_name}; |
65
|
|
|
|
} |
66
|
|
|
|
|
67
|
|
|
|
sub study{ |
68
|
|
20
|
0
|
my($self,$value) = @_; |
69
|
100
|
|
|
$self->{_study} = $value if defined $value; |
70
|
|
|
|
return $self->{_study}; |
71
|
|
|
|
} |
72
|
|
|
|
|
73
|
|
|
|
sub accession{ |
74
|
|
16
|
0
|
my($self,$value) = @_; |
75
|
100
|
|
|
$self->{_accession} = $value if defined $value; |
76
|
|
|
|
return $self->{_accession}; |
77
|
|
|
|
} |
78
|
|
|
|
|
79
|
|
|
|
sub accession_source{ |
80
|
|
18
|
0
|
my($self,$value) = @_; |
81
|
100
|
|
|
$self->{_accession_source} = $value if defined $value; |
82
|
|
|
|
return $self->{_accession_source}; |
83
|
|
|
|
} |
84
|
|
|
|
|
85
|
|
|
|
sub platform{ |
86
|
|
15
|
0
|
my($self,$value) = @_; |
87
|
100
|
|
|
$self->{_platform} = $value if defined $value; |
88
|
|
|
|
return $self->{_platform}; |
89
|
|
|
|
} |
90
|
|
|
|
|
91
|
|
|
|
sub seq_protocol{ |
92
|
|
19
|
0
|
my($self,$value) = @_; |
93
|
100
|
|
|
$self->{_seq_protocol} = $value if defined $value; |
94
|
|
|
|
return $self->{_seq_protocol}; |
95
|
|
|
|
} |
96
|
|
|
|
|
97
|
|
|
|
sub description{ |
98
|
|
15
|
0
|
my($self,$value) = @_; |
99
|
100
|
|
|
$self->{_description} = $value if defined $value; |
100
|
|
|
|
return $self->{_description}; |
101
|
|
|
|
} |