first commit
This commit is contained in:
19
perl/Examples/Chap4/make-genes-2
Normal file
19
perl/Examples/Chap4/make-genes-2
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
###
|
||||
### make_genes-2
|
||||
###
|
||||
|
||||
## Chapter 4 section 3.2
|
||||
|
||||
%n_expand = qw(N ACGT
|
||||
B CGT D AGT H ACT V ACG
|
||||
K GT M AC R AG S CG W AT Y CT);
|
||||
|
||||
sub make_dna_sequences {
|
||||
my $pat = shift;
|
||||
for my $abbrev (keys %n_expand) {
|
||||
$pat =~ s/$abbrev/($n_expand{$abbrev})/g;
|
||||
}
|
||||
return make_genes($pat);
|
||||
}
|
||||
Reference in New Issue
Block a user