def read_te_fasta(self, fasta_file): from fastaIO import FastaReader seq_dict1 = {} seq_dict2 = {} ct = 1 handle = FastaReader(fasta_file) for seq_id, seq in handle: seq_dict1[ct] = seq_id seq_dict2[ct] = seq ct = ct + 1 handle.close() return seq_dict1, seq_dict2
def read_chesis_fasta(self, fasta_file): from fastaIO import FastaReader seq_dict = {} ct = 1 handle = FastaReader(fasta_file) seq_id = "" seq_length = 0 chr_seq = "" for seq_id, seq in handle: seq_length = len(seq) chr_seq = seq handle.close() return seq_id, seq_length, chr_seq