GSC-CODE:2016-2-22-rename.pl

From ZhangLabWiki
Jump to navigation Jump to search
#!/usr/bin/perl
use strict;
chdir "/home/shg047/work/monod/rrbs_kun";
my @file=glob("RRBS*P*");
foreach my $file(@file){
my (undef,$cancerType,$Samid,undef)=split /[-P]/,$file;
my $newName="$cancerType-P-$Samid";
system("cp $file $newName");
}