-
Notifications
You must be signed in to change notification settings - Fork 4
/
somatic_tables_dump.pl
executable file
·43 lines (37 loc) · 1.18 KB
/
somatic_tables_dump.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/perl
#
# This source code is part of icgc, an ICGC processing pipeline.
#
# Icgc is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Icgc is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see<http://www.gnu.org/licenses/>.
#
# Contact: [email protected]
#
use strict;
use warnings FATAL => 'all';
my $infile = "icgc.May13.no_tcga.table_bdries.txt";
my @table_names;
open(INF,"<$infile") || die "CNo $infile: $!\n";
while(<INF>) {
chomp;
/somatic`$/ || next;
my @aux = split;
my $table_name = pop @aux; $table_name =~ s/\`//g;
push @table_names, $table_name;
}
close INF;
foreach my $table_name (@table_names) {
print "$table_name \n";
`mysqldump icgc $table_name > $table_name.sql`;
}
0;