...while keeping the same AG & CT? distribution. Then you must randomly mutate the sequence 10-20 times and find the similarity between the mutated and the original sequence by calculating the adhoc score. Pyrimidine ot pyrimidine get a score of +1, Purines to purine get a score of +2, no change gets a score of 0, and pyrimidines to purines get a score of -2.
This is what I have so far:
open (MyFile, "DNA.text");
my $seq = "AAAAAGTATACAACATCA"; #input seq
my @seqarray = split(//,$seq); #put seq in array
my @randarray = sort {rand() <=> rand()} @seqarray; #suffle indexes
my $outseq = join("",@randarray); #join shuffled sequence
print "$outseq\n"; #output
This is what I have so far:
open (MyFile, "DNA.text");
my $seq = "AAAAAGTATACAACATCA"; #input seq
my @seqarray = split(//,$seq); #put seq in array
my @randarray = sort {rand() <=> rand()} @seqarray; #suffle indexes
my $outseq = join("",@randarray); #join shuffled sequence
print "$outseq\n"; #output