1 #NEW_DIR = '/home/czmasek/WORK/GENOME_HMMPFAM/HMMSCAN3_no_bias_250/'
2 #OLD_DIR = '/home/czmasek/WORK/GENOME_HMMPFAM/HMMSCAN30b3_no_bias_240/'
4 NEW_DIR = '/home/czmasek/WORK/GENOME_HMMPFAM/HMMSCAN3_no_bias_260/'
5 OLD_DIR = '/home/czmasek/WORK/GENOME_HMMPFAM/HMMSCAN3_no_bias_250/'
7 # this need to be run in the dir where the links to be moved are
8 # need to create a dir named 'newdir' first
10 Dir.foreach('.') { |f|
12 link = File.readlink( f )
13 puts f + ' -> ' + link
15 link =~ /\/([^\/]+)\/([^\/]+)\.hmmscan_250/
19 puts ' => ' + group + ' / ' + core_name
20 new_link = NEW_DIR + group + '/' + core_name + '.hmmscan_260'
21 puts ' => ' + new_link
23 if ( !File.exists?( new_link ) )
24 puts 'ERROR ' + new_link.to_s + ' does not exist'
27 if ( !File.exists?( link ) )
28 puts 'ERROR ' + link.to_s + ' does not exist'
31 #what is called new_link will by linked to by 'newdir/' + f.to_s:
32 File.symlink( new_link, 'newdir/' + f.to_s )