| 1 | # BioPerl module for Bio::Variation::IO::flat | ||||||||||||||||||||||||||||
| 2 | # | ||||||||||||||||||||||||||||
| 3 | # Please direct questions and support issues to <bioperl-l@bioperl.org> | ||||||||||||||||||||||||||||
| 4 | # | ||||||||||||||||||||||||||||
| 5 | # Cared for by Heikki Lehvaslaiho <heikki-at-bioperl-dot-org> | ||||||||||||||||||||||||||||
| 6 | # | ||||||||||||||||||||||||||||
| 7 | # Copyright Heikki Lehvaslaiho | ||||||||||||||||||||||||||||
| 8 | # | ||||||||||||||||||||||||||||
| 9 | # You may distribute this module under the same terms as perl itself | ||||||||||||||||||||||||||||
| 10 | # | ||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | # POD documentation - main docs before the code | ||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | =head1 NAME | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | Bio::Variation::IO::flat - flat file sequence variation input/output stream | ||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | Do not use this module directly. Use it via the Bio::Variation::IO class. | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | This object can transform Bio::Variation::SeqDiff objects to and from | ||||||||||||||||||||||||||||
| 25 | flat file databases. | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | =head1 FEEDBACK | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | =head2 Mailing Lists | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | User feedback is an integral part of the evolution of this and other | ||||||||||||||||||||||||||||
| 32 | Bioperl modules. Send your comments and suggestions preferably to the | ||||||||||||||||||||||||||||
| 33 | Bioperl mailing lists Your participation is much appreciated. | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | bioperl-l@bioperl.org - General discussion | ||||||||||||||||||||||||||||
| 36 | http://bioperl.org/wiki/Mailing_lists - About the mailing lists | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | =head2 Support | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | Please direct usage questions or support issues to the mailing list: | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | I<bioperl-l@bioperl.org> | ||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | rather than to the module maintainer directly. Many experienced and | ||||||||||||||||||||||||||||
| 45 | reponsive experts will be able look at the problem and quickly | ||||||||||||||||||||||||||||
| 46 | address it. Please include a thorough description of the problem | ||||||||||||||||||||||||||||
| 47 | with code and data examples if at all possible. | ||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | =head2 Reporting Bugs | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | report bugs to the Bioperl bug tracking system to help us keep track | ||||||||||||||||||||||||||||
| 52 | the bugs and their resolution. Bug reports can be submitted via the | ||||||||||||||||||||||||||||
| 53 | web: | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | https://github.com/bioperl/bioperl-live/issues | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | =head1 AUTHOR - Heikki Lehvaslaiho | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | Email: heikki-at-bioperl-dot-org | ||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | =head1 APPENDIX | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | The rest of the documentation details each of the object | ||||||||||||||||||||||||||||
| 64 | methods. Internal methods are usually preceded with a _ | ||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | =cut | ||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | # Let the code begin... | ||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||
| 70 | package Bio::Variation::IO::flat; | ||||||||||||||||||||||||||||
| 71 | 2 | $Bio::Variation::IO::flat::VERSION = '1.7.5'; | |||||||||||||||||||||||||||
| 72 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | 2 | ▶ | use Text::Wrap; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 75 | 2 | ▶ | use Bio::Variation::SeqDiff; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 76 | 2 | ▶ | use Bio::Variation::DNAMutation; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 77 | 2 | ▶ | use Bio::Variation::RNAChange; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 78 | 2 | ▶ | use Bio::Variation::AAChange; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 79 | 2 | ▶ | use Bio::Variation::Allele; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||
| 82 | 2 | ▶ | use base qw(Bio::Variation::IO); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||
| 84 | 4 | ▶ | sub new { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 85 | 4 | my($class, @args) = @_; | |||||||||||||||||||||||||||
| 86 | 4 | my $self = bless {}, $class; | |||||||||||||||||||||||||||
| 87 | 4 | $self->_initialize(@args); | |||||||||||||||||||||||||||
| 88 | 4 | return $self; | |||||||||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||
| 91 | 4 | ▶ | sub _initialize { | ||||||||||||||||||||||||||
|
Subroutine
_initialize: called CC=2 SCAR=7.2
| |||||||||||||||||||||||||||||
| 92 | 4 | my($self,@args) = @_; | |||||||||||||||||||||||||||
| 93 | 4 | ▶ | return unless $self->SUPER::_initialize(@args); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 94 | } | ||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||
| 96 | =head2 next | ||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||
| 99 | Title : next | ||||||||||||||||||||||||||||
| 100 | Usage : $haplo = $stream->next() | ||||||||||||||||||||||||||||
| 101 | Function: returns the next seqDiff in the stream | ||||||||||||||||||||||||||||
| 102 | Returns : Bio::Variation::SeqDiff object | ||||||||||||||||||||||||||||
| 103 | Args : NONE | ||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||
| 105 | =cut | ||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||
| 107 | 17 | ▶ | sub next { | ||||||||||||||||||||||||||
|
Subroutine
next: called CC=56 SCAR=40.4
Pod
documented
| |||||||||||||||||||||||||||||
| 108 | 17 | my( $self ) = @_; | |||||||||||||||||||||||||||
| 109 | 17 | local $/ = '//'; | |||||||||||||||||||||||||||
| 110 | 17 | ▶ | return unless my $entry = $self->_readline; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||
| 112 | 17 | ▶ | return if $entry =~ /^\s+$/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||
| 114 | 15 | ▶ | $entry =~ /\s*ID\s+\S+/ || $self->throw("We do need an ID!"); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||
| 116 | 15 | ▶ | my ($id, $offset, $alphabet) = $entry =~ /\s*ID +([^:]+)..(\d+)[^\)]*.\[?([cg])?/ | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 117 | or $self->throw("Can't parse ID line"); | ||||||||||||||||||||||||||||
| 118 | # $self->throw("$1|$2|$3"); | ||||||||||||||||||||||||||||
| 119 | 15 | my $h =Bio::Variation::SeqDiff->new(-id => $id, | |||||||||||||||||||||||||||
| 120 | -offset => $offset, | ||||||||||||||||||||||||||||
| 121 | ); | ||||||||||||||||||||||||||||
| 122 | 15 | ▶ | if ($alphabet) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 123 | 15 | ▶ | if ($alphabet eq 'g') { | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 124 | 4 | $alphabet = 'dna'; | |||||||||||||||||||||||||||
| 125 | } | ||||||||||||||||||||||||||||
| 126 | elsif ($alphabet eq 'c') { | ||||||||||||||||||||||||||||
| 127 | 11 | $alphabet = 'rna'; | |||||||||||||||||||||||||||
| 128 | } | ||||||||||||||||||||||||||||
| 129 | 15 | $h->alphabet($alphabet); | |||||||||||||||||||||||||||
| 130 | } | ||||||||||||||||||||||||||||
| 131 | # | ||||||||||||||||||||||||||||
| 132 | # DNA | ||||||||||||||||||||||||||||
| 133 | # | ||||||||||||||||||||||||||||
| 134 | 15 | my @dna = split ( / DNA;/, $entry ); | |||||||||||||||||||||||||||
| 135 | 15 | shift @dna; | |||||||||||||||||||||||||||
| 136 | 15 | my $prevdnaobj; | |||||||||||||||||||||||||||
| 137 | 15 | foreach my $dna (@dna) { | |||||||||||||||||||||||||||
| 138 | 17 | $dna =~ s/Feature[ \t]+//g; | |||||||||||||||||||||||||||
| 139 | 17 | ($dna) = split "RNA; ", $dna; | |||||||||||||||||||||||||||
| 140 | #$self->warn("|$dna|") ; | ||||||||||||||||||||||||||||
| 141 | #exit; | ||||||||||||||||||||||||||||
| 142 | 17 | my ($mut_number, $proof, $location, $upflank, $change, $dnflank) = | |||||||||||||||||||||||||||
| 143 | $dna =~ m|\W+([\d\.]+).+/proof: (\w+).+/location: ([^ \n]+).+/upflank: ([ \n\w]+).+/change: ([^ /]+).+/dnflank: ([ \n\w]+)|s; | ||||||||||||||||||||||||||||
| 144 | 17 | $change =~ s/[ \n]//g; | |||||||||||||||||||||||||||
| 145 | 17 | my ($ori, $mut) = split /[>\|]/, $change; | |||||||||||||||||||||||||||
| 146 | 17 | my ($variation_number, $change_number) = split /\./, $mut_number; | |||||||||||||||||||||||||||
| 147 | #$self->warn("|$mut_number|>|$variation_number|$change_number|"); | ||||||||||||||||||||||||||||
| 148 | 17 | my $dnamut; | |||||||||||||||||||||||||||
| 149 | 17 | ▶ | if ($change_number and $change_number > 1 ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$change_number and $change_number > 1
MC/DC100%2/2
$change_number and $change_number > 1
$change_number
$change_number > 1
Truth table100%3/3
A and B
A= $change_numberB= $change_number > 1
| |||||||||||||||||||||||||||||
| 150 | 1 | my $a3 = Bio::Variation::Allele->new; | |||||||||||||||||||||||||||
| 151 | 1 | ▶ | $a3->seq($mut) if $mut; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 152 | #$dnamut->add_Allele($a3); | ||||||||||||||||||||||||||||
| 153 | 1 | $prevdnaobj->add_Allele($a3); | |||||||||||||||||||||||||||
| 154 | } else { | ||||||||||||||||||||||||||||
| 155 | 16 | $upflank =~ s/[ \n]//g; | |||||||||||||||||||||||||||
| 156 | 16 | $dnflank =~ s/[ \n]//g; | |||||||||||||||||||||||||||
| 157 | 16 | my ($region, $junk, $region_value, $junk2, $region_dist) = | |||||||||||||||||||||||||||
| 158 | $dna =~ m|.+/region: ([\w\']+)(; )?(\w+)?( ?\(\+?)?(-?\d+)?|s; | ||||||||||||||||||||||||||||
| 159 | #my $s = join ("|", $mut_number, $proof, $location, $upflank, | ||||||||||||||||||||||||||||
| 160 | # $change, $dnflank, $region, $region_value, $region_dist, $1,$2,$3,$4,$5); | ||||||||||||||||||||||||||||
| 161 | #$self->warn($s); | ||||||||||||||||||||||||||||
| 162 | #exit; | ||||||||||||||||||||||||||||
| 163 | 16 | my ($start, $sep, $end) = $location =~ /(-?\d+)(.)?\D?(-?\d+)?/; | |||||||||||||||||||||||||||
| 164 | 16 | ▶ | $end = $start if not defined $end ; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 165 | 16 | my ($len) = $end - $start +1; | |||||||||||||||||||||||||||
| 166 | 16 | ▶ | $len = 0, $start = $end if defined $sep and $sep eq '^'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $sep and $sep eq "^"
MC/DC100%2/2
defined $sep and $sep eq "^"
defined $sep
$sep eq "^"
Truth table100%3/3
A and B
A= defined $sepB= $sep eq "^"
| |||||||||||||||||||||||||||||
| 167 | 16 | my $ismut = 0; | |||||||||||||||||||||||||||
| 168 | 16 | ▶ | $ismut = 1 if $change =~ m/>/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||
| 170 | 16 | $dnamut = Bio::Variation::DNAMutation->new | |||||||||||||||||||||||||||
| 171 | ('-start' => $start, | ||||||||||||||||||||||||||||
| 172 | '-end' => $end, | ||||||||||||||||||||||||||||
| 173 | '-length' => $len, | ||||||||||||||||||||||||||||
| 174 | '-upStreamSeq' => $upflank, | ||||||||||||||||||||||||||||
| 175 | '-dnStreamSeq' => $dnflank, | ||||||||||||||||||||||||||||
| 176 | '-proof' => $proof, | ||||||||||||||||||||||||||||
| 177 | '-mut_number' => $mut_number | ||||||||||||||||||||||||||||
| 178 | ); | ||||||||||||||||||||||||||||
| 179 | 16 | $prevdnaobj = $dnamut; | |||||||||||||||||||||||||||
| 180 | 16 | my $a1 = Bio::Variation::Allele->new; | |||||||||||||||||||||||||||
| 181 | 16 | ▶ | $a1->seq($ori) if $ori; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 182 | 16 | $dnamut->allele_ori($a1); | |||||||||||||||||||||||||||
| 183 | 16 | my $a2 = Bio::Variation::Allele->new; | |||||||||||||||||||||||||||
| 184 | 16 | ▶ | $a2->seq($mut) if $mut; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 185 | 16 | $dnamut->add_Allele($a2); | |||||||||||||||||||||||||||
| 186 | 16 | ▶ | if ($ismut) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 187 | 14 | $dnamut->isMutation(1); | |||||||||||||||||||||||||||
| 188 | 14 | $dnamut->allele_mut($a2); | |||||||||||||||||||||||||||
| 189 | } | ||||||||||||||||||||||||||||
| 190 | 16 | ▶ | $dnamut->region($region) if defined $region; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 191 | 16 | ▶ | $dnamut->region_value($region_value) if defined $region_value; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 192 | 16 | ▶ | $dnamut->region_dist($region_dist) if defined $region_dist; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||
| 194 | 16 | $h->add_Variant($dnamut); | |||||||||||||||||||||||||||
| 195 | 16 | $dnamut->SeqDiff($h); | |||||||||||||||||||||||||||
| 196 | } | ||||||||||||||||||||||||||||
| 197 | } | ||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||
| 199 | # | ||||||||||||||||||||||||||||
| 200 | # RNA | ||||||||||||||||||||||||||||
| 201 | # | ||||||||||||||||||||||||||||
| 202 | 15 | my @rna = split ( / RNA;/, $entry ); | |||||||||||||||||||||||||||
| 203 | 15 | shift @rna; | |||||||||||||||||||||||||||
| 204 | 15 | my $prevrnaobj; | |||||||||||||||||||||||||||
| 205 | 15 | foreach my $rna (@rna) { | |||||||||||||||||||||||||||
| 206 | 17 | $rna = substr ($rna, 0, index($rna, 'Feature AA')); | |||||||||||||||||||||||||||
| 207 | 17 | $rna =~ s/Feature[ \t]+//g; | |||||||||||||||||||||||||||
| 208 | 17 | ($rna) = split "DNA; ", $rna; | |||||||||||||||||||||||||||
| 209 | #$self->warn("|$rna|") ; | ||||||||||||||||||||||||||||
| 210 | 17 | my ($mut_number, $proof, $location, $upflank, $change, $dnflank) = | |||||||||||||||||||||||||||
| 211 | $rna =~ m|\W+([\d\.]+).+/proof: (\w+).+/location: ([^ \n]+).+/upflank: (\w+).+/change: ([^/]+).+/dnflank: (\w+)|s ;#' | ||||||||||||||||||||||||||||
| 212 | 17 | my ($region, $junk, $region_value, $junk2, $region_dist) = | |||||||||||||||||||||||||||
| 213 | $rna =~ m|.+/region: ([\w\']+)(; )?(\w+)?( ?\(\+?)?(-?\d+)?|s; | ||||||||||||||||||||||||||||
| 214 | #my $s = join ("|", $mut_number, $proof, $location, $upflank, | ||||||||||||||||||||||||||||
| 215 | # $change, $dnflank, $region, $region_value, $region_dist, $1,$2,$3,$4,$5); | ||||||||||||||||||||||||||||
| 216 | #$self->warn($s); | ||||||||||||||||||||||||||||
| 217 | #exit; | ||||||||||||||||||||||||||||
| 218 | 17 | $change =~ s/[ \n]//g; | |||||||||||||||||||||||||||
| 219 | 17 | my ($ori, $mut) = split /[>\|]/, $change; | |||||||||||||||||||||||||||
| 220 | 17 | my $rnamut; | |||||||||||||||||||||||||||
| 221 | 17 | my ($variation_number, $change_number) = split /\./, $mut_number; | |||||||||||||||||||||||||||
| 222 | 17 | ▶ | if ($change_number and $change_number > 1 ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$change_number and $change_number > 1
MC/DC100%2/2
$change_number and $change_number > 1
$change_number
$change_number > 1
Truth table100%3/3
A and B
A= $change_numberB= $change_number > 1
| |||||||||||||||||||||||||||||
| 223 | 1 | my $a3 = Bio::Variation::Allele->new; | |||||||||||||||||||||||||||
| 224 | 1 | ▶ | $a3->seq($mut) if $mut; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 225 | #$rnamut->add_Allele($a3); | ||||||||||||||||||||||||||||
| 226 | 1 | $prevrnaobj->add_Allele($a3); | |||||||||||||||||||||||||||
| 227 | } else { | ||||||||||||||||||||||||||||
| 228 | 16 | my ($start, $sep, $end) = $location =~ /(-?\d+)(.)?\D?(-?\d+)?/; | |||||||||||||||||||||||||||
| 229 | 16 | ▶ | $end = $start if not defined $end ; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 230 | 16 | my ($len) = $end - $start + 1; | |||||||||||||||||||||||||||
| 231 | 16 | ▶ | $len = 0, $start = $end if defined $sep and $sep eq '^'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $sep and $sep eq "^"
MC/DC100%2/2
defined $sep and $sep eq "^"
defined $sep
$sep eq "^"
Truth table100%3/3
A and B
A= defined $sepB= $sep eq "^"
| |||||||||||||||||||||||||||||
| 232 | 16 | my $ismut; | |||||||||||||||||||||||||||
| 233 | 16 | ▶ | $ismut = 1 if $change =~ m/>/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 234 | 16 | my ($codon_table) = $rna =~ m|.+/codon_table: (\d+)|s; | |||||||||||||||||||||||||||
| 235 | 16 | my ($codon_pos) = $rna =~ m|.+/codon:[^;]+; ([123])|s; | |||||||||||||||||||||||||||
| 236 | |||||||||||||||||||||||||||||
| 237 | 16 | $rnamut = Bio::Variation::RNAChange->new | |||||||||||||||||||||||||||
| 238 | ('-start' => $start, | ||||||||||||||||||||||||||||
| 239 | '-end' => $end, | ||||||||||||||||||||||||||||
| 240 | '-length' => $len, | ||||||||||||||||||||||||||||
| 241 | '-upStreamSeq' => $upflank, | ||||||||||||||||||||||||||||
| 242 | '-dnStreamSeq' => $dnflank, | ||||||||||||||||||||||||||||
| 243 | '-proof' => $proof, | ||||||||||||||||||||||||||||
| 244 | '-mut_number' => $mut_number | ||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||
| 246 | ); | ||||||||||||||||||||||||||||
| 247 | 16 | $prevrnaobj = $rnamut; | |||||||||||||||||||||||||||
| 248 | 16 | my $a1 = Bio::Variation::Allele->new; | |||||||||||||||||||||||||||
| 249 | 16 | ▶ | $a1->seq($ori) if $ori; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 250 | 16 | $rnamut->allele_ori($a1); | |||||||||||||||||||||||||||
| 251 | 16 | my $a2 = Bio::Variation::Allele->new; | |||||||||||||||||||||||||||
| 252 | 16 | ▶ | $a2->seq($mut) if $mut; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 253 | 16 | $rnamut->add_Allele($a2); | |||||||||||||||||||||||||||
| 254 | 16 | ▶ | if ($ismut) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 255 | 14 | $rnamut->isMutation(1); | |||||||||||||||||||||||||||
| 256 | 14 | $rnamut->allele_mut($a2); | |||||||||||||||||||||||||||
| 257 | } | ||||||||||||||||||||||||||||
| 258 | 16 | ▶ | $rnamut->region($region) if defined $region; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 259 | 16 | ▶ | $rnamut->region_value($region_value) if defined $region_value; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 260 | 16 | ▶ | $rnamut->region_dist($region_dist) if defined $region_dist; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||
| 262 | 16 | ▶ | $rnamut->codon_table($codon_table) if $codon_table; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 263 | 16 | ▶ | $rnamut->codon_pos($codon_pos) if $codon_pos; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 264 | 16 | $h->add_Variant($rnamut); | |||||||||||||||||||||||||||
| 265 | 16 | foreach my $mut ($h->each_Variant) { | |||||||||||||||||||||||||||
| 266 | 35 | ▶ | if ($mut->isa('Bio::Variation::DNAMutation') ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 267 | 18 | ▶ | if ($mut->mut_number == $rnamut->mut_number) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 268 | 16 | $rnamut->DNAMutation($mut); | |||||||||||||||||||||||||||
| 269 | 16 | $mut->RNAChange($rnamut); | |||||||||||||||||||||||||||
| 270 | } | ||||||||||||||||||||||||||||
| 271 | } | ||||||||||||||||||||||||||||
| 272 | } | ||||||||||||||||||||||||||||
| 273 | } | ||||||||||||||||||||||||||||
| 274 | } | ||||||||||||||||||||||||||||
| 275 | # | ||||||||||||||||||||||||||||
| 276 | # AA | ||||||||||||||||||||||||||||
| 277 | # | ||||||||||||||||||||||||||||
| 278 | 15 | my @aa = split ( / AA;/, $entry ); | |||||||||||||||||||||||||||
| 279 | 15 | shift @aa; | |||||||||||||||||||||||||||
| 280 | 15 | my $prevaaobj; | |||||||||||||||||||||||||||
| 281 | 15 | foreach my $aa (@aa) { | |||||||||||||||||||||||||||
| 282 | 13 | $aa = substr ($aa, 0, index($aa, 'Feature AA')); | |||||||||||||||||||||||||||
| 283 | 13 | $aa =~ s/Feature[ \t]+//g; | |||||||||||||||||||||||||||
| 284 | 13 | ($aa) = split "DNA; ", $aa; | |||||||||||||||||||||||||||
| 285 | #$self->warn("|$aa|") ; | ||||||||||||||||||||||||||||
| 286 | 13 | my ($mut_number, $proof, $location, $change) = | |||||||||||||||||||||||||||
| 287 | $aa =~ m|\W+([\d\.]+).+/proof: (\w+).+/location: ([^ \n]+)./change: ([^/;]+)|s; | ||||||||||||||||||||||||||||
| 288 | 13 | $change =~ s/[ \n]//g; | |||||||||||||||||||||||||||
| 289 | #my $s = join ("|", $mut_number, $proof, $location, $change); | ||||||||||||||||||||||||||||
| 290 | #$self->warn($s); | ||||||||||||||||||||||||||||
| 291 | #exit; | ||||||||||||||||||||||||||||
| 292 | 13 | $change =~ s/[ \n]//g; | |||||||||||||||||||||||||||
| 293 | 13 | $change =~ s/DNA$//; | |||||||||||||||||||||||||||
| 294 | 13 | my ($ori, $mut) = split /[>\|]/, $change; | |||||||||||||||||||||||||||
| 295 | #print "------$location----$ori-$mut-------------\n"; | ||||||||||||||||||||||||||||
| 296 | 13 | my ($variation_number, $change_number) = split /\./, $mut_number; | |||||||||||||||||||||||||||
| 297 | 13 | my $aamut; | |||||||||||||||||||||||||||
| 298 | 13 | ▶ | if ($change_number and $change_number > 1 ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$change_number and $change_number > 1
MC/DC100%2/2
$change_number and $change_number > 1
$change_number
$change_number > 1
Truth table100%3/3
A and B
A= $change_numberB= $change_number > 1
| |||||||||||||||||||||||||||||
| 299 | 1 | my $a3 = Bio::Variation::Allele->new; | |||||||||||||||||||||||||||
| 300 | 1 | ▶ | $a3->seq($mut) if $mut; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 301 | 1 | $prevaaobj->add_Allele($a3); | |||||||||||||||||||||||||||
| 302 | } else { | ||||||||||||||||||||||||||||
| 303 | 12 | my ($start, $sep, $end) = $location =~ /(-?\d+)(.)?\D?(-?\d+)?/; | |||||||||||||||||||||||||||
| 304 | 12 | ▶ | $end = $start if not defined $end ; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 305 | 12 | my ($len) = $end - $start + 1; | |||||||||||||||||||||||||||
| 306 | 12 | ▶ | $len = 0, $start = $end if defined $sep and $sep eq '^'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $sep and $sep eq "^"
MC/DC0%0/2
defined $sep and $sep eq "^"
defined $sep
$sep eq "^"
Truth table66%2/3
A and B
A= defined $sepB= $sep eq "^"
| |||||||||||||||||||||||||||||
| 307 | 12 | my $ismut; | |||||||||||||||||||||||||||
| 308 | 12 | ▶ | $ismut = 1 if $change =~ m/>/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 309 | 12 | my ($region) = $aa =~ m|.+/region: (\w+)|s ; | |||||||||||||||||||||||||||
| 310 | 12 | $aamut = Bio::Variation::AAChange->new | |||||||||||||||||||||||||||
| 311 | ('-start' => $start, | ||||||||||||||||||||||||||||
| 312 | '-end' => $end, | ||||||||||||||||||||||||||||
| 313 | '-length' => $len, | ||||||||||||||||||||||||||||
| 314 | '-proof' => $proof, | ||||||||||||||||||||||||||||
| 315 | '-mut_number' => $mut_number | ||||||||||||||||||||||||||||
| 316 | ); | ||||||||||||||||||||||||||||
| 317 | 12 | $prevaaobj = $aamut; | |||||||||||||||||||||||||||
| 318 | 12 | my $a1 = Bio::Variation::Allele->new; | |||||||||||||||||||||||||||
| 319 | 12 | ▶ | $a1->seq($ori) if $ori; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 320 | 12 | $aamut->allele_ori($a1); | |||||||||||||||||||||||||||
| 321 | 12 | my $a2 = Bio::Variation::Allele->new; | |||||||||||||||||||||||||||
| 322 | 12 | ▶ | $a2->seq($mut) if $mut; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 323 | 12 | $aamut->add_Allele($a2); | |||||||||||||||||||||||||||
| 324 | 12 | ▶ | if ($ismut) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 325 | 10 | $aamut->isMutation(1); | |||||||||||||||||||||||||||
| 326 | 10 | $aamut->allele_mut($a2); | |||||||||||||||||||||||||||
| 327 | } | ||||||||||||||||||||||||||||
| 328 | 12 | ▶ | $region && $aamut->region($region); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 329 | 12 | $h->add_Variant($aamut); | |||||||||||||||||||||||||||
| 330 | 12 | foreach my $mut ($h->each_Variant) { | |||||||||||||||||||||||||||
| 331 | 41 | ▶ | if ($mut->isa('Bio::Variation::RNAChange') ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 332 | 14 | ▶ | if ($mut->mut_number == $aamut->mut_number) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 333 | 12 | $aamut->RNAChange($mut); | |||||||||||||||||||||||||||
| 334 | 12 | $mut->AAChange($aamut); | |||||||||||||||||||||||||||
| 335 | } | ||||||||||||||||||||||||||||
| 336 | } | ||||||||||||||||||||||||||||
| 337 | } | ||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||
| 339 | } | ||||||||||||||||||||||||||||
| 340 | } | ||||||||||||||||||||||||||||
| 341 | 15 | return $h; | |||||||||||||||||||||||||||
| 342 | } | ||||||||||||||||||||||||||||
| 343 | |||||||||||||||||||||||||||||
| 344 | =head2 write | ||||||||||||||||||||||||||||
| 345 | |||||||||||||||||||||||||||||
| 346 | Title : write | ||||||||||||||||||||||||||||
| 347 | Usage : $stream->write(@seqDiffs) | ||||||||||||||||||||||||||||
| 348 | Function: writes the $seqDiff object into the stream | ||||||||||||||||||||||||||||
| 349 | Returns : 1 for success and 0 for error | ||||||||||||||||||||||||||||
| 350 | Args : Bio::Variation::SeqDiff object | ||||||||||||||||||||||||||||
| 351 | |||||||||||||||||||||||||||||
| 352 | |||||||||||||||||||||||||||||
| 353 | =cut | ||||||||||||||||||||||||||||
| 354 | |||||||||||||||||||||||||||||
| 355 | 15 | ▶ | sub write { | ||||||||||||||||||||||||||
|
Subroutine
write: called CC=78 SCAR=46.3
Pod
documented
| |||||||||||||||||||||||||||||
| 356 | 15 | my ($self,@h) = @_; | |||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||
| 358 | #$columns = 75; #default for Text::Wrap | ||||||||||||||||||||||||||||
| 359 | 15 | my %tag = | |||||||||||||||||||||||||||
| 360 | ( | ||||||||||||||||||||||||||||
| 361 | 'ID' => 'ID ', | ||||||||||||||||||||||||||||
| 362 | 'Description' => 'Description ', | ||||||||||||||||||||||||||||
| 363 | 'FeatureKey' => 'Feature ', | ||||||||||||||||||||||||||||
| 364 | 'FeatureQual' => "Feature ", | ||||||||||||||||||||||||||||
| 365 | 'FeatureWrap' => "Feature ", | ||||||||||||||||||||||||||||
| 366 | 'ErrorComment' => 'Comment ' | ||||||||||||||||||||||||||||
| 367 | #'Comment' => 'Comment -!-', | ||||||||||||||||||||||||||||
| 368 | #'CommentLine' => 'Comment ', | ||||||||||||||||||||||||||||
| 369 | ); | ||||||||||||||||||||||||||||
| 370 | |||||||||||||||||||||||||||||
| 371 | 15 | ▶ | if( !defined $h[0] ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 372 | 0 | $self->throw("Attempting to write with no information!"); | |||||||||||||||||||||||||||
| 373 | } | ||||||||||||||||||||||||||||
| 374 | |||||||||||||||||||||||||||||
| 375 | 15 | foreach my $h (@h) { | |||||||||||||||||||||||||||
| 376 | |||||||||||||||||||||||||||||
| 377 | 15 | my @entry =(); | |||||||||||||||||||||||||||
| 378 | |||||||||||||||||||||||||||||
| 379 | 15 | my ($text, $tmp, $tmp2, $sep); | |||||||||||||||||||||||||||
| 380 | 15 | my ($count) = 0; | |||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||
| 383 | 15 | $text = $tag{ID}; | |||||||||||||||||||||||||||
| 384 | |||||||||||||||||||||||||||||
| 385 | 15 | $text .= $h->id; | |||||||||||||||||||||||||||
| 386 | 15 | $text .= ":(". $h->offset; | |||||||||||||||||||||||||||
| 387 | 15 | ▶ | $text .= "+1" if $h->sysname =~ /-/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 388 | 15 | $text .= ")". $h->sysname; | |||||||||||||||||||||||||||
| 389 | 15 | ▶ | $text .= "; ". $h->trivname if $h->trivname; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 390 | 15 | push (@entry, $text); | |||||||||||||||||||||||||||
| 391 | |||||||||||||||||||||||||||||
| 392 | #Variants need to be ordered accoding to mutation_number attribute | ||||||||||||||||||||||||||||
| 393 | #put them into a hash of arrays holding the Variant objects | ||||||||||||||||||||||||||||
| 394 | #This is necessary for cases like several distict mutations present | ||||||||||||||||||||||||||||
| 395 | # in the same sequence. | ||||||||||||||||||||||||||||
| 396 | 15 | my @allvariants = $h->each_Variant; | |||||||||||||||||||||||||||
| 397 | 15 | my %variants = (); | |||||||||||||||||||||||||||
| 398 | 15 | foreach my $mut ($h->each_Variant) { | |||||||||||||||||||||||||||
| 399 | 44 | push @{$variants{$mut->mut_number} }, $mut; | |||||||||||||||||||||||||||
| 400 | } | ||||||||||||||||||||||||||||
| 401 | #my ($variation_number, $change_number) = split /\./, $mut_number; | ||||||||||||||||||||||||||||
| 402 | 15 | foreach my $var (sort keys %variants) { | |||||||||||||||||||||||||||
| 403 | #print $var, ": ", join (" ", @{$variants{$var}}), "\n"; | ||||||||||||||||||||||||||||
| 404 | |||||||||||||||||||||||||||||
| 405 | 16 | foreach my $mut (@{$variants{$var}}) { | |||||||||||||||||||||||||||
| 406 | # | ||||||||||||||||||||||||||||
| 407 | # DNA | ||||||||||||||||||||||||||||
| 408 | # | ||||||||||||||||||||||||||||
| 409 | 44 | ▶ | if ( $mut->isa('Bio::Variation::DNAMutation') ) { | ||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||
| 410 | #collect all non-reference alleles | ||||||||||||||||||||||||||||
| 411 | 16 | ▶ | $self->throw("allele_ori needs to be defined in [$mut]") | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 412 | if not $mut->allele_ori; | ||||||||||||||||||||||||||||
| 413 | 16 | ▶ | if ($mut->isMutation) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 414 | 14 | $sep = '>'; | |||||||||||||||||||||||||||
| 415 | } else { | ||||||||||||||||||||||||||||
| 416 | 2 | $sep = '|'; | |||||||||||||||||||||||||||
| 417 | } | ||||||||||||||||||||||||||||
| 418 | 16 | my @alleles = $mut->each_Allele; | |||||||||||||||||||||||||||
| 419 | #push @alleles, $mut->allele_mut if $mut->allele_mut; | ||||||||||||||||||||||||||||
| 420 | 16 | my $count = 0; # two alleles | |||||||||||||||||||||||||||
| 421 | 16 | foreach my $allele (@alleles) { | |||||||||||||||||||||||||||
| 422 | 17 | $count++; | |||||||||||||||||||||||||||
| 423 | 17 | my ($variation_number, $change_number) = split /\./, $mut->mut_number; | |||||||||||||||||||||||||||
| 424 | 17 | ▶ | if ($change_number and $change_number != $count){ | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$change_number and $change_number != $count
MC/DC100%2/2
$change_number and $change_number != $count
$change_number
$change_number != $count
Truth table100%3/3
A and B
A= $change_numberB= $change_number != $count
| |||||||||||||||||||||||||||||
| 425 | 1 | $mut->mut_number("$change_number.$count"); | |||||||||||||||||||||||||||
| 426 | } | ||||||||||||||||||||||||||||
| 427 | 17 | $mut->allele_mut($allele); | |||||||||||||||||||||||||||
| 428 | push (@entry, | ||||||||||||||||||||||||||||
| 429 | 17 | $tag{FeatureKey}. 'DNA'. "; ". $mut->mut_number | |||||||||||||||||||||||||||
| 430 | ); | ||||||||||||||||||||||||||||
| 431 | #label | ||||||||||||||||||||||||||||
| 432 | 17 | $text=$tag{FeatureQual}. '/label: '. $mut->label; | |||||||||||||||||||||||||||
| 433 | 17 | push (@entry, $text); | |||||||||||||||||||||||||||
| 434 | |||||||||||||||||||||||||||||
| 435 | #proof | ||||||||||||||||||||||||||||
| 436 | 17 | ▶ | if ($mut->proof) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 437 | 17 | $text = $tag{FeatureQual}. '/proof: '. $mut->proof; | |||||||||||||||||||||||||||
| 438 | 17 | push (@entry, $text) ; | |||||||||||||||||||||||||||
| 439 | } | ||||||||||||||||||||||||||||
| 440 | #location | ||||||||||||||||||||||||||||
| 441 | 17 | $text = $tag{FeatureQual}. '/location: '; | |||||||||||||||||||||||||||
| 442 | #$mut->id. '; '. $mut->start; | ||||||||||||||||||||||||||||
| 443 | 17 | ▶ | if ($mut->length > 1 ) {# if ($mut->end - $mut->start ) { | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 444 | 2 | my $l = $mut->start + $mut->length -1; | |||||||||||||||||||||||||||
| 445 | 2 | $text .= $mut->start. '..'. $l; | |||||||||||||||||||||||||||
| 446 | } | ||||||||||||||||||||||||||||
| 447 | elsif ($mut->length == 0) { | ||||||||||||||||||||||||||||
| 448 | 2 | my $tmp_start = $mut->start - 1; | |||||||||||||||||||||||||||
| 449 | 2 | ▶ | $tmp_start-- if $tmp_start == 0; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 450 | 2 | $text .= $tmp_start. '^'. $mut->end; | |||||||||||||||||||||||||||
| 451 | } else { | ||||||||||||||||||||||||||||
| 452 | 13 | $text .= $mut->start; | |||||||||||||||||||||||||||
| 453 | } | ||||||||||||||||||||||||||||
| 454 | |||||||||||||||||||||||||||||
| 455 | 17 | ▶ | if ($h->alphabet && $h->alphabet eq 'dna') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$h->alphabet and $h->alphabet eq "dna"
MC/DC50%1/2
$h->alphabet and $h->alphabet eq "dna"
$h->alphabet
$h->alphabet eq "dna"
Truth table66%2/3
A and B
A= $h->alphabetB= $h->alphabet eq "dna"
| |||||||||||||||||||||||||||||
| 456 | 4 | $tmp = $mut->start + $h->offset; | |||||||||||||||||||||||||||
| 457 | 4 | ▶ | $tmp-- if $tmp <= 0; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 458 | 4 | ▶ | $mut->start < 1 && $tmp++; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 459 | #$text.= ' ('. $h->id. '::'. $tmp; | ||||||||||||||||||||||||||||
| 460 | 4 | $tmp2 = $mut->end + $h->offset; | |||||||||||||||||||||||||||
| 461 | 4 | ▶ | if ( $mut->length > 1 ) { | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 462 | 0 | ▶ | $mut->end < 1 && $tmp2++; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 463 | 0 | $text.= ' ('. $h->id. '::'. $tmp. "..". $tmp2; | |||||||||||||||||||||||||||
| 464 | } | ||||||||||||||||||||||||||||
| 465 | elsif ($mut->length == 0) { | ||||||||||||||||||||||||||||
| 466 | 0 | $tmp--; | |||||||||||||||||||||||||||
| 467 | 0 | ▶ | $tmp-- if $tmp == 0; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 468 | 0 | $text .= ' ('. $h->id. '::'. $tmp. '^'. $tmp2; | |||||||||||||||||||||||||||
| 469 | } else { | ||||||||||||||||||||||||||||
| 470 | 4 | $text.= ' ('. $h->id. '::'. $tmp; | |||||||||||||||||||||||||||
| 471 | } | ||||||||||||||||||||||||||||
| 472 | 4 | $text .= ')'; | |||||||||||||||||||||||||||
| 473 | } | ||||||||||||||||||||||||||||
| 474 | 17 | push (@entry, $text); | |||||||||||||||||||||||||||
| 475 | #sequence | ||||||||||||||||||||||||||||
| 476 | push (@entry, | ||||||||||||||||||||||||||||
| 477 | 17 | $tag{FeatureQual}. '/upflank: '. $mut->upStreamSeq | |||||||||||||||||||||||||||
| 478 | ); | ||||||||||||||||||||||||||||
| 479 | 17 | $text = ''; | |||||||||||||||||||||||||||
| 480 | 17 | ▶ | $text = $mut->allele_ori->seq if $mut->allele_ori->seq; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 481 | 17 | $text .= $sep; | |||||||||||||||||||||||||||
| 482 | 17 | ▶ | $text .= $mut->allele_mut->seq if $mut->allele_mut->seq; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 483 | push (@entry, | ||||||||||||||||||||||||||||
| 484 | wrap($tag{FeatureQual}. '/change: ', $tag{FeatureWrap}, | ||||||||||||||||||||||||||||
| 485 | 17 | $text) | |||||||||||||||||||||||||||
| 486 | ); | ||||||||||||||||||||||||||||
| 487 | |||||||||||||||||||||||||||||
| 488 | push (@entry, | ||||||||||||||||||||||||||||
| 489 | 17 | $tag{FeatureQual}. '/dnflank: '. $mut->dnStreamSeq | |||||||||||||||||||||||||||
| 490 | ); | ||||||||||||||||||||||||||||
| 491 | #restriction enzyme | ||||||||||||||||||||||||||||
| 492 | 17 | ▶ | if ($mut->restriction_changes ne '') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 493 | 16 | $text = $mut->restriction_changes; | |||||||||||||||||||||||||||
| 494 | 16 | $text = wrap($tag{FeatureQual}. '/re_site: ', $tag{FeatureWrap}, $text); | |||||||||||||||||||||||||||
| 495 | 16 | push (@entry, | |||||||||||||||||||||||||||
| 496 | $text | ||||||||||||||||||||||||||||
| 497 | ); | ||||||||||||||||||||||||||||
| 498 | } | ||||||||||||||||||||||||||||
| 499 | #region | ||||||||||||||||||||||||||||
| 500 | 17 | ▶ | if ($mut->region ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 501 | 4 | $text = $tag{FeatureQual}. '/region: '. $mut->region; | |||||||||||||||||||||||||||
| 502 | 4 | ▶ | $text .= ';' if $mut->region_value or $mut->region_dist; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$mut->region_value or $mut->region_dist
MC/DC0%0/2
$mut->region_value or $mut->region_dist
$mut->region_value
$mut->region_dist
Truth table66%2/3
A or B
A= $mut->region_valueB= $mut->region_dist
| |||||||||||||||||||||||||||||
| 503 | 4 | ▶ | $text .= ' '. $mut->region_value if $mut->region_value; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 504 | 4 | ▶ | if ($mut->region_dist ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 505 | 4 | $tmp = ''; | |||||||||||||||||||||||||||
| 506 | 4 | ▶ | $tmp = '+' if $mut->region_dist > 1; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 507 | 4 | $text .= " (". $tmp. $mut->region_dist. ')'; | |||||||||||||||||||||||||||
| 508 | } | ||||||||||||||||||||||||||||
| 509 | 4 | push (@entry, $text); | |||||||||||||||||||||||||||
| 510 | } | ||||||||||||||||||||||||||||
| 511 | #CpG | ||||||||||||||||||||||||||||
| 512 | 17 | ▶ | if ($mut->CpG) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 513 | push (@entry, | ||||||||||||||||||||||||||||
| 514 | 0 | $tag{FeatureQual}. "/CpG" | |||||||||||||||||||||||||||
| 515 | ); | ||||||||||||||||||||||||||||
| 516 | } | ||||||||||||||||||||||||||||
| 517 | } | ||||||||||||||||||||||||||||
| 518 | } | ||||||||||||||||||||||||||||
| 519 | # | ||||||||||||||||||||||||||||
| 520 | # RNA | ||||||||||||||||||||||||||||
| 521 | # | ||||||||||||||||||||||||||||
| 522 | elsif ($mut->isa('Bio::Variation::RNAChange') ) { | ||||||||||||||||||||||||||||
| 523 | #collect all non-reference alleles | ||||||||||||||||||||||||||||
| 524 | 16 | ▶ | $self->throw("allele_ori needs to be defined in [$mut]") | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 525 | if not $mut->allele_ori; | ||||||||||||||||||||||||||||
| 526 | 16 | my @alleles = $mut->each_Allele; | |||||||||||||||||||||||||||
| 527 | #push @alleles, $mut->allele_mut if $mut->allele_mut; | ||||||||||||||||||||||||||||
| 528 | 16 | ▶ | if ($mut->isMutation) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 529 | 14 | $sep = '>'; | |||||||||||||||||||||||||||
| 530 | } else { | ||||||||||||||||||||||||||||
| 531 | 2 | $sep = '|'; | |||||||||||||||||||||||||||
| 532 | } | ||||||||||||||||||||||||||||
| 533 | |||||||||||||||||||||||||||||
| 534 | 16 | my $count = 0; # two alleles | |||||||||||||||||||||||||||
| 535 | 16 | foreach my $allele (@alleles) { | |||||||||||||||||||||||||||
| 536 | 17 | $count++; | |||||||||||||||||||||||||||
| 537 | 17 | my ($variation_number, $change_number) = split /\./, $mut->mut_number; | |||||||||||||||||||||||||||
| 538 | 17 | ▶ | if ($change_number and $change_number != $count){ | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$change_number and $change_number != $count
MC/DC100%2/2
$change_number and $change_number != $count
$change_number
$change_number != $count
Truth table100%3/3
A and B
A= $change_numberB= $change_number != $count
| |||||||||||||||||||||||||||||
| 539 | 1 | $mut->mut_number("$change_number.$count"); | |||||||||||||||||||||||||||
| 540 | } | ||||||||||||||||||||||||||||
| 541 | 17 | $mut->allele_mut($allele); | |||||||||||||||||||||||||||
| 542 | push (@entry, | ||||||||||||||||||||||||||||
| 543 | 17 | $tag{FeatureKey}. 'RNA'. "; ". $mut->mut_number | |||||||||||||||||||||||||||
| 544 | ); | ||||||||||||||||||||||||||||
| 545 | #label | ||||||||||||||||||||||||||||
| 546 | 17 | $text=$tag{FeatureQual}. '/label: '. $mut->label; | |||||||||||||||||||||||||||
| 547 | 17 | push (@entry, $text); | |||||||||||||||||||||||||||
| 548 | #proof | ||||||||||||||||||||||||||||
| 549 | 17 | ▶ | if ($mut->proof) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 550 | 17 | $text = $tag{FeatureQual}. '/proof: '. $mut->proof; | |||||||||||||||||||||||||||
| 551 | 17 | push (@entry, $text) ; | |||||||||||||||||||||||||||
| 552 | } | ||||||||||||||||||||||||||||
| 553 | #location | ||||||||||||||||||||||||||||
| 554 | 17 | $text = $tag{FeatureQual}. '/location: ' ; | |||||||||||||||||||||||||||
| 555 | 17 | ▶ | if ($mut->length > 1 ) { | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 556 | 2 | $text .= $mut->start. '..'. $mut->end; | |||||||||||||||||||||||||||
| 557 | 2 | $tmp2 = $mut->end + $h->offset; | |||||||||||||||||||||||||||
| 558 | } | ||||||||||||||||||||||||||||
| 559 | elsif ($mut->length == 0) { | ||||||||||||||||||||||||||||
| 560 | 2 | my $tmp_start = $mut->start; | |||||||||||||||||||||||||||
| 561 | 2 | $tmp_start--; | |||||||||||||||||||||||||||
| 562 | 2 | ▶ | $tmp_start-- if $tmp_start == 0; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 563 | 2 | $text .= $tmp_start. '^'. $mut->end; | |||||||||||||||||||||||||||
| 564 | } else { | ||||||||||||||||||||||||||||
| 565 | 13 | $text .= $mut->start; | |||||||||||||||||||||||||||
| 566 | } | ||||||||||||||||||||||||||||
| 567 | |||||||||||||||||||||||||||||
| 568 | 17 | ▶ | if ($h->alphabet && $h->alphabet eq 'rna') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$h->alphabet and $h->alphabet eq "rna"
MC/DC50%1/2
$h->alphabet and $h->alphabet eq "rna"
$h->alphabet
$h->alphabet eq "rna"
Truth table66%2/3
A and B
A= $h->alphabetB= $h->alphabet eq "rna"
| |||||||||||||||||||||||||||||
| 569 | 13 | $tmp = $mut->start + $h->offset; | |||||||||||||||||||||||||||
| 570 | 13 | ▶ | $tmp-- if $tmp <= 0; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 571 | #$mut->start < 1 && $tmp++; | ||||||||||||||||||||||||||||
| 572 | #$text.= ' ('. $h->id. '::'. $tmp; | ||||||||||||||||||||||||||||
| 573 | 13 | $tmp2 = $mut->end + $h->offset; | |||||||||||||||||||||||||||
| 574 | #$mut->end < 1 && $tmp2++; | ||||||||||||||||||||||||||||
| 575 | 13 | ▶ | if ( $mut->length > 1 ) { | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 576 | 2 | $text.= ' ('. $h->id. '::'. $tmp. "..". $tmp2; | |||||||||||||||||||||||||||
| 577 | } | ||||||||||||||||||||||||||||
| 578 | elsif ($mut->length == 0) { | ||||||||||||||||||||||||||||
| 579 | 2 | $tmp--; | |||||||||||||||||||||||||||
| 580 | 2 | $text .= ' ('. $h->id. '::'. $tmp. '^'. $tmp2; | |||||||||||||||||||||||||||
| 581 | } else { | ||||||||||||||||||||||||||||
| 582 | 9 | $text.= ' ('. $h->id. '::'. $tmp; | |||||||||||||||||||||||||||
| 583 | } | ||||||||||||||||||||||||||||
| 584 | |||||||||||||||||||||||||||||
| 585 | 13 | $text .= ')'; | |||||||||||||||||||||||||||
| 586 | } | ||||||||||||||||||||||||||||
| 587 | 17 | push (@entry, $text); | |||||||||||||||||||||||||||
| 588 | |||||||||||||||||||||||||||||
| 589 | #sequence | ||||||||||||||||||||||||||||
| 590 | push (@entry, | ||||||||||||||||||||||||||||
| 591 | 17 | $tag{FeatureQual}. '/upflank: '. $mut->upStreamSeq | |||||||||||||||||||||||||||
| 592 | ); | ||||||||||||||||||||||||||||
| 593 | 17 | $text = ''; | |||||||||||||||||||||||||||
| 594 | 17 | ▶ | $text = $mut->allele_ori->seq if $mut->allele_ori->seq; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 595 | 17 | $text .= $sep; | |||||||||||||||||||||||||||
| 596 | 17 | ▶ | $text .= $mut->allele_mut->seq if $mut->allele_mut->seq; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 597 | push (@entry, | ||||||||||||||||||||||||||||
| 598 | wrap($tag{FeatureQual}. '/change: ', $tag{FeatureWrap}, | ||||||||||||||||||||||||||||
| 599 | 17 | $text) | |||||||||||||||||||||||||||
| 600 | ); | ||||||||||||||||||||||||||||
| 601 | push (@entry, | ||||||||||||||||||||||||||||
| 602 | 17 | $tag{FeatureQual}. '/dnflank: '. $mut->dnStreamSeq | |||||||||||||||||||||||||||
| 603 | ); | ||||||||||||||||||||||||||||
| 604 | #restriction | ||||||||||||||||||||||||||||
| 605 | 17 | ▶ | if ($mut->restriction_changes ne '') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 606 | 16 | $text = $mut->restriction_changes; | |||||||||||||||||||||||||||
| 607 | 16 | $text = wrap($tag{FeatureQual}. '/re_site: ', $tag{FeatureWrap}, $text); | |||||||||||||||||||||||||||
| 608 | 16 | push (@entry, | |||||||||||||||||||||||||||
| 609 | $text | ||||||||||||||||||||||||||||
| 610 | ); | ||||||||||||||||||||||||||||
| 611 | } | ||||||||||||||||||||||||||||
| 612 | #coding | ||||||||||||||||||||||||||||
| 613 | 17 | ▶ | if ($mut->region eq 'coding') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 614 | #codon table | ||||||||||||||||||||||||||||
| 615 | 13 | $text = $tag{FeatureQual}. '/codon_table: '; | |||||||||||||||||||||||||||
| 616 | 13 | $text .= $mut->codon_table; | |||||||||||||||||||||||||||
| 617 | 13 | push (@entry, $text); | |||||||||||||||||||||||||||
| 618 | #codon | ||||||||||||||||||||||||||||
| 619 | |||||||||||||||||||||||||||||
| 620 | 13 | $text = $tag{FeatureQual}. '/codon: '. $mut->codon_ori. $sep; | |||||||||||||||||||||||||||
| 621 | 13 | ▶ | if ($mut->DNAMutation->label =~ /.*point/) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 622 | 8 | $text .= $mut->codon_mut; | |||||||||||||||||||||||||||
| 623 | } | ||||||||||||||||||||||||||||
| 624 | else { | ||||||||||||||||||||||||||||
| 625 | 5 | $text .= '-'; | |||||||||||||||||||||||||||
| 626 | } | ||||||||||||||||||||||||||||
| 627 | 13 | $text .= "; ". $mut->codon_pos; | |||||||||||||||||||||||||||
| 628 | 13 | push (@entry, $text); | |||||||||||||||||||||||||||
| 629 | } | ||||||||||||||||||||||||||||
| 630 | #region | ||||||||||||||||||||||||||||
| 631 | 17 | ▶ | if ($mut->region ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 632 | 17 | $text = $tag{FeatureQual}. '/region: '. $mut->region; | |||||||||||||||||||||||||||
| 633 | 17 | ▶ | $text .= ';' if $mut->region_value or $mut->region_dist; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$mut->region_value or $mut->region_dist
MC/DC50%1/2
$mut->region_value or $mut->region_dist
$mut->region_value
$mut->region_dist
Truth table66%2/3
A or B
A= $mut->region_valueB= $mut->region_dist
| |||||||||||||||||||||||||||||
| 634 | 17 | ▶ | $text .= ' '. $mut->region_value if $mut->region_value; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 635 | 17 | ▶ | if ($mut->region_dist ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 636 | 2 | $tmp = ''; | |||||||||||||||||||||||||||
| 637 | 2 | ▶ | $tmp = '+' if $mut->region_dist > 1; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 638 | 2 | $text .= " (". $tmp. $mut->region_dist. ')'; | |||||||||||||||||||||||||||
| 639 | } | ||||||||||||||||||||||||||||
| 640 | 17 | push (@entry, $text); | |||||||||||||||||||||||||||
| 641 | } | ||||||||||||||||||||||||||||
| 642 | } | ||||||||||||||||||||||||||||
| 643 | } | ||||||||||||||||||||||||||||
| 644 | # | ||||||||||||||||||||||||||||
| 645 | # AA | ||||||||||||||||||||||||||||
| 646 | # | ||||||||||||||||||||||||||||
| 647 | elsif ($mut->isa('Bio::Variation::AAChange')) { | ||||||||||||||||||||||||||||
| 648 | #collect all non-reference alleles | ||||||||||||||||||||||||||||
| 649 | 12 | ▶ | $self->throw("allele_ori needs to be defined in [$mut]") | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 650 | if not $mut->allele_ori; | ||||||||||||||||||||||||||||
| 651 | 12 | ▶ | if ($mut->isMutation) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 652 | 10 | $sep = '>'; | |||||||||||||||||||||||||||
| 653 | } else { | ||||||||||||||||||||||||||||
| 654 | 2 | $sep = '|'; | |||||||||||||||||||||||||||
| 655 | } | ||||||||||||||||||||||||||||
| 656 | 12 | my @alleles = $mut->each_Allele; | |||||||||||||||||||||||||||
| 657 | #push @alleles, $mut->allele_mut if $mut->allele_mut; | ||||||||||||||||||||||||||||
| 658 | 12 | my $count = 0; # two alleles | |||||||||||||||||||||||||||
| 659 | 12 | foreach my $allele (@alleles) { | |||||||||||||||||||||||||||
| 660 | 13 | $count++; | |||||||||||||||||||||||||||
| 661 | 13 | my ($variation_number, $change_number) = split /\./, $mut->mut_number; | |||||||||||||||||||||||||||
| 662 | 13 | ▶ | if ($change_number and $change_number != $count){ | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$change_number and $change_number != $count
MC/DC100%2/2
$change_number and $change_number != $count
$change_number
$change_number != $count
Truth table100%3/3
A and B
A= $change_numberB= $change_number != $count
| |||||||||||||||||||||||||||||
| 663 | 1 | $mut->mut_number("$change_number.$count"); | |||||||||||||||||||||||||||
| 664 | } | ||||||||||||||||||||||||||||
| 665 | 13 | $mut->allele_mut($allele); | |||||||||||||||||||||||||||
| 666 | push (@entry, | ||||||||||||||||||||||||||||
| 667 | 13 | $tag{FeatureKey}. 'AA'. "; ". $mut->mut_number | |||||||||||||||||||||||||||
| 668 | ); | ||||||||||||||||||||||||||||
| 669 | #label | ||||||||||||||||||||||||||||
| 670 | 13 | $text=$tag{FeatureQual}. '/label: '. $mut->label; | |||||||||||||||||||||||||||
| 671 | 13 | push (@entry, $text) ; | |||||||||||||||||||||||||||
| 672 | #proof | ||||||||||||||||||||||||||||
| 673 | 13 | ▶ | if ($mut->proof) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 674 | 13 | $text = $tag{FeatureQual}. '/proof: '. $mut->proof; | |||||||||||||||||||||||||||
| 675 | 13 | push (@entry, $text) ; | |||||||||||||||||||||||||||
| 676 | } | ||||||||||||||||||||||||||||
| 677 | #location | ||||||||||||||||||||||||||||
| 678 | 13 | $text = $tag{FeatureQual}. '/location: '. | |||||||||||||||||||||||||||
| 679 | #$mut->id. '; '. $mut->start; | ||||||||||||||||||||||||||||
| 680 | $mut->start; | ||||||||||||||||||||||||||||
| 681 | 13 | ▶ | if ($mut->length > 1 ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 682 | 1 | $tmp = $mut->start + $mut->length -1; | |||||||||||||||||||||||||||
| 683 | 1 | $text .= '..'. $tmp; | |||||||||||||||||||||||||||
| 684 | } | ||||||||||||||||||||||||||||
| 685 | 13 | push (@entry, $text); | |||||||||||||||||||||||||||
| 686 | #sequence | ||||||||||||||||||||||||||||
| 687 | 13 | $text = ''; | |||||||||||||||||||||||||||
| 688 | 13 | ▶ | $text = $mut->allele_ori->seq if $mut->allele_ori->seq; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 689 | 13 | $text .= $sep; | |||||||||||||||||||||||||||
| 690 | 13 | ▶ | $text .= $mut->allele_mut->seq if $mut->allele_mut->seq; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 691 | push (@entry, | ||||||||||||||||||||||||||||
| 692 | wrap($tag{FeatureQual}. '/change: ', $tag{FeatureWrap}, | ||||||||||||||||||||||||||||
| 693 | 13 | $text) | |||||||||||||||||||||||||||
| 694 | ); | ||||||||||||||||||||||||||||
| 695 | #region | ||||||||||||||||||||||||||||
| 696 | 13 | ▶ | if ($mut->region ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 697 | 0 | $text = $tag{FeatureQual}. '/region: '. $mut->region; | |||||||||||||||||||||||||||
| 698 | 0 | ▶ | $text .= ';' if $mut->region_value or $mut->region_dist; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$mut->region_value or $mut->region_dist
MC/DC0%0/2
$mut->region_value or $mut->region_dist
$mut->region_value
$mut->region_dist
Truth table0%0/3
A or B
A= $mut->region_valueB= $mut->region_dist
| |||||||||||||||||||||||||||||
| 699 | 0 | ▶ | $text .= ' '. $mut->region_value if $mut->region_value; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 700 | 0 | ▶ | if ($mut->region_dist ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 701 | 0 | $tmp = ''; | |||||||||||||||||||||||||||
| 702 | 0 | ▶ | $tmp = '+' if $mut->region_dist > 1; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 703 | 0 | $text .= " (". $tmp. $mut->region_dist. ')'; | |||||||||||||||||||||||||||
| 704 | } | ||||||||||||||||||||||||||||
| 705 | 0 | push (@entry, $text); | |||||||||||||||||||||||||||
| 706 | } | ||||||||||||||||||||||||||||
| 707 | } | ||||||||||||||||||||||||||||
| 708 | } | ||||||||||||||||||||||||||||
| 709 | } | ||||||||||||||||||||||||||||
| 710 | } | ||||||||||||||||||||||||||||
| 711 | 15 | push (@entry, | |||||||||||||||||||||||||||
| 712 | "//" | ||||||||||||||||||||||||||||
| 713 | ); | ||||||||||||||||||||||||||||
| 714 | 15 | my $str = join ("\n", @entry). "\n"; | |||||||||||||||||||||||||||
| 715 | 15 | $str =~ s/\t/ /g; | |||||||||||||||||||||||||||
| 716 | 15 | $self->_print($str); | |||||||||||||||||||||||||||
| 717 | } | ||||||||||||||||||||||||||||
| 718 | 15 | return 1; | |||||||||||||||||||||||||||
| 719 | } | ||||||||||||||||||||||||||||
| 720 | |||||||||||||||||||||||||||||
| 721 | 2 | 1; | |||||||||||||||||||||||||||