the updated code as below:
my @fullset = qw(AA AC AG AT CA CC CG CT GA GC GG GT TA TC TG TT);
my (@major, @minor, @combinations);
{ my @temp = @fullset;
foreach (0..3) {
my $r_pair = splice(@temp, int(rand($#temp+1)), 1);
$major[$_] = $r_pair;
}
}
foreach my $pos (0..$#major) {...
Hi,all! I am going to generate some nagative dependent
nucleotide pairs and need your help.
I have enclosed the description of the question and
my code here. Any suggestion is highly appreciated.
***********************************
The description
To generate negative dependent pair...
hi fish,
I doubt line 51 is within
open OUTPUT, "> outfile9_55_$y.txt" or die "Cannot open output file.\n";
foreach (@combinations) {
print OUTPUT join('', @{$_}), "\n";
}
thanks
Hi rharsh! I tried that code. Although the message "Use of uninitialized value in join or string at make_file2.pl line 51"
still exsited, it seemed that that code can generate the right results.
Thank you again!
The intersting thing is that another very similar code runs well. I only changed the "fullset" in the above code but it turned out that the error message occured.
The similar code is:
#!/usr/bin/perl
use strict;
use warnings;
my @fullset = qw(AA AC AG AT CA CC CG CT GA GC GG GT TA TC TG TT)...
Hi all, I got an error message when running the code at the end of this post. It said that "Use of uninitialized value in join or string at make_file2.pl line 51."
Although I doubt the error message, I would appreciate if you can find something I really missed.
Thank you!
Alex...
Dear all,
Thank you for warm help! I prefer
"open (SHORT, "< outfile8.txt");
chomp (@short = <SHORT>);
close SHORT;"
for the input.
BTW, can the code be slightly modified to print the
result like:
37 26 26 56 32 22 36 47
(Note: each number is the highest frequency of the
nucleotide in...
Hi Duncan,
I put the data in the code and got the result like:
0 | C
1 | G
2 | A
3 | T
4 | T
5 | A
6 | G
7 | C
0 | T
1 | A
2 | C
3 | T
4 | T
5 | A
6 | G
7 | A
0 | A
1 | C
2 | C
3 | C
4 | A
5 | C
6 | C
7 | G
0 | C
1 | T
2 | G
3 | A
4 | G
5 | T
6 | T
7 | C
0 | T
1 | G
2 | T
3 | C
4 | A
5 | T...
Hi! I have a txt file which holds 100 sequences and the
width for each sequence is 8 nucleotide long.
Like:
AGATAGCA
ACACAGTA
TCCGTGCT
ATTGGCTA
GACTTGAA
........
I want to calculate the frequency of nucleotides A,T,C,G
for each column NOT each row and print them out.
My code is here but it...
Hi rharsh,
Thanks for the message! I changed the code as you suggested and run into the result like:
CCAGCGCT
CCAGCGCT
AAATCGCT
CCAGCGCT
CCAGACCT
AAAGCGCT
CCAGACCT
CCAGCGTG
CCAGCGCT
CCAGCGCT
CCATCGCT
CCAGCGCT
CCAGCGCT
CCAGCGCT
CCAGCGCT
CCAGCGCT
CCAGCGCT
CCATCGCT
CCAGCGCT
CCAGACCT
CCAGACCT...
Hi Kevin,
Thanks! Since we had to change our ideas, the code should
be changed slightly.
BTW, I fixed another code which used subroutine. Thanks again!
Hi all,
Thank you so much for help on this topic. After discussing
with my advisor, we thought that we would have to switch to
another idea because the previous data was not what we really want.
My previous description was:
**************************************************
I am going to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.