note
BrowserUk
<p>I think this does what you describe.
<code>
#! perl -slw
use strict;
my( $target_name, %probes );
$_ = <DATA>; # Prime the pump.
do {
# extract the target name
$target_name = $1 if m[( \d{7} ) _at: \d{3} : \d{3} ]x;
while( m[$target_name] ) {
# process the record containing the current target name
my $probe = <DATA>; # Read the probe
chomp $probe;
# save it in an HoA keyed by the target name
push @{ $probes{ $target_name } }, $probe;
last unless defined( $_ = <DATA> ); # get the next line;
}
} until eof DATA; # till done
print $_, ' : ', join', ', @{ $probes{ $_ } } for keys %probes;
__DATA__
probe:MOE430A:1415670_at:549:177; Interrogation_Position=2513; Antisense;
GAGGAAACGTTCACCCTGTCTACTA
probe:MOE430A:1415670_at:467:433; Interrogation_Position=2521; Antisense;
GTTCACCCTGTCTACTATCAAGACA
probe:MOE430A:1415670_at:254:643; Interrogation_Position=2533; Antisense;
TACTATCAAGACACTCGAAGAGGCT
probe:MOE430A:1415670_at:54:269; Interrogation_Position=2556; Antisense;
CTGTGGGCAATATTGTGAAGTTCCT
probe:MOE430A:1415670_at:405:339; Interrogation_Position=2583; Antisense;
GAATGCATCCTTGTGAGAGGTCAGA
probe:MOE430A:1415670_at:60:395; Interrogation_Position=2597; Antisense;
GAGAGGTCAGACAAAGTGCCAGAAA
probe:MOE430A:1415670_at:284:165; Interrogation_Position=2619; Antisense;
AAAACAAGAACACCCACACGCTGCT
probe:MOE430A:1415670_at:622:145; Interrogation_Position=2634; Antisense;
ACACGCTGCTGCTAGCTGGAGTATT
probe:MOE430A:1415670_at:291:661; Interrogation_Position=2804; Antisense;
TATCTTGTCCAACACTACGTCGAAG
probe:MOE430A:1415670_at:146:701; Interrogation_Position=2956; Antisense;
TTGTCACCATGCCTGCAAGGAGAGA
probe:MOE430A:1415671_at:116:525; Interrogation_Position=1156; Antisense;
GGAACAGGAATGTCGCAACATCGTA
probe:MOE430A:1415671_at:655:137; Interrogation_Position=1173; Antisense;
ACATCGTATGGATTGCTGAGTGCAT
probe:MOE430A:1415671_at:398:139; Interrogation_Position=1232; Antisense;
GGCTGATCACATCCAAAAAGTCATG
</code>
<p>Output<code>
P:\test>285872
1415671 : GGAACAGGAATGTCGCAACATCGTA, ACATCGTATGGATTGCTGAGTGCAT, GGCTGATCACATCCAAAAAGTCATG
1415670 : GAGGAAACGTTCACCCTGTCTACTA, GTTCACCCTGTCTACTATCAAGACA, TACTATCAAGACACTCGAAGAGGCT, CTGTGGGCAATATTGTGAAGTTCCT, GAATGCATCCTTGTGAGAGGTCAGA, GAGAGGTCAGACAAAGTGCCAGAAA, AAAACAAGAACACCCACACGCTGCT, ACACGCTGCTGCTAGCTGGAGTATT, TATCTTGTCCAACACTACGTCGAAG, TTGTCACCATGCCTGCAAGGAGAGA
</code>
<hr />
<font size=1 >
<div>Examine what is said, not who speaks.</div>
"Efficiency is intelligent laziness." -David Dunham<br />
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller<br />
If I understand your problem, I can solve it! Of course, the same can be said for you.<br />
</p></font>
285872
285872