diff PGAP_wrapper2.pl @ 5:d8c5bea1cce2 draft

Uploaded
author dereeper
date Thu, 24 Jun 2021 17:56:22 +0000
parents 041355b97140
children 1085c917d850
line wrap: on
line diff
--- a/PGAP_wrapper2.pl	Thu Jun 24 16:15:34 2021 +0000
+++ b/PGAP_wrapper2.pl	Thu Jun 24 17:56:22 2021 +0000
@@ -32,8 +32,10 @@
 die $usage
   if ( !$proteins || !$genes || !$out || !$order);
 
+if ($order =~/^,(.*)$/){
+	$order = $1;
+}
 my @names = split(",",$order);
-my @list;
 mkdir("tmpdir$$");
 my @gene_files = split(/,/,$genes);
 my $n = 0;
@@ -45,7 +47,7 @@
 $n = 0;
 my @protein_files = split(/,/,$proteins);
 foreach my $protein_file(@protein_files){
-        my $particule = $names[0];
+        my $particule = $names[$n];
 	system("cp $protein_file tmpdir$$/$particule.pep");
 	open(F,"$protein_file");
 	open(F2,">tmpdir$$/$particule.function");
@@ -60,6 +62,6 @@
 }
 
 #chdir("$dirname/PGAP-1.2.1");
-my $cmd = "perl $dirname/PGAP-1.2.1/PGAP.pl --input tmpdir$$ --output outdir --cluster --pangenome --variation --evolution --function --strains ".join("+",@list)." --method GF";
+my $cmd = "perl $dirname/PGAP-1.2.1/PGAP.pl --input tmpdir$$ --output outdir --cluster --pangenome --variation --evolution --function --strains ".join("+",@names)." --method GF";
 system($cmd);
 system("cp -rf outdir/1.Orthologs_Cluster.txt $out");