摘要:
# 读取fasta # 解析每条序列的长度 chr_len = {'chr1':10,'chr2':20,'chr3':30,'chr4':40,'chr5':15} # 求和 total_len = sum(chr_len.values()) # 获取键用keys for chr in chr_l 阅读全文
摘要:
# 读取fasta # 解析每条序列的长度 chr_len = [10,20,30,40,50] # 求和 # 方法一:通过循环 total_len = 0 #定义total_len的初始长度 for len in chr_len: # 从列表chr_len中每次取一个值交给len total_le 阅读全文
摘要:
# 读取fasta # 解析每条序列的长度 chr1_seq = 'ATATATATAT' chr2_seq = 'ATATATATATCGCGCGCGCG' chr3_seq = 'ATATATATATCGCGCGCGCGATATATATAT' chr4_seq = 'ATATATATATCGCG 阅读全文
摘要:
# 读取fasta # 解析每条序列的长度 chr1_len = 10 chr2_len = 20 chr3_len = 30 chr4_len = 40 chr5_len = 50 # 求和 total_len = chr1_len + chr2_len + chr3_len + chr4_len 阅读全文