Mercurial > repos > ucsb-phylogenetics > osiris_phylogenetics
diff orthologs/evolmap_output_exclude.pl @ 0:5b9a38ec4a39 draft default tip
First commit of old repositories
author | osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu> |
---|---|
date | Tue, 11 Mar 2014 12:19:13 -0700 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/orthologs/evolmap_output_exclude.pl Tue Mar 11 12:19:13 2014 -0700 @@ -0,0 +1,23 @@ +#!/usr/bin/perl + +my $input = $ARGV[0]; +my $excludeList = $ARGV[1]; + +my @species = split(/,/, $excludeList); + +open(INPUT, $input); + open(OUTPUT, '>'."output.txt"); + while(my $currLine = <INPUT>) { + my @currentLine = split(/\t/, $currLine); + my $flag = 0; + for(my $i = 0; $i < @species; $i++) { + if($species[$i] eq $currentLine[0]) { + $flag = 1; + } + } + if($flag == 0) { + print OUTPUT $currLine; + } + } + close(OUTPUT); +close(INPUT); \ No newline at end of file