view 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 source

#!/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);