<DIV>That helps! Thank you!<BR><BR><B><I>Roger Pettett <rmp@sanger.ac.uk></I></B> wrote:
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">On Tue, 16 Aug 2005, Alex Zhang wrote:<BR><BR>> Dear All,<BR>><BR>> I made a group A which includes 16 combinations of any<BR>> two nucleotides like: AA,AC,AG,AT,<BR>> CA,CC,CG,CT,<BR>> GA,GC,GG,GT,<BR>> TA,TC,TG,TT<BR>><BR>> If I randomly got a pair like AC, I want to exclude<BR>> AC, AT, AG, AA, TC, CC, GC. In other words, I want to<BR>> exclude the pairs in group A which has the same<BR>> nucleotide with the pair randomly selected. Can<BR>> anybody suggest me how to approach this using Perl?<BR><BR>How about something like this?<BR><BR>my @group = qw(AA AC AG AT<BR>CA CC CG CT<BR>GA GC GG GT<BR>TA TC TG TT);<BR>my $rand = $group[rand(scalar @group)];<BR>my @filtered = grep { $_ !~ /[$rand]/ } @group;<BR><BR>print join("\n", @filtered);<BR><BR><BR>-- <BR>Roger Pettett, rmp@sanger.ac.uk<BR>Project Leader (Web Systems)<BR>The Sanger Insti
 tute,
 WTGC, Cambridge CB10 1SA, UK<BR>http://www.sanger.ac.uk/<BR>http://decipher.sanger.ac.uk/<BR>http://www.ensembl.org/<BR>_______________________________________________<BR>Bioinformatics.Org general forum - BiO_Bulletin_Board@bioinformatics.org<BR>https://bioinformatics.org/mailman/listinfo/bio_bulletin_board<BR></BLOCKQUOTE></DIV><p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com