# HG changeset patch # User romaingred # Date 1508760982 14400 # Node ID 08bbde9d0c9d06dbf9520d534420a47ff1f46a38 # Parent 7dd78ad2875f87b90e2fb8aae066886073598b12 Uploaded diff -r 7dd78ad2875f -r 08bbde9d0c9d bin/align.pm --- a/bin/align.pm Fri Oct 20 09:33:54 2017 -0400 +++ b/bin/align.pm Mon Oct 23 08:16:22 2017 -0400 @@ -15,12 +15,18 @@ sub to_build { - my $toBuildHashP = shift; my $log = shift; + my ( $toBuildTabP, $log, $newdir ) = @_; - while ( my ( $k, $v ) = each %{ $toBuildHashP } ) - { - build_index ( $k, $log ) if $v == 1; - } + foreach my $pairs ( @{ $toBuildTabP } ) + { + if ( $pairs->[0] == 1 ) + { + my $sym = $newdir.basename(${$pairs->[1]}).'_symlink.fa'; + symlink( ${$pairs->[1]}, $sym ); + ${$pairs->[1]} = $sym; + build_index ( ${$pairs->[1]}, $log ); + } + } } sub build_index