view phylostatistics/tree_species.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
use strict;

my $infile=$ARGV[0];
my $treefile=$ARGV[1];

open IN, $infile or die "Cannot open $infile\n";
open TREE, $treefile or die "Cannot open $treefile\n";

my $tree = <TREE>;
close(TREE);

while(<IN>){
	my $curspecies = $_;
	chomp($curspecies);
	$curspecies =~ s/ /\_/g ;
	if($tree =~ m/$curspecies/){
		#match
	}else{
		print $curspecies."\n";
	}	
}