添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
有腹肌的煎饼果子  ·  Convert a ...·  12 小时前    · 
想发财的苹果  ·  Java String Split by ...·  12 小时前    · 
霸气的石榴  ·  how to split RNA-seq ...·  17 小时前    · 
迷茫的烈马  ·  Support Options for ...·  5 月前    · 
鬼畜的蚂蚁  ·  Laravel and Vue.js ...·  1 年前    · 
成熟的圣诞树  ·  Javascript – Uncaught ...·  1 年前    · 

Today I got access to a "new thing", currently in beta testing, called the GitHub Copilot , I am using it to answer this question:

first I typed

## how to split RNA-seq into codons

The copilot wrote me the code:

def codons(seq):
    codon_list = []
    for i in range(0, len(seq), 3):
        codon_list.append(seq[i:i+3])
    return codon_list

Let's see how it works:

seq = "ACAGUCGACUAGCUUGCACGUAC"
print (codons(seq))

prints:

['ACA', 'GUC', 'GAC', 'UAG', 'CUU', 'GCA', 'CGU', 'AC']

looks good to me, then I wrote:

#  count complete and incomplete codons

without batting an eye the Copilot suggested:

def count():
    seq = "ACAGUCGACUAGCUUGCACGUAC"
    codon_list = codons(seq)
    complete = 0
    incomplete = 0
    for codon in codon_list:
        if len(codon) == 3:
            complete += 1
        else:
            incomplete += 1
    return complete, incomplete

A new era has begun in computing.

I'll remember this day: Friday, October 29, 2021. It is the day when I realized a new era is upon us.