Permalink
Browse files

Merge branch 'master' of github.com:biopython/biopython

  • Loading branch information...
2 parents dfa8eb5 + cf063bf commit 86689112a64b858a39d52c68bd7b86dfacfc5a54 Michiel de Hoon committed Dec 3, 2012
Showing with 1,050 additions and 1,534 deletions.
  1. +0 −1 Bio/AlignIO/Interfaces.py
  2. +1 −1 Bio/AlignIO/StockholmIO.py
  3. +0 −1 Bio/Alphabet/__init__.py
  4. +2 −1 Bio/Application/__init__.py
  5. +2 −1 Bio/Blast/NCBIStandalone.py
  6. +2 −3 Bio/Blast/NCBIWWW.py
  7. +0 −3 Bio/Blast/ParseBlastTable.py
  8. +10 −10 Bio/Crystal/__init__.py
  9. +4 −1 Bio/Entrez/__init__.py
  10. +1 −1 Bio/ExPASy/ScanProsite.py
  11. +0 −1 Bio/FSSP/FSSPTools.py
  12. +0 −1 Bio/FSSP/__init__.py
  13. +0 −1 Bio/FSSP/fssp_rec.py
  14. +510 −3 Bio/File.py
  15. +0 −3 Bio/GA/Mutation/Simple.py
  16. +3 −3 Bio/GA/Organism.py
  17. +0 −1 Bio/GA/Repair/Stabilizing.py
  18. +0 −2 Bio/GA/Selection/Diversity.py
  19. +0 −1 Bio/GA/Selection/Tournament.py
  20. +2 −2 Bio/Geo/Record.py
  21. +0 −3 Bio/Graphics/DisplayRepresentation.py
  22. +2 −2 Bio/Graphics/GenomeDiagram/_AbstractDrawer.py
  23. +1 −1 Bio/Graphics/GenomeDiagram/_CircularDrawer.py
  24. +3 −7 Bio/Graphics/GenomeDiagram/_Colors.py
  25. +0 −1 Bio/Graphics/GenomeDiagram/_Diagram.py
  26. +0 −1 Bio/Graphics/GenomeDiagram/_FeatureSet.py
  27. +0 −2 Bio/Graphics/GenomeDiagram/_Graph.py
  28. +0 −3 Bio/HMM/DynamicProgramming.py
  29. +0 −1 Bio/HMM/MarkovModel.py
  30. +0 −9 Bio/HMM/Trainer.py
  31. +0 −5 Bio/HMM/Utilities.py
  32. +0 −3 Bio/HotRand.py
  33. +1 −1 Bio/Index.py
  34. +0 −1 Bio/KDTree/KDTree.py
  35. +0 −1 Bio/Motif/MEME.py
  36. +0 −2 Bio/Motif/Parsers/AlignAce.py
  37. +0 −1 Bio/Motif/Parsers/MEME.py
  38. +2 −2 Bio/Motif/_Motif.py
  39. +20 −10 Bio/NMR/xpktools.py
  40. +0 −1 Bio/NeuralNetwork/Gene/Motif.py
  41. +2 −2 Bio/NeuralNetwork/Gene/Pattern.py
  42. +0 −1 Bio/NeuralNetwork/Gene/Signature.py
  43. +0 −4 Bio/NeuralNetwork/Training.py
  44. +96 −93 Bio/Nexus/Nexus.py
  45. +25 −25 Bio/Nexus/Nodes.py
  46. +60 −63 Bio/Nexus/Trees.py
  47. +5 −5 Bio/Nexus/cnexus.c
  48. +0 −1 Bio/PDB/AbstractPropertyMap.py
  49. +0 −1 Bio/PDB/Chain.py
  50. +1 −2 Bio/PDB/DSSP.py
  51. +0 −1 Bio/PDB/Dice.py
  52. +0 −1 Bio/PDB/FragmentMapper.py
  53. +0 −2 Bio/PDB/HSExposure.py
  54. +1 −2 Bio/PDB/MMCIF2Dict.py
  55. +0 −1 Bio/PDB/MMCIFParser.py
  56. +0 −1 Bio/PDB/Model.py
  57. +2 −2 Bio/PDB/NACCESS.py
  58. +0 −1 Bio/PDB/NeighborSearch.py
  59. +0 −4 Bio/PDB/PDBIO.py
  60. +0 −1 Bio/PDB/Polypeptide.py
  61. +0 −1 Bio/PDB/Residue.py
  62. +0 −1 Bio/PDB/ResidueDepth.py
  63. +0 −2 Bio/PDB/Structure.py
  64. +0 −1 Bio/PDB/StructureAlignment.py
  65. +0 −2 Bio/PDB/StructureBuilder.py
  66. +0 −3 Bio/Pathway/Rep/HashSet.py
  67. +0 −1 Bio/Phylo/Applications/_Phyml.py
  68. +0 −1 Bio/Phylo/Applications/_Raxml.py
  69. +0 −1 Bio/Phylo/BaseTree.py
  70. +0 −1 Bio/Phylo/Newick.py
  71. +0 −1 Bio/Phylo/NewickIO.py
  72. +2 −2 Bio/Phylo/PAML/_paml.py
  73. +0 −2 Bio/Phylo/PAML/yn00.py
  74. +0 −1 Bio/Phylo/PhyloXMLIO.py
  75. +0 −1 Bio/Phylo/_utils.py
  76. +0 −1 Bio/PopGen/Async/Local.py
  77. +0 −1 Bio/PopGen/FDist/Controller.py
  78. +3 −4 Bio/PopGen/FDist/Utils.py
  79. +0 −1 Bio/PopGen/FDist/__init__.py
  80. +1 −3 Bio/PopGen/GenePop/Controller.py
  81. +5 −6 Bio/PopGen/GenePop/FileParser.py
  82. +0 −1 Bio/PopGen/GenePop/LargeFileParser.py
  83. +0 −2 Bio/PopGen/GenePop/__init__.py
  84. +0 −2 Bio/PopGen/SimCoal/Controller.py
  85. +0 −2 Bio/PopGen/SimCoal/Template.py
  86. +0 −2 Bio/Restriction/RanaConfig.py
  87. +0 −1 Bio/Restriction/Restriction_Dictionary.py
  88. +0 −2 Bio/Restriction/_Update/RestrictionCompiler.py
  89. +1 −1 Bio/SCOP/Raf.py
  90. +0 −8 Bio/SCOP/Residues.py
  91. +2 −1 Bio/SCOP/__init__.py
  92. +1 −1 Bio/SCOP/three_to_one_dict.py
  93. +37 −67 Bio/SearchIO/BlastIO/blast_xml.py
  94. +4 −6 Bio/SearchIO/FastaIO.py
  95. +45 −11 Bio/SearchIO/__init__.py
  96. +16 −439 Bio/SearchIO/_index.py
  97. +0 −1 Bio/SeqIO/PdbIO.py
  98. +5 −6 Bio/SeqIO/UniprotIO.py
  99. +23 −5 Bio/SeqIO/__init__.py
  100. +2 −492 Bio/SeqIO/_index.py
  101. +0 −1 Bio/SeqUtils/CodonUsage.py
  102. +0 −1 Bio/SeqUtils/ProtParam.py
  103. +1 −1 Bio/SeqUtils/__init__.py
  104. +0 −1 Bio/SubsMat/FreqTable.py
  105. +9 −6 Bio/SubsMat/__init__.py
  106. +1 −1 Bio/SwissProt/__init__.py
  107. +3 −5 Bio/UniGene/UniGene.py
  108. +3 −3 Bio/UniGene/__init__.py
  109. +2 −1 Bio/Wise/dnal.py
  110. +1 −1 Bio/_py3k/_ordereddict.py
  111. +2 −2 Bio/triefind.py
  112. +24 −8 BioSQL/BioSeq.py
  113. +0 −1 BioSQL/Loader.py
  114. +0 −1 BioSQL/__init__.py
  115. +0 −1 Doc/examples/clustal_run.py
  116. +0 −1 Doc/examples/fasta_iterator.py
  117. +4 −7 Doc/examples/getgene.py
  118. +0 −2 Doc/examples/local_blast.py
  119. +0 −1 Doc/examples/make_subsmat.py
  120. +0 −1 Doc/examples/swissprot.py
  121. +0 −2 Doc/examples/www_blast.py
  122. +0 −3 Scripts/GenBank/check_output_simple.py
  123. +0 −3 Scripts/GenBank/find_parser_problems.py
  124. +0 −1 Scripts/Performance/biosql_performance_load.py
  125. +1 −1 Scripts/SeqGui/SeqGui.py
  126. +2 −2 Scripts/debug/debug_blast_parser.py
  127. +0 −18 Scripts/scop_pdb.py
  128. +3 −1 Scripts/xbbtools/nextorf.py
  129. +3 −1 Scripts/xbbtools/xbb_blast.py
  130. +9 −4 Scripts/xbbtools/xbb_blastbg.py
  131. +0 −2 Scripts/xbbtools/xbb_help.py
  132. +3 −4 Scripts/xbbtools/xbb_search.py
  133. +0 −2 Scripts/xbbtools/xbb_sequence.py
  134. +0 −1 Scripts/xbbtools/xbb_translations.py
  135. +0 −1 Scripts/xbbtools/xbbtools.py
  136. BIN Tests/Blast/wnts.xml.bgz
  137. +6 −6 Tests/test_Cluster.py
  138. +0 −1 Tests/test_ColorSpiral.py
  139. +0 −1 Tests/test_Crystal.py
  140. +0 −1 Tests/test_FSSP.py
  141. +0 −1 Tests/test_HMMCasino.py
  142. +1 −1 Tests/test_KEGG.py
  143. +0 −1 Tests/test_Location.py
  144. +0 −1 Tests/test_Medline.py
  145. +2 −1 Tests/test_NCBI_BLAST_tools.py
  146. +0 −1 Tests/test_PAML_baseml.py
  147. +0 −1 Tests/test_ParserSupport.py
  148. +0 −1 Tests/test_Phd.py
  149. +2 −2 Tests/test_PopGen_GenePop_nodepend.py
  150. +32 −4 Tests/test_SearchIO_index.py
  151. +0 −1 Tests/test_SeqIO_PdbIO.py
  152. +1 −1 Tests/test_SeqIO_SeqXML.py
  153. +0 −2 Tests/test_SeqIO_online.py
  154. +0 −1 Tests/test_SeqUtils.py
  155. +0 −1 Tests/test_SubsMat.py
  156. +0 −2 Tests/test_TogoWS.py
  157. +2 −1 Tests/test_Wise.py
  158. +20 −0 Tests/test_bgzf.py
  159. +2 −6 Tests/test_geo.py
  160. +2 −1 Tests/test_psw.py
  161. +1 −1 Tests/test_seq.py
  162. +0 −1 Tests/test_translate.py
  163. +3 −3 Tests/test_trie.py
@@ -144,4 +144,3 @@ def write_alignment(self, alignment):
# You SHOULD subclass this, to write the alignment #
# objecta to the file handle #
#####################################################
-
@@ -194,7 +194,7 @@ def _write_record(self, record):
seq_name = seq_name.replace(" ","_")
if "start" in record.annotations \
- and "end" in record.annotations:
+ and "end" in record.annotations:
suffix = "/%s-%s" % (str(record.annotations["start"]),
str(record.annotations["end"]))
if seq_name[-len(suffix):] != suffix:
View
@@ -400,4 +400,3 @@ def _verify_alphabet(sequence):
if letter not in letters:
return False
return True
-
@@ -19,7 +19,8 @@
The finished command line strings are then normally invoked via the built-in
Python module subprocess.
"""
-import os, sys
+import os
+import sys
import StringIO
import subprocess
import re
@@ -2083,7 +2083,8 @@ def _invoke_blast(cline):
Expects a command line wrapper object from Bio.Blast.Applications
"""
- import subprocess, sys
+ import subprocess
+ import sys
blast_cmd = cline.program_name
if not os.path.exists(blast_cmd):
raise ValueError("BLAST executable does not exist at %s" % blast_cmd)
View
@@ -61,7 +61,8 @@ def qblast(program, database, sequence,
http://www.ncbi.nlm.nih.gov/BLAST/blast_overview.html
"""
- import urllib, urllib2
+ import urllib
+ import urllib2
import time
assert program in ['blastn', 'blastp', 'blastx', 'tblastn', 'tblastx']
@@ -243,5 +244,3 @@ def _parse_qblast_ref_page(handle):
except ValueError:
raise ValueError("A non-integer RTOE found in " \
+"the 'please wait' page, %s" % repr(rtoe))
-
-
@@ -98,6 +98,3 @@ def _parse_fields(self, inline):
return 0
def _Parse(self, method_name, inline):
return getattr(self,method_name)(inline)
-
-
-
View
@@ -23,7 +23,7 @@ def wrap_line(line):
return output
def validate_key(key):
- if type(key) != type(''):
+ if not isinstance(key, str):
raise CrystalError('chain requires a string label')
if len(key) != 1:
raise CrystalError('chain label should contain one letter')
@@ -37,7 +37,7 @@ class Hetero(object):
"""
def __init__(self, data):
# Enforce string storage
- if type(data) != type(""):
+ if not isinstance(data, str):
raise CrystalError('Hetero data must be an alphameric string')
if data.isalnum() == 0:
raise CrystalError('Hetero data must be an alphameric string')
@@ -66,12 +66,12 @@ def __len__(self): return len(self.data)
class Chain(object):
def __init__(self, residues = ''):
self.data = []
- if type(residues) == type(''):
+ if isinstance(residues, str):
residues = residues.replace('*', ' ')
residues = residues.strip()
elements = residues.split()
self.data = map(Hetero, elements)
- elif type(residues) == type([]):
+ elif isinstance(residues, list):
for element in residues:
if not isinstance(element, Hetero):
raise CrystalError('Text must be a string')
@@ -185,23 +185,23 @@ def index(self, item):
def __add__(self, other):
if isinstance(other, Chain):
return self.__class__(self.data + other.data)
- elif type(other) == type(''):
+ elif isinstance(other, str):
return self.__class__(self.data + Chain(other).data)
else:
raise TypeError
def __radd__(self, other):
if isinstance(other, Chain):
return self.__class__(other.data + self.data)
- elif type(other) == type(''):
+ elif isinstance(other, str):
return self.__class__(Chain(other).data + self.data)
else:
raise TypeError
def __iadd__(self, other):
if isinstance(other, Chain):
self.data += other.data
- elif type(other) == type(''):
+ elif isinstance(other, str):
self.data += Chain(other).data
else:
raise TypeError
@@ -210,7 +210,7 @@ def __iadd__(self, other):
class Crystal(object):
def __init__(self, data = {}):
# Enforcestorage
- if type(data) != type({}):
+ if not isinstance(data, dict):
raise CrystalError('Crystal must be a dictionary')
self.data = data
self.fix()
@@ -221,7 +221,7 @@ def fix(self):
element = data[key]
if isinstance(element, Chain):
pass
- elif type(element) == type(''):
+ elif isinstance(element, str):
data[key] = Chain(element)
else:
raise TypeError
@@ -250,7 +250,7 @@ def __getitem__(self, key): return self.data[key]
def __setitem__(self, key, item):
if isinstance(item, Chain):
self.data[key] = item
- elif type(item) == type(''):
+ elif isinstance(item, str):
self.data[ key ] = Chain(item)
else:
raise TypeError
View
@@ -68,7 +68,10 @@
_open Internally used function.
"""
-import urllib, urllib2, time, warnings
+import urllib
+import urllib2
+import time
+import warnings
import os.path
from Bio._py3k import _binary_to_string_handle
@@ -69,7 +69,7 @@ def feed(self, data, isFinal = 0):
# fed to the parser.
if self.firsttime:
if data[:5]!="<?xml":
- raise ValueError, data
+ raise ValueError(data)
self.firsttime = False
return ExpatParser.feed(self, data, isFinal)
View
@@ -89,4 +89,3 @@ def name_filter(sum_dict, align_dict, name_list):
new_align_dict.abs(pos_num).pos_align_dict[prot_num] = \
align_dict.abs(pos_num).pos_align_dict[prot_num]
return new_sum_dict, new_align_dict
-
View
@@ -264,4 +264,3 @@ def read_fssp(fssp_handle):
del i.PosAlignList
align_dict.build_resnum_list()
return (header, sum_dict, align_dict)
-
View
@@ -31,4 +31,3 @@ class align(object):
turn5 = (20,22)
acc = (34,37)
start_aa_list = 42
-
Oops, something went wrong.

0 comments on commit 8668911

Please sign in to comment.