diff bin/align.pm @ 24:08bbde9d0c9d draft

Uploaded
author romaingred
date Mon, 23 Oct 2017 08:16:22 -0400
parents 39b039d82743
children bd4b30bff219
line wrap: on
line diff
--- 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