def make_seqs(seqs): """prepare the input sequences for feeding into meme. This means only taking the unique sequences and their reverse complement if desired""" meme_input_seqs = [] for locseq in seqs.values(): seq = locseq[1] util.add_if_unique(meme_input_seqs, seq) if use_revcomp: util.add_if_unique(meme_input_seqs, st.revcomp(seq)) return meme_input_seqs
def make_seqs(seqs): """prepare the input sequences for feeding into meme. This means only taking the unique sequences and their reverse complement if desired""" meme_input_seqs = [] for locseq in seqs.values(): seq = locseq[1] if seq not in meme_input_seqs: meme_input_seqs.append(seq) if use_revcomp: revseq = st.revcomp(seq) if revseq not in meme_input_seqs: meme_input_seqs.append(revseq) return meme_input_seqs
def test_revcomp(self): """test revcomp function""" self.assertEquals("GNCAT", st.revcomp('ATGNC')) self.assertEquals("GNCAT", st.revcomp('atgnc'))