comparison ragoo.pl @ 3:2390a7ae4853 draft

Uploaded
author dereeper
date Mon, 21 Jun 2021 21:42:16 +0000
parents 6a1c9991b723
children 2a9ac8ac9120
comparison
equal deleted inserted replaced
2:fac71ffb07d5 3:2390a7ae4853
18 $scaffolds = $sc; 18 $scaffolds = $sc;
19 19
20 system("cp -rf $scaffolds $tmpdir/scaffolds.fa"); 20 system("cp -rf $scaffolds $tmpdir/scaffolds.fa");
21 system("cp -rf $reference $tmpdir/reference.fa"); 21 system("cp -rf $reference $tmpdir/reference.fa");
22 chdir($tmpdir); 22 chdir($tmpdir);
23 system("$dirname/ragoo.py scaffolds.fa reference.fa"); 23 system("$dirname/ragoo.py scaffolds.fa reference.fa >>$output 2>&1");
24 24
25 25
26 my %hash; 26 my %hash;
27 my $id; 27 my $id;
28 open(F,"ragoo_output/ragoo.fasta"); 28 open(F,"ragoo_output/ragoo.fasta");
32 $hash{$id}.= $_; 32 $hash{$id}.= $_;
33 } 33 }
34 } 34 }
35 close(F); 35 close(F);
36 36
37 open(O,">$output"); 37 open(O,">>$output");
38 foreach my $id(keys(%hash)){ 38 foreach my $id(keys(%hash)){
39 print O ">$id\n"; 39 print O ">$id\n";
40 my $seq = $hash{$id}; 40 my $seq = $hash{$id};
41 for (my $i =0; $i <= length($seq); $i =$i+80){ 41 for (my $i =0; $i <= length($seq); $i =$i+80){
42 my $subseq = substr($seq,$i,80); 42 my $subseq = substr($seq,$i,80);