Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F9501598
analyse
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
analyse
View Options
#!/usr/bin/perl
open
INPUT
,
'<quarkonii.file'
;
$nobs
=
0
;
while
(
$line
=
<INPUT>
){
chomp
$line
;
@line
=
split
/\t+/
,
$line
;
$exp
=
$line
[
0
];
$obs
=
$line
[
4
];
if
(
$nobs
==
0
){
$nobs
=
1
;
$obs
[
$nobs
]
=
$obs
;
$nexp
[
$nobs
]
=
1
;
$exp
[
$nobs
][
$nexp
[
$nobs
]]
=
$exp
}
else
{
$match
=
0
;
foreach
$n
(
1
...
$nobs
){
if
(
$obs
eq
$obs
[
$n
])
{
$match
=
$n
;}
}
if
(
$match
==
0
){
$obs
[
++
$nobs
]
=
$obs
;
$nexp
[
$nobs
]
=
1
;
$exp
[
$nobs
][
$nexp
[
$nobs
]]
=
$exp
;
}
else
{
$matchexp
=
0
;
foreach
$nx
(
1
...
$nexp
[
$match
]){
if
(
$exp
eq
$exp
[
$match
][
$nx
])
{
$matchexp
++
;
}
}
if
(
$matchexp
==
0
){
$nexp
[
$match
]
++
;
$exp
[
$match
][
$nexp
[
$match
]]
=
$exp
;
}
}
}
}
print
"$nobs\n"
;
foreach
$n
(
1
...
$nobs
){
print
"$obs[$n]\t\t"
;
foreach
$nx
(
1
...
$nexp
[
$n
]){
print
"\t$exp[$n][$nx]"
}
print
"\n"
;
}
exit
();
File Metadata
Details
Attached
Mime Type
text/x-perl
Expires
Sun, Feb 23, 2:46 PM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486701
Default Alt Text
analyse (1 KB)
Attached To
rHEPDATASVN hepdatasvn
Event Timeline
Log In to Comment