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
limit fstBC to 30bp in Python3 ver.
[GalaxyCodeBases.git]
/
perl
/
etc
/
WoodyMiaoLin
/
PbeBefore2015
/
rename0.pl
blob
a9c8093e940a10f0898b5d647ced57ef8df6cb82
1
#!/usr/bin/perl
2
use
strict
;
3
use
warnings
;
4
5
open
I1
,
"<"
,
"cytb_accession_number.txt"
;
6
open
I2
,
"<"
,
"cytb_sequence.fasta"
;
7
open
O
,
">"
,
"cytb_rename.fa"
;
8
9
my
%name
;
10
while
(<
I1
>) {
11
chomp
;
12
my
@a
=
split
/\t/
;
13
$name
{
$a
[
1
]} =
"
$a
[1]_
$a
[2]"
;
14
}
15
close
I1
;
16
17
my
%fa
;
18
while
(<
I2
>) {
19
$/ =
">"
;
20
my
$seq
= <
I2
>;
21
chomp
$seq
;
22
$seq
=~
s/\s//g
;
23
$/ =
"
\n
"
;
24
/([ABGU]{2}[0-9]{6})/
;
25
print
O
">
$name
{
$1
}
\n
$seq
\n
"
;
26
}
27
close
I2
;
28
close
O
;
29