Mercurial > repos > dereeper > pgap
comparison PGAP_wrapper2.pl @ 5:d8c5bea1cce2 draft
Uploaded
author | dereeper |
---|---|
date | Thu, 24 Jun 2021 17:56:22 +0000 |
parents | 041355b97140 |
children | 1085c917d850 |
comparison
equal
deleted
inserted
replaced
4:70b7a5270968 | 5:d8c5bea1cce2 |
---|---|
30 | 30 |
31 | 31 |
32 die $usage | 32 die $usage |
33 if ( !$proteins || !$genes || !$out || !$order); | 33 if ( !$proteins || !$genes || !$out || !$order); |
34 | 34 |
35 if ($order =~/^,(.*)$/){ | |
36 $order = $1; | |
37 } | |
35 my @names = split(",",$order); | 38 my @names = split(",",$order); |
36 my @list; | |
37 mkdir("tmpdir$$"); | 39 mkdir("tmpdir$$"); |
38 my @gene_files = split(/,/,$genes); | 40 my @gene_files = split(/,/,$genes); |
39 my $n = 0; | 41 my $n = 0; |
40 foreach my $gene_file(@gene_files){ | 42 foreach my $gene_file(@gene_files){ |
41 my $particule = $names[$n]; | 43 my $particule = $names[$n]; |
43 $n++; | 45 $n++; |
44 } | 46 } |
45 $n = 0; | 47 $n = 0; |
46 my @protein_files = split(/,/,$proteins); | 48 my @protein_files = split(/,/,$proteins); |
47 foreach my $protein_file(@protein_files){ | 49 foreach my $protein_file(@protein_files){ |
48 my $particule = $names[0]; | 50 my $particule = $names[$n]; |
49 system("cp $protein_file tmpdir$$/$particule.pep"); | 51 system("cp $protein_file tmpdir$$/$particule.pep"); |
50 open(F,"$protein_file"); | 52 open(F,"$protein_file"); |
51 open(F2,">tmpdir$$/$particule.function"); | 53 open(F2,">tmpdir$$/$particule.function"); |
52 while(<F>){ | 54 while(<F>){ |
53 if (/>(.*)/){ | 55 if (/>(.*)/){ |
58 close(F2); | 60 close(F2); |
59 $n++; | 61 $n++; |
60 } | 62 } |
61 | 63 |
62 #chdir("$dirname/PGAP-1.2.1"); | 64 #chdir("$dirname/PGAP-1.2.1"); |
63 my $cmd = "perl $dirname/PGAP-1.2.1/PGAP.pl --input tmpdir$$ --output outdir --cluster --pangenome --variation --evolution --function --strains ".join("+",@list)." --method GF"; | 65 my $cmd = "perl $dirname/PGAP-1.2.1/PGAP.pl --input tmpdir$$ --output outdir --cluster --pangenome --variation --evolution --function --strains ".join("+",@names)." --method GF"; |
64 system($cmd); | 66 system($cmd); |
65 system("cp -rf outdir/1.Orthologs_Cluster.txt $out"); | 67 system("cp -rf outdir/1.Orthologs_Cluster.txt $out"); |