Skip to content
Snippets Groups Projects
Commit 13a16e95 authored by Ian Longden's avatar Ian Longden
Browse files

quick test for missing files from mapping

parent 9348d3fd
No related branches found
No related tags found
No related merge requests found
use strict;
use warnings;
my $dir = shift;
opendir(DIR, $dir);
my @allfiles = readdir DIR;
closedir DIR;
#xref_0_dna.3100129-307.out
#ExonerateGappedBest1_dna_307.map
#xref_0_dna.3100129-307.err
my %hash;
my %max;
foreach my $file(@allfiles){
if($file eq '.' || $file eq '..'){
next;
}elsif(-d $file){
next;
}else{
my $type;
if($file =~ /dna/){
$type = 'dna';
}
elsif($file =~ /pep/){
$type = 'pep';
}
elsif($file =~ /fasta/){
next;
}
else{
next;
}
if($file =~ /_(\d+).map/){
$hash{$type}{'map'}{$1} = $1;
}
elsif($file =~ /-(\d+).err/){
if($max{$type} < $1){
$max{$type} = $1
}
$hash{$type}{'err'}{$1} = $1;
}
elsif($file =~ /-(\d+).out/){
$hash{$type}{'out'}{$1} = $1;
}
}
}
foreach my $type ('pep', 'dna'){
print "max ".$type."-->".$max{$type}."\n";
for (my $i=1; $i <= $max{$type}; $i++){
if(!defined($hash{$type}{'map'}{$i})){
print $i,".map\n";
}
if(!defined($hash{$type}{'err'}{$i})){
print $i,".err\n";
}
if(!defined($hash{$type}{'out'}{$i})){
print $i,".out\n";
}
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment