
# Cree un programme prov pour renommer les fichiers crees par le sequencage et les deplacer dans les sous repertoire
# le programme shell prov doit ensuite etre lance

$path="/home/slaguerr/work/MISE11/AssemblyKept";

	@files = <$path/*/MISE11*>;

	foreach $file (@files) {
	
		$newname = $file;

	
		if ($file =~ /MISE11\.RL3\./) {$newname =~ s/MISE11\.RL3\./MISE11\.RL3\.cor4\./;}
		elsif ($file =~ /MISE11\.RL4\./) {$newname =~ s/MISE11\.RL4\./MISE11\.RL4\.cor5\./;}
		elsif ($file =~ /MISE11\.RL5\./) {$newname =~ s/MISE11\.RL5\./MISE11\.RL5\.cor6\./;}
		elsif ($file =~ /MISE11\.RL6\./) {$newname =~ s/MISE11\.RL6\./MISE11\.RL6\.cor9\./;}
		elsif ($file =~ /MISE11\.RL7\./) {$newname =~ s/MISE11\.RL7\./MISE11\.RL7\.cor367\./;}
		elsif ($file =~ /MISE11\.RL8\./) {$newname =~ s/MISE11\.RL8\./MISE11\.RL8\.cor368\./;}
		elsif ($file =~ /MISE11\.RL9\./) {$newname =~ s/MISE11\.RL9\./MISE11\.RL9\.cor369\./;}
		elsif ($file =~ /MISE11\.RL10\./) {$newname =~ s/MISE11\.RL10\./MISE11\.RL10\.cor370\./;}
		elsif ($file =~ /MISE11\.RL11\./) {$newname =~ s/MISE11\.RL11\./MISE11\.RL11\.cor372\./;}
		elsif ($file =~ /MISE11\.RL12\./) {$newname =~ s/MISE11\.RL12\./MISE11\.RL12\.cor425\./;}

		elsif ($file =~ /MISE11\.RL13\./) {$newname =~ s/MISE11\.RL13\./MISE11\.RL13\.cor426\./;}
		elsif ($file =~ /MISE11\.RL14\./) {$newname =~ s/MISE11\.RL14\./MISE11\.RL14\.cor427\./;}
		elsif ($file =~ /MISE11\.RL15\./) {$newname =~ s/MISE11\.RL15\./MISE11\.RL15\.cor428\./;}
		elsif ($file =~ /MISE11\.RL16\./) {$newname =~ s/MISE11\.RL16\./MISE11\.RL16\.cor430\./;}
		elsif ($file =~ /MISE11\.RL17\./) {$newname =~ s/MISE11\.RL17\./MISE11\.RL17\.cor431\./;}
		elsif ($file =~ /MISE11\.RL18\./) {$newname =~ s/MISE11\.RL18\./MISE11\.RL18\.cor432\./;}
		elsif ($file =~ /MISE11\.RL19\./) {$newname =~ s/MISE11\.RL19\./MISE11\.RL19\.cor433\./;}
		elsif ($file =~ /MISE11\.RL20\./) {$newname =~ s/MISE11\.RL20\./MISE11\.RL20\.cor434\./;}
		elsif ($file =~ /MISE11\.RL21\./) {$newname =~ s/MISE11\.RL21\./MISE11\.RL21\.cor435\./;}
		elsif ($file =~ /MISE11\.RL22\./) {$newname =~ s/MISE11\.RL22\./MISE11\.RL22\.cor436\./;}
		elsif ($file =~ /MISE11\.RL23\./) {$newname =~ s/MISE11\.RL23\./MISE11\.RL23\.cor437\./;}
		elsif ($file =~ /MISE11\.RL24\./) {$newname =~ s/MISE11\.RL24\./MISE11\.RL24\.cor438\./;}

		elsif ($file =~ /MISE11\.RL25\./) {$newname =~ s/MISE11\.RL25\./MISE11\.RL25\.cor1\./;}
		elsif ($file =~ /MISE11\.RL26\./) {$newname =~ s/MISE11\.RL26\./MISE11\.RL26\.cor10\./;}
		elsif ($file =~ /MISE11\.RL27\./) {$newname =~ s/MISE11\.RL27\./MISE11\.RL27\.cor13\./;}
		elsif ($file =~ /MISE11\.RL28\./) {$newname =~ s/MISE11\.RL28\./MISE11\.RL28\.cor14\./;}
		elsif ($file =~ /MISE11\.RL29\./) {$newname =~ s/MISE11\.RL29\./MISE11\.RL29\.cor15\./;}
		elsif ($file =~ /MISE11\.RL30\./) {$newname =~ s/MISE11\.RL30\./MISE11\.RL30\.cor29\./;}
		elsif ($file =~ /MISE11\.RL31\./) {$newname =~ s/MISE11\.RL31\./MISE11\.RL31\.cor38\./;}
		elsif ($file =~ /MISE11\.RL32\./) {$newname =~ s/MISE11\.RL32\./MISE11\.RL32\.cor43\./;}
		elsif ($file =~ /MISE11\.RL33\./) {$newname =~ s/MISE11\.RL33\./MISE11\.RL33\.cor44\./;}
		elsif ($file =~ /MISE11\.RL34\./) {$newname =~ s/MISE11\.RL34\./MISE11\.RL34\.cor45\./;}
		elsif ($file =~ /MISE11\.RL35\./) {$newname =~ s/MISE11\.RL35\./MISE11\.RL35\.cor46\./;}
		elsif ($file =~ /MISE11\.RL36\./) {$newname =~ s/MISE11\.RL36\./MISE11\.RL36\.cor69\./;}

		elsif ($file =~ /MISE11\.RL37\./) {$newname =~ s/MISE11\.RL37\./MISE11\.RL37\.cor245\./;}
		elsif ($file =~ /MISE11\.RL38\./) {$newname =~ s/MISE11\.RL38\./MISE11\.RL38\.cor247\./;}
		elsif ($file =~ /MISE11\.RL39\./) {$newname =~ s/MISE11\.RL39\./MISE11\.RL39\.cor249\./;}
		elsif ($file =~ /MISE11\.RL40\./) {$newname =~ s/MISE11\.RL40\./MISE11\.RL40\.cor310\./;}
		elsif ($file =~ /MISE11\.RL41\./) {$newname =~ s/MISE11\.RL41\./MISE11\.RL41\.cor336\./;}
		elsif ($file =~ /MISE11\.RL42\./) {$newname =~ s/MISE11\.RL42\./MISE11\.RL42\.cor354\./;}
		elsif ($file =~ /MISE11\.RL43\./) {$newname =~ s/MISE11\.RL43\./MISE11\.RL43\.cor355\./;}
		elsif ($file =~ /MISE11\.RL44\./) {$newname =~ s/MISE11\.RL44\./MISE11\.RL44\.cor356\./;}
		elsif ($file =~ /MISE11\.RL45\./) {$newname =~ s/MISE11\.RL45\./MISE11\.RL45\.cor357\./;}
		elsif ($file =~ /MISE11\.RL46\./) {$newname =~ s/MISE11\.RL46\./MISE11\.RL46\.cor358\./;}
		elsif ($file =~ /MISE11\.RL47\./) {$newname =~ s/MISE11\.RL47\./MISE11\.RL47\.cor360\./;}
		elsif ($file =~ /MISE11\.RL48\./) {$newname =~ s/MISE11\.RL48\./MISE11\.RL48\.cor429\./;}
	
		print "oldname : $file\n";
		print "newname : $newname\n";	
		`mv $file $newname`;
	}
	
