Commit de69764a authored by Mikael Boden's avatar Mikael Boden

for_WS2Dev

parent f536f68d
################################################### ###################################################
# This module is a supplement to the Python guide # # This module is a supplement to the Python guide #
# Version 2017.2 (20/02/2017) # # Version 2017.3 (10/03/2017) #
################################################### ###################################################
''' '''
This module contains code that can help solve bioinformatics problems. This module contains code that can help solve bioinformatics problems.
...@@ -62,6 +62,7 @@ DNA_Alphabet = Alphabet('ACGT') ...@@ -62,6 +62,7 @@ DNA_Alphabet = Alphabet('ACGT')
RNA_Alphabet = Alphabet('ACGU') RNA_Alphabet = Alphabet('ACGU')
Protein_Alphabet = Alphabet('ACDEFGHIKLMNPQRSTVWY') Protein_Alphabet = Alphabet('ACDEFGHIKLMNPQRSTVWY')
Protein_wX = Alphabet('ACDEFGHIKLMNPQRSTVWYX') Protein_wX = Alphabet('ACDEFGHIKLMNPQRSTVWYX')
Protein_wGAP = Alphabet('ACDEFGHIKLMNPQRSTVWY-')
############################################################################### ###############################################################################
# Sequence # # Sequence #
...@@ -106,7 +107,7 @@ class Sequence(): ...@@ -106,7 +107,7 @@ class Sequence():
return self.sequence[ndx] return self.sequence[ndx]
def writeFasta(self): def writeFasta(self):
""" Write one sequence in FASTA format to a string and return it. """ """ Write one sequence in FASTA format to a string and return it. """
fasta = '>' + self.name + '\n' fasta = '>' + self.name + ' ' + self.annot + '\n'
data = self.sequence data = self.sequence
nlines = (len(self.sequence) - 1) // 60 + 1 nlines = (len(self.sequence) - 1) // 60 + 1
for i in range(nlines): for i in range(nlines):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment