Leser: 2
7 Einträge, 1 Seite |
1
2
>gi8886141|gb|AAF80385.1| carbofuran hydrolase
MALNRIKNSNPSTLPPETPGEGPFMHEHQADILKWIRLADDVYRFRD
>gi8886141 (|gb|AAF80385.1|) carbofuran hydrolase
$_ =~ s/^(gi\d+?)(\|.+?\|.+?\|)\s+?(.+?)/$1 ($2) $3/g;
1
2
3
4
5
6
7
>gi113|Histone K17di [Homo sapiens]
APAEKTPVKKGC
>gi11998|Histone K17di [Homo sapiens]
APAEKTPVKKGC
>gi1666|Histone K17di [Homo sapiens]
APAEKTPVKKGC
..etc
1
2
3
4
5
6
7
8
9
my $myfile= 'C:/Documents and Settings/XXX/Desktop/YYY/test.txt';
open (FILE, "$myfile") || die "Can't open '$myfile': $!\n";
my @parse = <FILE>;
close(FILE);
foreach (@parse) {
chomp;
$_ =~ s/^(gi\d+?)(\|.+?\|.+?\|)\s+?(.+?)/$1 ($2) $3/g;
1
2
3
open (WRITE, ">example.txt) || die "Can't open 'example.txt':\n$!";
print WRITE @parse;
close WRITE;
1
2
3
open (FILE, "$myfile") || die "Can't open '$myfile': $!\n";
my @parse = <FILE>;
close(FILE);
1
2
3
4
5
open (FILE, "$myfile") || die "Can't open '$myfile': $!\n";
while ($zeile = <FILE>) {
#tue etwas mit $zeile
}
close FILE;
7 Einträge, 1 Seite |