repo.or.cz
/
GalaxyCodeBases.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
new file: cell2loc.py
[GalaxyCodeBases.git]
/
perl
/
etc
/
WoodyMiaoLin
/
Tiger
/
rearrange.pl
blob
f2ed66cc807a7c6fbaf8f2d2baf0c950800bbe04
1
#!/usr/bin/perl
2
use
strict
;
3
use
warnings
;
4
5
my
@ra
;
6
while
(<>) {
7
chomp
;
8
my
@a
=
split
/\t/
;
9
my
@b
;
10
$b
[
0
] =
$a
[
0
];
11
$b
[
1
] =
$a
[
1
];
12
foreach
(
4
.
.21
) {
13
my
(
$a1
,
$a2
) =
split
/\/
/,
$a
[
$_
];
14
if
((
$a1
eq
"N"
)
and
(
$a2
eq
"A"
)) {
15
push
@b
,
"none"
;
16
}
elsif
((
$a1
eq
"0"
)
and
(
$a2
eq
"0"
)) {
17
push
@b
,
$a
[
2
];
18
}
elsif
((
$a1
eq
"1"
)
and
(
$a2
eq
"1"
)) {
19
push
@b
,
$a
[
3
];
20
}
else
{
21
push
@b
,
"
$a
[2]
$a
[3]"
;
22
}
23
}
24
push
@ra
,
\
@b
;
25
}
26
27
foreach
(
@ra
) {
28
my
$a
=
join
"
\t
"
,
@
{
$_
};
29
print
$a
,
"
\n
"
;
30
}
31
32
print
O
"
\n
</svg>
\n
"
;
33
close
O
;