#! /usr/local/bin/perl -w

# rev_comp.pl
# Find the reverse complement of a sequence 
# using EMBOSS's "revseq"
# WI course: Unix and Programming Skills for Biologists - March 2003

# Prompt the user for his/her sequence
print "What is your sequence to reverse complement? ";

# Remove the newline character at the end
chomp ($seqName = <STDIN>);

# Enclose a shell command in backquotes to execute in within a Perl script
$date = `date`;
$rev_comp = `revseq $seqName -filter`;

print "$date";
print "Reverse complement:\n$rev_comp";
