pwem.convert.sequence module
- class pwem.convert.sequence.SequenceHandler(sequence=None, iUPACAlphabet=8, doClean=True)[source]
Bases:
object
- appendFile(fileName, seqID, sequence=None, name=None, seqDescription=None, type='fasta')[source]
Appends a sequence to the sequences in a file
- getTypeFromFile(fileName)[source]
Returns the expected BioPython file type according to the filename
- readSequenceFromFile(fileName, type='fasta', isAmino=True)[source]
From a sequences file, returns a dictionary with ther FIRST sequence info. Dictionary: {‘seqID’: seqID1, ‘sequence’: sequence1, ‘description’: description1, ‘alphabet’: alphabet1}
- readSequencesFromFile(fileName, type='fasta', isAmino=True)[source]
From a sequences file, returns a list of dictionaries with each sequence info. Dictionary: [{‘seqID’: seqID1, ‘sequence’: sequence1, ‘description’: description1, ‘alphabet’: alphabet1},
…]
- pwem.convert.sequence.alignBioPairwise2Sequences(structureSequenceId, structureSequence, userSequenceId, userSequence, outFileName)[source]
aligns two sequences and saves them to disk using fasta format