Hello,
If I am using the link function to link two outputs (cluster in the same group based on the distance). How can I write them to the same file (if they link)?
Thanks!
Hello,
If I am using the link function to link two outputs (cluster in the same group based on the distance). How can I write them to the same file (if they link)?
Thanks!
the link() function operates on files, not clusters or what have you. I'm not sure what you're asking.
here is my code-
my $diff = $a - $b;
if ( $diff < 800 ) {
$infile_hash{$c}->{link} = $infile_hash{$d}->{group};
$infile_hash{$d}->{link} = $infile_hash{$c}->{group};
}
now I want to check if the two groups are linked then I want to write them to the same file.
I hope this is a bit more clear...please let me know if not!
Thanks
What are a, b, c, d?
What are the contents of the hashes?
num val pos
1 52639189 0
2 52639537 0
3 52638628 1
4 52638120 1
a = first val
b = second val
so in the step before this step. I group them together if pos are same (both '0') then I take the difference between a and b, then assign same 'group' to them.
c is the num of groups from same pos (0's)
d is the num of groups from same pos (1's)