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

From ZhangLabWiki
Revision as of 16:54, 22 February 2016 by >Shicheng (Created page with " #!/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]/...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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");
}