#Perl script used to extract list # of Gene Ontologies associated with morphology # from Mantidactylus betsileanus annotated transcripts, # based on list defined on morphology-associated # GO terms list in Xenopus laevis. ! /usr/bin/perl -w program to search index in database print search index and line matched @idarray1=(); $filegoanno = $ARGV[0]; open(IN, $filegoanno) || die "File with index not found"; while () { chomp; /(^\S+)/; push (@idarray1, $1); push index into array } $numele=@idarray1; $filedb = $ARGV[1]; open (INN, $filedb) || die "File with database not found"; open(OUT,">result.txt") || die "cannot open file " ; open input file for reading. @filedata= ; $text = "@filedata"; $ct=0; while ($ct<$numele) { counter `grep '$idarray1[$ct]' $filedb > resulttmp.txt`; temporary file open (IN2, "resulttmp.txt"); while () { chomp; $line=$_; print "$idarray1[$ct]\t$line\n"; } $ct++; } `rm resulttmp.txt`;