Permalink
Browse files

Zap redundant backslashes between brackets (PEP8 E502).

  • Loading branch information...
1 parent 3fd337d commit 9dfec356491d706494c95d21f433cd113a2b14fc @cbrueffer cbrueffer committed with peterjc Dec 5, 2012
Showing with 856 additions and 856 deletions.
  1. +2 −2 Bio/Align/AlignInfo.py
  2. +19 −19 Bio/Align/Applications/_Clustalw.py
  3. +2 −2 Bio/Align/Applications/_Prank.py
  4. +1 −1 Bio/Align/Applications/_Probcons.py
  5. +3 −3 Bio/Align/Generic.py
  6. +3 −3 Bio/Align/__init__.py
  7. +4 −4 Bio/AlignIO/ClustalIO.py
  8. +3 −3 Bio/AlignIO/EmbossIO.py
  9. +1 −1 Bio/AlignIO/FastaIO.py
  10. +4 −4 Bio/AlignIO/NexusIO.py
  11. +9 −9 Bio/AlignIO/PhylipIO.py
  12. +8 −8 Bio/AlignIO/StockholmIO.py
  13. +7 −7 Bio/AlignIO/__init__.py
  14. +3 −3 Bio/Application/__init__.py
  15. +1 −1 Bio/Blast/Applications.py
  16. +7 −7 Bio/Blast/NCBIStandalone.py
  17. +1 −1 Bio/Blast/NCBIWWW.py
  18. +2 −2 Bio/Blast/NCBIXML.py
  19. +5 −5 Bio/Blast/Record.py
  20. +13 −13 Bio/Data/CodonTable.py
  21. +1 −1 Bio/DocSQL.py
  22. +4 −4 Bio/ExPASy/Prosite.py
  23. +1 −1 Bio/GA/Organism.py
  24. +5 −5 Bio/GenBank/__init__.py
  25. +2 −2 Bio/Graphics/BasicChromosome.py
  26. +1 −1 Bio/Graphics/ColorSpiral.py
  27. +1 −1 Bio/Graphics/GenomeDiagram/_AbstractDrawer.py
  28. +1 −1 Bio/Graphics/GenomeDiagram/_CircularDrawer.py
  29. +1 −1 Bio/Graphics/GenomeDiagram/_Diagram.py
  30. +1 −1 Bio/Graphics/GenomeDiagram/_Feature.py
  31. +4 −4 Bio/Graphics/GenomeDiagram/_FeatureSet.py
  32. +2 −2 Bio/Graphics/GenomeDiagram/_LinearDrawer.py
  33. +2 −2 Bio/Graphics/__init__.py
  34. +2 −2 Bio/Index.py
  35. +1 −1 Bio/KDTree/KDTree.py
  36. +4 −4 Bio/KEGG/Compound/__init__.py
  37. +13 −13 Bio/KEGG/Enzyme/__init__.py
  38. +5 −5 Bio/MarkovModel.py
  39. +1 −1 Bio/Motif/_Motif.py
  40. +1 −1 Bio/NaiveBayes.py
  41. +23 −23 Bio/Nexus/Nexus.py
  42. +8 −8 Bio/Nexus/Trees.py
  43. +2 −2 Bio/PDB/Entity.py
  44. +2 −2 Bio/PDB/NACCESS.py
  45. +3 −3 Bio/PDB/Residue.py
  46. +2 −2 Bio/PDB/StructureBuilder.py
  47. +1 −1 Bio/PDB/parse_pdb_header.py
  48. +4 −4 Bio/Pathway/Rep/Graph.py
  49. +2 −2 Bio/Pathway/Rep/MultiGraph.py
  50. +3 −3 Bio/Phylo/PAML/_paml.py
  51. +1 −1 Bio/Phylo/PAML/_parse_codeml.py
  52. +1 −1 Bio/Phylo/PAML/baseml.py
  53. +1 −1 Bio/Phylo/PAML/chi2.py
  54. +2 −2 Bio/Phylo/PAML/codeml.py
  55. +1 −1 Bio/Phylo/PAML/yn00.py
  56. +12 −12 Bio/Restriction/Restriction.py
  57. +1 −1 Bio/SCOP/Raf.py
  58. +1 −1 Bio/SCOP/__init__.py
  59. +4 −4 Bio/SearchIO/BlastIO/blast_tab.py
  60. +2 −2 Bio/SearchIO/BlastIO/blast_text.py
  61. +5 −5 Bio/SearchIO/BlastIO/blast_xml.py
  62. +6 −6 Bio/SearchIO/BlatIO.py
  63. +2 −2 Bio/SearchIO/ExonerateIO/_base.py
  64. +7 −7 Bio/SearchIO/ExonerateIO/exonerate_text.py
  65. +2 −2 Bio/SearchIO/FastaIO.py
  66. +17 −17 Bio/SearchIO/HmmerIO/hmmer3_domtab.py
  67. +16 −16 Bio/SearchIO/HmmerIO/hmmer3_tab.py
  68. +3 −3 Bio/SearchIO/HmmerIO/hmmer3_text.py
  69. +4 −4 Bio/SearchIO/_model/hit.py
  70. +10 −10 Bio/SearchIO/_model/hsp.py
  71. +1 −1 Bio/SearchIO/_model/query.py
  72. +21 −21 Bio/Seq.py
  73. +3 −3 Bio/SeqFeature.py
  74. +4 −4 Bio/SeqIO/UniprotIO.py
  75. +3 −3 Bio/SeqRecord.py
  76. +3 −3 Bio/Sequencing/Applications/_Novoalign.py
  77. +2 −2 Bio/Sequencing/Phd.py
  78. +2 −2 Bio/SwissProt/__init__.py
  79. +5 −5 Bio/TogoWS/__init__.py
  80. +2 −2 Bio/bgzf.py
  81. +3 −3 Bio/pairwise2.py
  82. +40 −40 BioSQL/BioSeq.py
  83. +2 −2 BioSQL/BioSeqDatabase.py
  84. +24 −24 BioSQL/Loader.py
  85. +1 −1 Doc/examples/clustal_run.py
  86. +2 −2 Tests/requires_wise.py
  87. +2 −2 Tests/run_tests.py
  88. +3 −3 Tests/search_tests_common.py
  89. +4 −4 Tests/seq_tests_common.py
  90. +7 −7 Tests/test_AlignIO.py
  91. +1 −1 Tests/test_AlignIO_FastaIO.py
  92. +1 −1 Tests/test_AlignIO_convert.py
  93. +1 −1 Tests/test_CAPS.py
  94. +4 −4 Tests/test_ClustalOmega_tool.py
  95. +7 −7 Tests/test_Clustalw_tool.py
  96. +1 −1 Tests/test_Cluster.py
  97. +2 −2 Tests/test_ColorSpiral.py
  98. +3 −3 Tests/test_Crystal.py
  99. +6 −6 Tests/test_Dialign_tool.py
  100. +29 −29 Tests/test_Emboss.py
  101. +2 −2 Tests/test_EmbossPhylipNew.py
  102. +2 −2 Tests/test_GACrossover.py
  103. +1 −1 Tests/test_GenBank.py
  104. +2 −2 Tests/test_GenomeDiagram.py
  105. +3 −3 Tests/test_GraphicsBitmaps.py
  106. +4 −4 Tests/test_GraphicsChromosome.py
  107. +1 −1 Tests/test_GraphicsDistribution.py
  108. +1 −1 Tests/test_GraphicsGeneral.py
  109. +2 −2 Tests/test_KDTree.py
  110. +5 −5 Tests/test_Mafft_tool.py
  111. +1 −1 Tests/test_MarkovModel.py
  112. +16 −16 Tests/test_Muscle_tool.py
  113. +7 −7 Tests/test_NCBI_BLAST_tools.py
  114. +7 −7 Tests/test_NCBI_qblast.py
  115. +2 −2 Tests/test_PAML_baseml.py
  116. +2 −2 Tests/test_PAML_codeml.py
  117. +1 −1 Tests/test_PAML_tools.py
  118. +2 −2 Tests/test_PDB_KDTree.py
  119. +1 −1 Tests/test_PhyloXML.py
  120. +1 −1 Tests/test_PopGen_DFDist.py
  121. +1 −1 Tests/test_PopGen_FDist.py
  122. +1 −1 Tests/test_PopGen_GenePop.py
  123. +1 −1 Tests/test_PopGen_GenePop_EasyController.py
  124. +1 −1 Tests/test_PopGen_SimCoal.py
  125. +9 −9 Tests/test_Prank_tool.py
  126. +1 −1 Tests/test_Probcons_tool.py
  127. +2 −2 Tests/test_SVDSuperimposer.py
  128. +16 −16 Tests/test_SearchIO_blast_xml.py
  129. +154 −154 Tests/test_SearchIO_hmmer3_text.py
  130. +21 −21 Tests/test_SearchIO_model.py
  131. +3 −3 Tests/test_SearchIO_write.py
  132. +7 −7 Tests/test_SeqIO.py
  133. +6 −6 Tests/test_SeqIO_QualityIO.py
  134. +4 −4 Tests/test_SeqIO_convert.py
  135. +32 −32 Tests/test_SeqIO_features.py
  136. +5 −5 Tests/test_SeqIO_index.py
  137. +3 −3 Tests/test_SeqIO_online.py
  138. +2 −2 Tests/test_SeqIO_write.py
  139. +13 −13 Tests/test_Seq_objs.py
  140. +2 −2 Tests/test_TCoffee_tool.py
  141. +2 −2 Tests/test_TogoWS.py
  142. +1 −1 Tests/test_Tutorial.py
  143. +2 −2 Tests/test_Uniprot.py
  144. +1 −1 Tests/test_XXmotif_tool.py
  145. +2 −2 Tests/test_bgzf.py
  146. +2 −2 Tests/test_phyml_tool.py
  147. +2 −2 Tests/test_raxml_tool.py
  148. +6 −6 Tests/test_seq.py
  149. +2 −2 do2to3.py
  150. +1 −1 setup.py
View
@@ -304,7 +304,7 @@ def _get_all_letters(self):
"""Returns a string containing the expected letters in the alignment."""
all_letters = self.alignment._alphabet.letters
if all_letters is None \
- or (isinstance(self.alignment._alphabet, Alphabet.Gapped) \
+ or (isinstance(self.alignment._alphabet, Alphabet.Gapped)
and all_letters == self.alignment._alphabet.gap_char):
#We are dealing with a generic alphabet class where the
#letters are not defined! We must build a list of the
@@ -572,7 +572,7 @@ def _get_column_info_content(self, obs_freq, e_freq_table, log_base,
for key in obs_freq:
if (key != gap_char and key not in e_freq_table):
raise ValueError("Expected frequency letters %s "
- "do not match observed %s" \
+ "do not match observed %s"
% (e_freq_table.keys(),
obs_freq.keys() - [gap_char]))
@@ -124,19 +124,19 @@ def __init__(self, cmd="clustalw", **kwargs):
# ***Fast Pairwise Alignments:***
_Option(["-ktuple", "-KTUPLE", "KTUPLE", "ktuple"],
"Word size",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Option(["-topdiags", "-TOPDIAGS", "TOPDIAGS", "topdiags"],
"Number of best diags.",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Option(["-window", "-WINDOW", "WINDOW", "window"],
"Window around best diags.",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Option(["-pairgap", "-PAIRGAP", "PAIRGAP", "pairgap"],
"Gap penalty",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Option(["-score", "-SCORE", "SCORE", "score"],
"Either: PERCENT or ABSOLUTE",
@@ -148,22 +148,22 @@ def __init__(self, cmd="clustalw", **kwargs):
checker_function=lambda x: x in ["BLOSUM", "PAM",
"GONNET", "ID",
"blosum", "pam",
- "gonnet", "id"] or \
+ "gonnet", "id"] or
os.path.exists(x),
filename=True),
_Option(["-pwdnamatrix", "-PWDNAMATRIX", "PWDNAMATRIX", "pwdnamatrix"],
"DNA weight matrix=IUB, CLUSTALW or filename",
checker_function=lambda x: x in ["IUB", "CLUSTALW",
- "iub", "clustalw"] or \
+ "iub", "clustalw"] or
os.path.exists(x),
filename=True),
_Option(["-pwgapopen", "-PWGAPOPEN", "PWGAPOPEN", "pwgapopen"],
"Gap opening penalty",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Option(["-pwgapext", "-PWGAPEXT", "PWGAPEXT", "pwgapext"],
"Gap extension penalty",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
# ***Multiple Alignments:***
_Option(["-newtree", "-NEWTREE", "NEWTREE", "newtree"],
@@ -178,28 +178,28 @@ def __init__(self, cmd="clustalw", **kwargs):
checker_function=lambda x: x in ["BLOSUM", "PAM",
"GONNET", "ID",
"blosum", "pam",
- "gonnet", "id"] or \
+ "gonnet", "id"] or
os.path.exists(x),
filename=True),
_Option(["-dnamatrix", "-DNAMATRIX", "DNAMATRIX", "dnamatrix"],
"DNA weight matrix=IUB, CLUSTALW or filename",
checker_function=lambda x: x in ["IUB", "CLUSTALW",
- "iub", "clustalw"] or \
+ "iub", "clustalw"] or
os.path.exists(x),
filename=True),
_Option(["-gapopen", "-GAPOPEN", "GAPOPEN", "gapopen"],
"Gap opening penalty",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Option(["-gapext", "-GAPEXT", "GAPEXT", "gapext"],
"Gap extension penalty",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Switch(["-endgaps", "-ENDGAPS", "ENDGAPS", "endgaps"],
"No end gap separation pen."),
_Option(["-gapdist", "-GAPDIST", "GAPDIST", "gapdist"],
"Gap separation pen. range",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Switch(["-nopgap", "-NOPGAP", "NOPGAP", "nopgap"],
"Residue-specific gaps off"),
@@ -209,7 +209,7 @@ def __init__(self, cmd="clustalw", **kwargs):
"List hydrophilic res."),
_Option(["-maxdiv", "-MAXDIV", "MAXDIV", "maxdiv"],
"% ident. for delay",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
# Already handled in General Settings section, but appears a second
# time under Multiple Alignments in the help
@@ -219,7 +219,7 @@ def __init__(self, cmd="clustalw", **kwargs):
# "protein", "dna"]),
_Option(["-transweight", "-TRANSWEIGHT", "TRANSWEIGHT", "transweight"],
"Transitions weighting",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Option(["-iteration", "-ITERATION", "ITERATION", "iteration"],
"NONE or TREE or ALIGNMENT",
@@ -274,19 +274,19 @@ def __init__(self, cmd="clustalw", **kwargs):
"both", "none"]),
_Option(["-helixgap", "-HELIXGAP", "HELIXGAP", "helixgap"],
"Gap penalty for helix core residues",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Option(["-strandgap", "-STRANDGAP", "STRANDGAP", "strandgap"],
"gap penalty for strand core residues",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Option(["-loopgap", "-LOOPGAP", "LOOPGAP", "loopgap"],
"Gap penalty for loop regions",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Option(["-terminalgap", "-TERMINALGAP", "TERMINALGAP", "terminalgap"],
"Gap penalty for structure termini",
- checker_function=lambda x: isinstance(x, int) or \
+ checker_function=lambda x: isinstance(x, int) or
isinstance(x, float)),
_Option(["-helixendin", "-HELIXENDIN", "HELIXENDIN", "helixendin"],
"Number of residues inside helix to be treated as terminal",
@@ -151,13 +151,13 @@ def __init__(self, cmd="prank", **kwargs):
# Doesnt specify type but Float and Int work
_Option(["-matresize", "matresize"],
"Matrix resizing multiplier",
- checker_function=lambda x: isinstance(x, float) or \
+ checker_function=lambda x: isinstance(x, float) or
isinstance(x, int)),
#-matinitsize=# [matrix initial size multiplier]
# Doesnt specify type but Float and Int work
_Option(["-matinitsize", "matinitsize"],
"Matrix initial size multiplier",
- checker_function=lambda x: isinstance(x, float) or \
+ checker_function=lambda x: isinstance(x, float) or
isinstance(x, int)),
_Switch(["-longseq", "longseq"],
"Save space in pairwise alignments"),
@@ -100,7 +100,7 @@ def __init__(self, cmd="probcons", **kwargs):
"order (default: off)"),
#Input file name
_Argument(["input"],
- "Input file name. Must be multiple FASTA alignment "+ \
+ "Input file name. Must be multiple FASTA alignment "+
"(MFA) format",
filename=True,
is_required=True),
View
@@ -52,7 +52,7 @@ def __init__(self, alphabet):
import warnings
import Bio
warnings.warn("With the introduction of the MultipleSeqAlignment class in Bio.Align, this base class is deprecated and is likely to be removed in a future release of Biopython.", Bio.BiopythonDeprecationWarning)
- if not (isinstance(alphabet, Alphabet.Alphabet) \
+ if not (isinstance(alphabet, Alphabet.Alphabet)
or isinstance(alphabet, Alphabet.AlphabetEncoder)):
raise ValueError("Invalid alphabet argument")
self._alphabet = alphabet
@@ -92,7 +92,7 @@ def __str__(self):
See also the alignment's format method.
"""
rows = len(self._records)
- lines = ["%s alignment with %i rows and %i columns" \
+ lines = ["%s alignment with %i rows and %i columns"
% (str(self._alphabet), rows, self.get_alignment_length())]
if rows <= 20:
lines.extend([self._str_line(rec) for rec in self._records])
@@ -421,7 +421,7 @@ def __getitem__(self, index):
sub_align._records = self._records[index]
return sub_align
elif len(index)==2:
- raise TypeError("Row and Column indexing is not currently supported,"\
+ raise TypeError("Row and Column indexing is not currently supported,"
+"but may be in future.")
else:
raise TypeError("Invalid index type.")
View
@@ -154,7 +154,7 @@ def __init__(self, records, alphabet=None):
else :
raise ValueError("Invalid records argument")
if alphabet is not None :
- if not (isinstance(alphabet, Alphabet.Alphabet) \
+ if not (isinstance(alphabet, Alphabet.Alphabet)
or isinstance(alphabet, Alphabet.AlphabetEncoder)):
raise ValueError("Invalid alphabet argument")
self._alphabet = alphabet
@@ -167,8 +167,8 @@ def __init__(self, records, alphabet=None):
self.extend(records)
if alphabet is None:
#No alphabet was given, take a consensus alphabet
- self._alphabet = Alphabet._consensus_alphabet(rec.seq.alphabet for \
- rec in self._records \
+ self._alphabet = Alphabet._consensus_alphabet(rec.seq.alphabet for
+ rec in self._records
if rec.seq is not None)
def extend(self, records):
View
@@ -96,7 +96,7 @@ def next(self):
#Whitelisted headers we know about
known_headers = ['CLUSTAL', 'PROBCONS', 'MUSCLE']
if line.strip().split()[0] not in known_headers:
- raise ValueError("%s is not a known CLUSTAL header: %s" % \
+ raise ValueError("%s is not a known CLUSTAL header: %s" %
(line.strip().split()[0],
", ".join(known_headers)))
@@ -209,7 +209,7 @@ def next(self):
raise ValueError("Could not parse line:\n%s" % repr(line))
if fields[0] != ids[i]:
- raise ValueError("Identifiers out of order? Got '%s' but expected '%s'" \
+ raise ValueError("Identifiers out of order? Got '%s' but expected '%s'"
% (fields[0], ids[i]))
if fields[1] != line[seq_cols]:
@@ -251,10 +251,10 @@ def next(self):
if self.records_per_alignment is not None \
and self.records_per_alignment != len(ids):
- raise ValueError("Found %i records in this alignment, told to expect %i" \
+ raise ValueError("Found %i records in this alignment, told to expect %i"
% (len(ids), self.records_per_alignment))
- records = (SeqRecord(Seq(s, self.alphabet), id=i, description=i) \
+ records = (SeqRecord(Seq(s, self.alphabet), id=i, description=i)
for (i,s) in zip(ids, seqs))
alignment = MultipleSeqAlignment(records, self.alphabet)
#TODO - Handle alignment annotation better, for now
View
@@ -117,7 +117,7 @@ def next(self):
if self.records_per_alignment is not None \
and self.records_per_alignment != number_of_seqs:
- raise ValueError("Found %i records in this alignment, told to expect %i" \
+ raise ValueError("Found %i records in this alignment, told to expect %i"
% (number_of_seqs, self.records_per_alignment))
seqs = ["" for id in ids]
@@ -200,7 +200,7 @@ def next(self):
if self.records_per_alignment is not None \
and self.records_per_alignment != len(ids):
- raise ValueError("Found %i records in this alignment, told to expect %i" \
+ raise ValueError("Found %i records in this alignment, told to expect %i"
% (len(ids), self.records_per_alignment))
records = []
@@ -213,7 +213,7 @@ def next(self):
raise ValueError("Error parsing alignment - sequences of "
"different length? You could be using an "
"old version of EMBOSS.")
- records.append(SeqRecord(Seq(seq, self.alphabet), \
+ records.append(SeqRecord(Seq(seq, self.alphabet),
id=id, description=id))
return MultipleSeqAlignment(records, self.alphabet)
View
@@ -103,7 +103,7 @@ def FastaM10Iterator(handle, alphabet = single_letter_alphabet):
def build_hsp():
if not query_tags and not match_tags:
- raise ValueError("No data for query %r, match %r" \
+ raise ValueError("No data for query %r, match %r"
% (query_id, match_id))
assert query_tags, query_tags
assert match_tags, match_tags
View
@@ -45,13 +45,13 @@ def NexusIterator(handle, seq_count=None):
assert len(n.unaltered_taxlabels) == len(n.taxlabels)
if seq_count and seq_count != len(n.unaltered_taxlabels):
- raise ValueError("Found %i sequences, but seq_count=%i" \
+ raise ValueError("Found %i sequences, but seq_count=%i"
% (len(n.unaltered_taxlabels), seq_count))
#ToDo - Can we extract any annotation too?
- records = (SeqRecord(n.matrix[new_name], id=new_name, \
- name=old_name, description="") \
- for old_name, new_name \
+ records = (SeqRecord(n.matrix[new_name], id=new_name,
+ name=old_name, description="")
+ for old_name, new_name
in zip(n.unaltered_taxlabels, n.taxlabels))
#All done
yield MultipleSeqAlignment(records, n.alphabet)
Oops, something went wrong.

0 comments on commit 9dfec35

Please sign in to comment.