We'll use this method from the last post (and you'll also need to load the data from your favorite FASTA-formatted sequence file), as shown in that example.
from cogent import Sequence, DNA |
<class 'cogent.core.sequence.DnaSequence'> |
print seq.Name |
SThemA |
print seq[:36].rc() # reverse complement |
CGTTTTATGGTTAATACCGAGCGCTAAAAGGGTCAT |
print seq[-36:].toRna() |
CUGAAUAUUCUGCGCGACAGCCUCGGGCUGGAGUAG |
s = seq.withoutTerminalStopCodon() |
CTGAATATTCTGCGCGACAGCCTCGGGCTGGAG |
s = seq.toFasta().split('\n',1)[1] |
ATGACCCTTTTAGCGCTCGGTATTAACCATAAAACG |
mseq = seq.shuffle() |
ATGACCCTTTTAGCGCTCGGTATTAACCATAAAACG |