Comment supprimer proprement un fichier?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| my $fich_fsa = 'P:/Theorie/YANN/Fadoua/mutation_seq/ref_ali/'.$id.'.fsa';
my $fich_msf = 'P:/Theorie/YANN/Fadoua/mutation_seq/ref_ali/'.$id.'.msf';
my @params = (
'gapopen' => 15,
'PAIRGAP' => 0,
'ktuple' => 4,
'type' => 'dna',
'outfile' => $fich_msf,
'format' => 'Fasta',
'outorder' => 'aligned',
);
# and pass the factory a reference to that array
my $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params);
$factory->executable("C:/ClustalW2/clustalw2.exe");
my $aln = $factory->align($seq_array_ref);
# création du fichier fasta
my $in_msf = Bio::AlignIO->new(-file => $fich_msf , -format => 'msf');
my $out_fsa = Bio::AlignIO->new(-file => ">".$fich_fsa , -format => 'fasta');
while ( $aln = $in_msf->next_aln() ) {
$out_fsa->write_aln($aln);
}
close ($fich_fsa);
close ($fich_msf);
unlink ['P:/Theorie/YANN/Fadoua/mutation_seq/ref_ali/'.$id.'.msf']; |
J'utilise donc :
unlink ['P:/Theorie/YANN/Fadoua/mutation_seq/ref_ali/'.$id.'.msf'];
J'ai essayé plus simplement :
1 2 3
| my @file = ('P:/Theorie/YANN/Fadoua/mutation_seq/ref_ali/'.$id.'.msf');
unlink @file; |
mais ça ne va pas non plus.
merci pour votre aide
Partager