Skip to content

Commit

Permalink
Add sequence to funny.sth; update tests
Browse files Browse the repository at this point in the history
Test parsing of Stockholm sequences that end in /x-y, where x or y is
non-integer.

Updated expected output, sequence counts in test files to match.
  • Loading branch information
Connor McCoy authored and peterjc committed Jan 30, 2012
1 parent 7bd519e commit d439ba5
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 37 deletions.
27 changes: 14 additions & 13 deletions Tests/Stockholm/funny.sth
Expand Up @@ -11,16 +11,17 @@
#=GS O83071/259-312 AC O83071
#=GS O31698/88-139 AC O31698
#=GS O31698/88-139 OS Bacillus subtilis
O83071/192-246 MTCRAQLIAVPRASSLAE..AIACAQKM....RVSRVPVYERS
#=GR O83071/192-246 SA 999887756453524252..55152525....36463774777
O83071/259-312 MQHVSAPVFVFECTRLAY..VQHKLRAH....SRAVAIVLDEY
#=GR O83071/259-312 SS CCCCCHHHHHHHHHHHHH..EEEEEEEE....EEEEEEEEEEE
O31698/18-71 MIEADKVAHVQVGNNLEH..ALLVLTKT....GYTAIPVLDPS
#=GR O31698/18-71 SS CCCHHHHHHHHHHHHHHH..EEEEEEEE....EEEEEEEEHHH
O31698/88-139 EVMLTDIPRLHINDPIMK..GFGMVINN......GFVCVENDE
#=GR O31698/88-139 SS CCCCCCCHHHHHHHHHHH..HEEEEEEE....EEEEEEEEEEH
#=GC SS_cons CCCCCHHHHHHHHHHHHH..EEEEEEEE....EEEEEEEEEEH
O31699/88-139 EVMLTDIPRLHINDPIMK..GFGMVINN......GFVCVENDE
#=GR O31699/88-139 AS ________________*__________________________
#=GR_O31699/88-139_IN ____________1______________2__________0____
//
O83071/192-246 MTCRAQLIAVPRASSLAE..AIACAQKM....RVSRVPVYERS
#=GR O83071/192-246 SA 999887756453524252..55152525....36463774777
O83071/259-312 MQHVSAPVFVFECTRLAY..VQHKLRAH....SRAVAIVLDEY
#=GR O83071/259-312 SS CCCCCHHHHHHHHHHHHH..EEEEEEEE....EEEEEEEEEEE
O31698/18-71 MIEADKVAHVQVGNNLEH..ALLVLTKT....GYTAIPVLDPS
#=GR O31698/18-71 SS CCCHHHHHHHHHHHHHHH..EEEEEEEE....EEEEEEEEHHH
O31698/88-139 EVMLTDIPRLHINDPIMK..GFGMVINN......GFVCVENDE
#=GR O31698/88-139 SS CCCCCCCHHHHHHHHHHH..HEEEEEEE....EEEEEEEEEEH
#=GC SS_cons CCCCCHHHHHHHHHHHHH..EEEEEEEE....EEEEEEEEEEH
O31699/88-139 EVMLTDIPRLHINDPIMK..GFGMVINN......GFVCVENDE
#=GR O31699/88-139 AS ________________*__________________________
#=GR_O31699/88-139_IN ____________1______________2__________0____
363253|refseq_protein.50.proto_past_mitoc_micro_vira|gi|94986659|ref|YP_594592.1|awsonia_intraceuaris_PHE/MN1-00 EVMLTDIPRLHINDPIMK..GFGMVINN......GFVCVENDE
//
16 changes: 8 additions & 8 deletions Tests/output/test_AlignIO
Expand Up @@ -149,14 +149,14 @@ Testing reading stockholm format file Stockholm/simple.sth with 1 alignments
Checking can write/read as 'fasta' format
Checking can write/read as 'tab' format
Testing reading stockholm format file Stockholm/funny.sth with 1 alignments
Alignment 0, with 5 sequences of length 43
MMMEE alignment column 0
TQIVV alignment column 1
CHEMM alignment column 2
RVALL alignment column 3
ASDTT alignment column 4
||||| ...
SYSEE alignment column 42
Alignment 0, with 6 sequences of length 43
MMMEEE alignment column 0
TQIVVV alignment column 1
CHEMMM alignment column 2
RVALLL alignment column 3
ASDTTT alignment column 4
|||||| ...
SYSEEE alignment column 42
Checking can write/read as 'clustal' format
Checking can write/read as 'nexus' format
Failed: Need a DNA, RNA or Protein alphabet
Expand Down
28 changes: 14 additions & 14 deletions Tests/output/test_SeqIO
Expand Up @@ -2512,16 +2512,16 @@ Testing reading stockholm format file Stockholm/funny.sth
ID = 'O31698/18-71', Name='O31698',
Seq='MIEADKVAHVQVGNNLEH--ALLVLTKT----GYTAIPVLDPS', length=43
...
ID = 'O31699/88-139', Name='O31699',
ID and Name='363253|refseq_protein.50.proto_past_mitoc_micro_vira|gi|94986659|ref|YP_594592.1|awsonia_intraceuaris_PHE/MN1-00',
Seq='EVMLTDIPRLHINDPIMK--GFGMVINN------GFVCVENDE', length=43
Testing reading stockholm format file Stockholm/funny.sth as an alignment
MMMEE alignment column 0
TQIVV alignment column 1
CHEMM alignment column 2
RVALL alignment column 3
ASDTT alignment column 4
||||| ...
SYSEE alignment column 42
MMMEEE alignment column 0
TQIVVV alignment column 1
CHEMMM alignment column 2
RVALLL alignment column 3
ASDTTT alignment column 4
|||||| ...
SYSEEE alignment column 42
Checking can write/read as 'fasta' format
Checking can write/read as 'clustal' format
Checking can write/read as 'phylip' format
Expand All @@ -2530,19 +2530,19 @@ Testing reading stockholm format file Stockholm/funny.sth as an alignment
Checking can write/read as 'embl' format
Failed: Need a DNA, RNA or Protein alphabet
Checking can write/read as 'fastq' format
Failed: No suitable quality scores found in letter_annotations of SeqRecord (id=O31699/88-139).
Failed: No suitable quality scores found in letter_annotations of SeqRecord (id=363253|refseq_protein.50.proto_past_mitoc_micro_vira|gi|94986659|ref|YP_594592.1|awsonia_intraceuaris_PHE/MN1-00).
Checking can write/read as 'fastq-illumina' format
Failed: No suitable quality scores found in letter_annotations of SeqRecord (id=O31699/88-139).
Failed: No suitable quality scores found in letter_annotations of SeqRecord (id=363253|refseq_protein.50.proto_past_mitoc_micro_vira|gi|94986659|ref|YP_594592.1|awsonia_intraceuaris_PHE/MN1-00).
Checking can write/read as 'fastq-solexa' format
Failed: No suitable quality scores found in letter_annotations of SeqRecord (id=O31699/88-139).
Failed: No suitable quality scores found in letter_annotations of SeqRecord (id=363253|refseq_protein.50.proto_past_mitoc_micro_vira|gi|94986659|ref|YP_594592.1|awsonia_intraceuaris_PHE/MN1-00).
Checking can write/read as 'genbank' format
Failed: Need a Nucleotide or Protein alphabet
Failed: Locus identifier '363253|refseq_protein.50.proto_past_mitoc_micro_vira|gi|94986659|ref|YP_594592.1|awsonia_intraceuaris_PHE/MN1-00' is too long
Checking can write/read as 'imgt' format
Failed: Need a DNA, RNA or Protein alphabet
Checking can write/read as 'phd' format
Failed: No suitable quality scores found in letter_annotations of SeqRecord (id=O31699/88-139).
Failed: No suitable quality scores found in letter_annotations of SeqRecord (id=363253|refseq_protein.50.proto_past_mitoc_micro_vira|gi|94986659|ref|YP_594592.1|awsonia_intraceuaris_PHE/MN1-00).
Checking can write/read as 'qual' format
Failed: No suitable quality scores found in letter_annotations of SeqRecord (id=O31699/88-139).
Failed: No suitable quality scores found in letter_annotations of SeqRecord (id=363253|refseq_protein.50.proto_past_mitoc_micro_vira|gi|94986659|ref|YP_594592.1|awsonia_intraceuaris_PHE/MN1-00).
Checking can write/read as 'seqxml' format
Failed: Need a DNA, RNA or Protein alphabet
Checking can write/read as 'sff' format
Expand Down
2 changes: 1 addition & 1 deletion Tests/test_AlignIO.py
Expand Up @@ -37,7 +37,7 @@
#Following example is also used in test_Nexus.py
("nexus", 9, 1, 'Nexus/test_Nexus_input.nex'),
("stockholm", 2, 1, 'Stockholm/simple.sth'),
("stockholm", 5, 1, 'Stockholm/funny.sth'),
("stockholm", 6, 1, 'Stockholm/funny.sth'),
("phylip", 6, 1, 'Phylip/reference_dna.phy'),
("phylip", 6, 1, 'Phylip/reference_dna2.phy'),
("phylip",10, 1, 'Phylip/hennigian.phy'),
Expand Down
2 changes: 1 addition & 1 deletion Tests/test_SeqIO.py
Expand Up @@ -158,7 +158,7 @@ def send_warnings_to_stdout(message, category, filename, lineno,
("embl", False, 'EMBL/A04195.imgt', 1), # features over indented for EMBL
("imgt", False, 'EMBL/A04195.imgt', 1), # features over indented for EMBL
("stockholm", True, 'Stockholm/simple.sth', 2),
("stockholm", True, 'Stockholm/funny.sth', 5),
("stockholm", True, 'Stockholm/funny.sth', 6),
#Following PHYLIP files are currently only used here and in test_AlignIO.py,
#and are mostly from Joseph Felsenstein's PHYLIP v3.6 documentation:
("phylip", True, 'Phylip/reference_dna.phy', 6),
Expand Down

0 comments on commit d439ba5

Please sign in to comment.