Skip to content

Instantly share code, notes, and snippets.

@epaule
Last active November 23, 2023 13:19
Show Gist options
  • Save epaule/6a6b78f07a9ddc64e0a58fbd8c12094e to your computer and use it in GitHub Desktop.
Save epaule/6a6b78f07a9ddc64e0a58fbd8c12094e to your computer and use it in GitHub Desktop.
find_omark_contamination.pl
#!/bin/env perl
open IN,shift;
while(<IN>){
push @h,"$1" if />(\S+)/
}
close IN;
open IN,shift;
while(<IN>){
@F=split;
next unless $F[2] eq 'CDS';
$F[9]=~s/[;"]//g;
$c{$F[9]}=$F[0];
}
foreach $g (@h){
# print "$g => $c{$g}\n";
$counts{$c{$g}}++
}
while(($k,$v)=each %counts){print "$k => $v\n"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment