Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of github.com:bioperl/bioperl-live
  • Loading branch information
DaveMessina committed May 27, 2010
2 parents b8ae20c + 7ef4bd8 commit 3c6d895
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,6 +2,7 @@
.tmp
*#
.#*
.*.swp
*(Autosaved)blib*
Build
Build.bat
Expand Down
3 changes: 0 additions & 3 deletions Bio/Align/Graphics.pm
Expand Up @@ -61,9 +61,6 @@ our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );

our @EXPORT = qw( );

our $VERSION = '0.01';


# Preloaded methods go here.
our %FONT_TABLE = (1 => gdTinyFont, 2 => gdSmallFont, 3 => gdMediumBoldFont, 4 => gdLargeFont, 5 => gdGiantFont );
our %PROTEIN_COLORS = ('Q' => [255, 0, 204], 'E' => [255, 0, 102], 'D' => [255, 0, 0] , 'S' => [255, 51, 0] , 'T' => [255, 102, 0 ],
Expand Down
11 changes: 9 additions & 2 deletions Bio/SeqIO/embl.pm
Expand Up @@ -299,6 +299,7 @@ sub next_seq {
my $line = $1;
my ($date, $version) = split(' ', $line, 2);
$date =~ tr/,//d; # remove comma if new version
if ($version) {
if ($version =~ /\(Rel\. (\d+), Created\)/xms ) {
my $release = Bio::Annotation::SimpleValue->new(
-tagname => 'creation_release',
Expand All @@ -318,6 +319,7 @@ sub next_seq {
);
$annotation->add_Annotation($update);
}
}
push @{$params{'-dates'}}, $date;
}

Expand Down Expand Up @@ -1352,8 +1354,13 @@ sub _read_FTHelper_EMBL {
last QUOTES;
}

# Join to value with space if value or next line contains a space
$value .= (grep /\s/, ($value, $next)) ? " $next" : $next;
# Protein sequence translations need to be joined without spaces,
# other qualifiers need those.
if ($qualifier eq "translation") {
$value .= $next;
} else {
$value .= " $next";
}
}
# Trim leading and trailing quotes
$value =~ s/^"|"$//g;
Expand Down
File renamed without changes.
17 changes: 16 additions & 1 deletion t/SeqIO/embl.t
Expand Up @@ -8,7 +8,7 @@ BEGIN {
use lib '../..';
use Bio::Root::Test;

test_begin(-tests => 83);
test_begin(-tests => 85);

use_ok('Bio::SeqIO::embl');
}
Expand Down Expand Up @@ -202,3 +202,18 @@ for ($i=0; my $seq = $embl->next_seq; $i++) {
}
is $i, 4;


# bug 3086 - parsing long lines correctly

ok( $embl = Bio::SeqIO->new(-file => test_input_file('bug3086.embl'),
-format => 'embl',
-verbose => '$verbose') );
$seq = $embl->next_seq;
foreach my $feature ($seq->top_SeqFeatures) {
if ($feature->has_tag('product')) {
my ($product) = $feature->get_tag_values('product');
is($product,
'bifunctional phosphoribosylaminoimidazolecarboxamide formyltransferase/IMP cyclohydrolase',
'Check if product was parsed correctly');
}
}
95 changes: 95 additions & 0 deletions t/data/bug3086.embl
@@ -0,0 +1,95 @@
ID NC_003888; SV 3; linear; unassigned DNA; STD; UNC; 8667507 BP.
XX
AC NC_003888;
XX
DT 03-MAR-2010
XX
DE Streptomyces coelicolor A3(2), complete genome.
XX
KW complete genome
XX
OS Streptomyces coelicolor A3(2) (2)
OC Bacteria; Actinobacteria; Actinobacteridae; Actinomycetales;
OC Streptomycineae; Streptomycetaceae; Streptomyces.
XX
RN [1]
RP 1-8667507
RX PUBMED; 12000953.
RA Bentley,S.D., Chater,K.F., Cerdeno-Tarraga,A.M., Challis,G.L.,
RA Thomson,N.R., James,K.D., Harris,D.E., Quail,M.A., Kieser,H., Harper,D.,
RA Bateman,A., Brown,S., Chandra,G., Chen,C.W., Collins,M., Cronin,A.,
RA Fraser,A., Goble,A., Hidalgo,J., Hornsby,T., Howarth,S., Huang,C.H.,
RA Kieser,T., Larke,L., Murphy,L., Oliver,K., O'Neil,S., Rabbinowitsch,E.,
RA Rajandream,M.A., Rutherford,K., Rutter,S., Seeger,K., Saunders,D.,
RA Sharp,S., Squares,R., Squares,S., Taylor,K., Warren,T., Wietzorrek,A.,
RA Woodward,J., Barrell,B.G., Parkhill,J. and Hopwood,D.A.;
RT Complete genome sequence of the model actinomycete Streptomyces coelicolor
RT A3(2);
RL Nature 417 (6885), 141-147 (2002)
XX
RN [2]
RP 1-8667507
RX PUBMED; 8843436.
RA Redenbach,M., Kieser,H.M., Denapaite,D., Eichner,A., Cullum,J.,
RA Kinashi,H. and Hopwood,D.A.;
RT A set of ordered cosmids and a detailed genetic and physical map for the 8
RT Mb Streptomyces coelicolor A3(2) chromosome;
RL Mol. Microbiol. 21 (1), 77-96 (1996)
XX
RN [3]
RP 1-8667507
RA ;
RT Direct Submission;
RL Submitted (28-MAY-2002) National Center for Biotechnology Information,
RL NIH, Bethesda, MD 20894, USA
XX
RN [4]
RP 1-8667507
RA Bentley,S.D.;
RT Direct Submission;
RL Submitted (09-MAY-2002) Sanger Institute, Wellcome Trust Genome Campus,
RL Hinxton, Cambridge CB10 1SA, United Kingdom
XX
CC PROVISIONAL REFSEQ: This record has not yet been subject to final NCBI
CC review. The reference sequence was derived from AL645882. On Jun 22, 2003
CC this sequence version replaced gi:31340543. COMPLETENESS: full length.
XX
FH Key Location/Qualifiers
FH
FT gene 5241975..5243546
FT /locus_tag="SCO4814"
FT /db_xref="GeneID:1100255"
FT /gene_synonym="SCD63A.25"
FT /gene="purH"
FT CDS 5241975..5243546
FT /locus_tag="SCO4814"
FT /gene_synonym="SCD63A.25"
FT /protein_id="NP_628971.1"
FT /gene="purH"
FT /transl_table=11
FT /note="involved in de novo purine biosynthesis"
FT /db_xref="GI:21223192"
FT /db_xref="GeneID:1100255"
FT /codon_start=1
FT /translation="MTATAGSNKRAIRRALVSVYDKTGLEDLARGLHEAGVELVSTGST
FT AGRIAAAGVPVTKVEELTGFPECLDGRVKTLHPKVHAGILADLRLESHRQQLDELGVAP
FT FDLVVVNLYPFRETVASGATPDECVEQIDIGGPSMVRAAAKNHPSVAVVTSPARYADVL
FT LAVEGGGFDLAARKRLAAEAFQHTAAYDVAVASWFAAEYAPVDESGFPDFLGATYERAN
FT TLRYGENPHQPAALYTSPEGGGLAQAEQLHGKEMSYNNYTDTDAARRAAYDHAEPCVAI
FT IKHANPCGIAIGADVAEAHRKAHDCDPVSAYGGVIAVNRPVSKEMAERVAGIFTEVIVA
FT PDYEDGALEALTKKKNIRVLRAPAAPAAPVEVKPIDGGALLQVTDRLQAEGDDPATWTL
FT ATGEALSEAELAELAFAWRACRAVKSNAILLAKDGASVGVGMGQVNRVDSAKLAVERAG
FT AERAQGAYAASDAFFPFPDGLEILTGAGVKAVVQPGGSVRDELVVEAAKKAGVTMYFTG
FT TRHFFH"
FT /product="bifunctional
FT phosphoribosylaminoimidazolecarboxamide
FT formyltransferase/IMP cyclohydrolase"
FT /EC_number="3.5.4.10"
FT /EC_number="2.1.2.3"
FT misc_feature 5242401..5243345
FT /locus_tag="SCO4814"
FT /gene_synonym="SCD63A.25"
FT /gene="purH"
FT /note="Pfam match to entry PF01808 AICARFT_IMPCHas,
FT AICARFT/IMPCHase bienzyme, score 508.80, E-value 4.2e-149"
//

0 comments on commit 3c6d895

Please sign in to comment.