RenameN37.pl

From ZhangLabWiki
Revision as of 02:06, 30 March 2016 by >Shicheng (Created page with " #!/usr/bin/perl use strict; use Cwd; chdir getcwd; my $sample="../sample.txt"; open F,$sample; my %samtable; while(<F>){ next if /ID/; chomp; my ($ID,$sam,undef,$in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
#!/usr/bin/perl
use strict;
use Cwd;
chdir getcwd;
my $sample="../sample.txt";
open F,$sample;
my %samtable;
while(<F>){
next if /ID/;
chomp;
my ($ID,$sam,undef,$index,$sym,$proxy)=split /\t/;
$samtable{$index}=$proxy;
}
my @hapinfo=glob("*.hapInfo.txt");
foreach my $hapinfo(@hapinfo){
my ($sam,undef)=split /\./,$hapinfo;
print "$hapinfo => $samtable{$sam}.hapInfo.txt\n";
system("cp $hapinfo $samtable{$sam}.hapInfo.txt");
}