line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Sandy::Command::Variation::Dump; |
2
|
|
|
|
|
|
|
# ABSTRACT: variation subcommand class. Dump structural variation from database. |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
2638
|
use App::Sandy::Base 'class'; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
16
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
extends 'App::Sandy::Command::Variation'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.24'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub validate_args { |
11
|
0
|
|
|
0
|
1
|
|
my ($self, $args) = @_; |
12
|
0
|
|
|
|
|
|
my $structural_variation = shift @$args; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Mandatory file |
15
|
0
|
0
|
|
|
|
|
if (not defined $structural_variation) { |
16
|
0
|
|
|
|
|
|
die "Missing structural variation\n"; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
0
|
0
|
|
|
|
|
die "Too many arguments: '@$args'\n" if @$args; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub execute { |
23
|
0
|
|
|
0
|
1
|
|
my ($self, $opts, $args) = @_; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my $variation = $self->retrievedb($args); |
26
|
0
|
|
|
|
|
|
print "#seqid\tposition\tid\treference\talternate\tgenotype\n"; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
for my $id (sort keys %$variation) { |
29
|
0
|
|
|
|
|
|
my $data = $variation->{$id}; |
30
|
0
|
|
|
|
|
|
for my $entry (@$data) { |
31
|
|
|
|
|
|
|
# Index begins at 1 outside perl |
32
|
0
|
|
|
|
|
|
$entry->{pos}++; |
33
|
0
|
|
|
|
|
|
print "$entry->{seq_id}\t$entry->{pos}\t$entry->{id}\t$entry->{ref}\t$entry->{alt}\t$entry->{plo}\n"; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=pod |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=encoding UTF-8 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 NAME |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
App::Sandy::Command::Variation::Dump - variation subcommand class. Dump structural variation from database. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 VERSION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
version 0.24 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 SYNOPSIS |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sandy variation dump <genomic variation> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Arguments: |
57
|
|
|
|
|
|
|
a genomic-variation entry |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Options: |
60
|
|
|
|
|
|
|
-h, --help brief help message |
61
|
|
|
|
|
|
|
-H, --man full documentation |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 DESCRIPTION |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Dump genomic-variation from database. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 AUTHORS |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=over 4 |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item * |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Thiago L. A. Miller <tmiller@mochsl.org.br> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=item * |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
J. Leonel Buzzo <lbuzzo@mochsl.org.br> |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=item * |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Felipe R. C. dos Santos <fsantos@mochsl.org.br> |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=item * |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Helena B. Conceição <hconceicao@mochsl.org.br> |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=item * |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Rodrigo Barreiro <rbarreiro@mochsl.org.br> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=item * |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Gabriela Guardia <gguardia@mochsl.org.br> |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=item * |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Fernanda Orpinelli <forpinelli@mochsl.org.br> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=item * |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Rafael Mercuri <rmercuri@mochsl.org.br> |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=item * |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Rodrigo Barreiro <rbarreiro@mochsl.org.br> |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item * |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Pedro A. F. Galante <pgalante@mochsl.org.br> |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=back |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
This software is Copyright (c) 2023 by Teaching and Research Institute from Sírio-Libanês Hospital. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
This is free software, licensed under: |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
The GNU General Public License, Version 3, June 2007 |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |