Leser: 1
|< 1 2 >| | 14 Einträge, 2 Seiten |
$string =~ s/([A-Z]{70})/$1<br>/sg;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
while (<FILE1>){
if (/(.*)\n([A-Za-z\n]+)/){
($header,$seq)=($1,$2);
$seq=~s/\s//g;
if ($i=$seq=~s/($pattern_neu)/<span class='stil3'>$1<\/span>/g){
$seq =~ s/([A-Z]{70})/$1<br>/sg;
open FILE2,">>../docs/Site/files/pattern_html/$pattern_html.htm";
print FILE2 "<font size='2'><strong>>$header<\/strong><\/font><br><font size='2'>$seq<\/font><p>";
close(FILE2);
$Anzseq=$Anzseq+1;
$Anzpattern+=$i;
print STDERR (length $seq)."\n";
}
}
}
close FILE1;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
>uniprot|P67817|HBA_ATEGE Hemoglobin alpha subunit (Hemoglobin alpha chain) (Alpha-globin).
VLSPADKSNVKAAWGKVGGHAGDYGAEALERMFLSFPTTKTYFPHFDLSHGSAQVKGHGK
KVADALTNAVAHVDDMPNALSALSDLHAHKLRVDPVNFKLLSHCLLVTLAAHHPADFTPA
VHASLDKFLASVSTVLTSKYR
>uniprot|P41331|HBA_MICGA Hemoglobin alpha subunit (Hemoglobin alpha chain) (Alpha-globin).
VLTEEDKARVRVAWVPVSKNAELYGAETLTRLFAAHPTTKTYFPHFDLSPGSNDLKVHGK
KVIDALTEAVNNLDDVAGALSKLSDLHAQKLRVDPDNFQFLGLCLEVTIAAHSGGPLKPE
VLLSVDKFLGQISKVLASRYR
>uniprot|P02011|HBA3_RANCA Hemoglobin alpha-3 subunit (Hemoglobin alpha-3 chain) (Alpha-3-globin) (Hemoglobin alpha-III chain, larval).
SLSASEKAAVLSIVGKIGSQGSALGSEALTRLFLSFPQTKTYFPHFDLTPGSADLNTHGG
KIINALAGAANHLDDLAGNLSSLSDLHAYNLRVDPGNFPLLAHIIQVVLATHFPGDFTAE
VQAAWDKFLALVSAVLTSKYR
>uniprot|Q9XSE9|HBA_EQUPR Hemoglobin alpha subunit (Hemoglobin alpha chain) (Alpha-globin).
VLSAADKTNVKAAWSKVGGHAGEFGAEALERMFLGFPTTKTYFPHFDLSHGSAQVKAHGK
KVGDALTLAVGHLDDLPGALSNLSDLHAHKLRVDPVNFKLLSHCLLSTLAVHLPNDFTPA
VHASLDKFLSSVSTVLTSKYR
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
use strict;
use warnings;
my $file = 'eingabedatei.fasta';
{
local $/ = "\n>";
open(my $fh,"<",$file) or die $!;
while(my $entry = <$fh>){
chomp $entry;
next if($entry =~ /^\s*$/);
my ($header,$seq) = split(/\n/,$entry,2);
$seq =~ s/[\n\s]//gs;
print "header: $header\n";
$seq =~ s/([A-Z]{70})/$1\n/gs;
print "Sequenz: $seq\n";
}
close $fh;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /usr/bin/perl
use strict;
use warnings;
use HTML::Parser;
my $text = '';
my $string = "LDGPTLIVIQRTCXITQGLAFATAXYXNHYQSWZMNTNLLLIIYZQFWFLIEMZLVNHQM<span class='stil3'>B<\/span>IKECTWXFYKQTVHGMRM<span class='stil3'>B<\/span>YEHGAYTCXALGE<span class='stil3'>B<\/span>HRLGEKTFXQFAMCGLCTXCTCSLFLNINNDZTDCZRWLAKEDRHGPKYMNFQECCHRGFNPZ<span class='stil3'>B<\/span><span class='stil3'>B<\/span>WNRXQHYIGXWRRH<span class='stil3'>B<\/span>SFIGDYLNLW<span class='stil3'>B<\/span><span class='stil3'>B<\/span>LQLHLIKVWAVMDCZETV<span class='stil3'>B<\/span>XDDDKCLPKWKATTQZV<span class='stil3'>B<\/span>MLHAADMYF<span class='stil3'>B<\/span>ADA<span class='stil3'>B<\/span>LXSQIPP<span class='stil3'>B<\/span>ITZKTFGQNZIPRCLENXKAZZLFKKRWICCZDFMQDED<span class='stil3'>B<\/span>SCHXYLWKLCTVHRZAF<span class='stil3'>B<\/span>AZDPLFNIEEKGLTII<span class='stil3'>B<\/span>QPPQAYNRPY<span class='stil3'>B<\/span>HTSFCH<span class='stil3'>B<\/span>IXHFZQYPMHQSLPDRQXWVASR<span class='stil3'>B<\/span>KXELCMIZEKKDZMSHIPLY<span class='stil3'>B<\/span><span class='stil3'>B<\/span>AXYQGWIXNPKZXDWCTEEXFAAZMSSYNGVAZGLLNZEKVYDNANK<span class='stil3'>B<\/span>EQXXGVTHPKWRWYDGWPHXI<span class='stil3'>B<\/span>DSEA<span class='stil3'>B<\/span>MKLVWRTHVRHTEGQKCCFLXRYHFEZSQSFAHNRVCHMVTDPKN<span class='stil3'>B<\/span>CPENL<span class='stil3'>B<\/span>FQCKNDTGDKQKMMAFWHICTENCNQATQEADYZHDPZGDQNSW<span class='stil3'>B<\/span>DHSKCHKMXDCRWEXARFWYGKIACRMSMNL<span class='stil3'>B<\/span>YMVHGAGKYMPQQZHRFPDKERHFPXNHVQTCYMZKNMSXSPPNDDSSVLZWLZVKE<span class='stil3'>B<\/span>ENFERTYGPWSKDYHMCRQDDZAHDAARVLEGLYRTNGIWZZYVHKMLZRQVGECSLZ<span class='stil3'>B<\/span>RXETQCD<span class='stil3'>B<\/span>P<span class='stil3'>B<\/span>SFDGNHMMYNM<span class='stil3'>B<\/span>IRQYTYDMAVMZ<span class='stil3'>B<\/span>LIZGQIIXIGPLEPFYLXAYNPMXCEVVRAHKTQQQSGALCIYZDXPPAVLVDDRRWMWEGWSHPSQSVDZVMLFSTRZXLM
WTPHRWZQZIHYFQQVMLNGQDFSFIXREPWFRVATAZCFMTRYLZEFNATLQIRHTCLHNDVIEDYLSLHCNCLXGWFH<span class='stil3'>B<\/span>TK<span class='stil3'>B<\/span>FHWMHGRLRZPESKVC<span class='stil3'>B<\/span>KNWFLWLCILKFLPZZKLLMNSLNCFDGLHWXSGGM<span class='stil3'>B<\/span>DTQNCYD<span class='stil3'>B<\/span>QQX<span class='stil3'>B<\/span>TMTWDFSMHNYKIIIDPEFNZP<span class='stil3'>B<\/span>DCGTX";
my $p = HTML::Parser->new();
$p->handler(text => \&start_handler,"dtext");
$p->parse($string);
$text =~ s~[^A-Z]~~gs;
$text =~ s~([A-Z]{70})~$1<br />~sg;
$text =~ s~B~<span class='stil3'>B</span>~g;
print $text;
sub start_handler{
$text .= shift;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/usr/bin/perl -w
use CGI qw/:standard/;
use BioinfoPerlModul;
use GZip;
$pattern=param('pattern');
$dateipfad=param('dateiname');
$download=param('download');
$pattern_html=Zufallswert();
open FILE2,">../docs/Site/files/pattern_html/$pattern_html.htm";
print FILE2
"<html><head><title>Hits Of Pattern<\/title>
<meta http-equiv='Content-Type' content='text\/html; charset=iso-8859-1'>
<link href='main.css' rel='stylesheet' type='text/css'>
<\/head>
<style type='text\/css'>
<!--
.stil3 {
color:
background-color: #FF0000;
}
-->
<\/style>
<body>
<h1>Gefundene Sequenzen mit PATTERN:<\/h1><font size='3'>$pattern<\/font><p>
";
close(FILE2);
open FILE1, "$dateipfad" or die "Can't open $dateipfad!\n";
$Anzpattern=0;
$Anzseq=0;
$m=0;
$/=">";
#############################Aufruf Sub um Pattern für Perl zu definieren###############
$pattern_neu=pattern_design($pattern);
while (<FILE1>){
if (/(.*)\n([A-Za-z\n]+)/){
($header,$seq)=($1,$2);
$seq=~s/\s//g;
if ($i=$seq=~s/($pattern_neu)/<span class='stil3'>$1<\/span>/g){
$seq =~ s/([A-Z]{70})/$1<br>/sg;
open FILE2,">>../docs/Site/files/pattern_html/$pattern_html.htm";
print FILE2 "<font size='2'><strong>>$header<\/strong><\/font><br><font size='2'>$seq<\/font><p>";
close(FILE2);
$Anzseq=$Anzseq+1;
$Anzpattern+=$i;
print STDERR (length $seq)."\n";
}
}
}
close FILE1;
open FILE2,">>../docs/Site/files/pattern_html/$pattern_html.htm";
print FILE2"<p> <p><p><p>
$Anzpattern <span class='stil3'> PATTERN <\/span>in $Anzseq Sequenzen gefunden.<br><br>
<p><p><p>
<\/body>
<\/html>
";
close(FILE2);
if($download){
gzip_compress("../docs/Site/files/pattern_html/$pattern_html.htm");
print"
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<link href='main.css' rel='stylesheet' type='text/css'>
</head>
<body>
<p>Ihre Zufallsequenzen wurden erzeugt.<br>
Klicken Sie auf Download um die komprimierte HTML-DAteiherunterzuladen!</p>
<form name='form1' method='get' action='../Site/files/pattern_html/$pattern_html.htm.gz'>
<input type='submit' name='Submit' value='Download'>
</form>
<p> </p>
</body>
</html>";
}
else {
print " <html>
<head>
<title>Codeoperator</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
</head><script language=JavaScript>
function weiter()
{
location.href='http://127.0.0.1/Site/files/pattern_html/$pattern_html.htm';
}
</script>
<body onload=weiter()>
</body></html>";
}
|< 1 2 >| | 14 Einträge, 2 Seiten |