-
-
Save maasha/5311657 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
# Filenames | |
my $start10 = 'start10.dat'; | |
my $res10 = 'res10.dat'; | |
# Opening the files | |
open (START, '<', $start10) or die "Could not read file\n"; | |
open (RES, '<', $res10) or die "Could not read file\n"; | |
# Creating a hash with all start entries | |
my %start_list = (); | |
while (defined (my $line = <START>)) { | |
chomp $line; | |
$start_list{$line} = undef; | |
} | |
# Creating an array with all accession numbers in the result file | |
my %res_list = (); | |
while (defined (my $line = <RES>)) { | |
chomp $line; | |
$res_list{$1} = undef if $line =~ m/\b(\w+.CDS.1)\b/; | |
} | |
# Printing a list of accsseion numbers not detected in the result file | |
print "Following list cotains accession numbers present in '$start10' but not in '$res10'\n"; | |
foreach my $entry (keys %start_list) { | |
if (!exists $res_list{$entry}) { | |
print "$entry\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment