上一页 1 ··· 189 190 191 192 193 194 195 196 197 ··· 403 下一页
摘要: 001、获取反向序列 >>> myseq = 'AGCTGGCTA' >>> myseq[::-1] ## 利用切片实现 'ATCGGTCGA' >>> temp = [] >>> for i in reversed(myseq): ## 借助reversed函数实现 ... temp.append 阅读全文
posted @ 2022-08-11 21:10 小鲨鱼2018 阅读(910) 评论(0) 推荐(0)
摘要: 001、 >>> import time ## 导入time包 >>> start = time.time() ## 记录程序开始时间 >>> print("xxxxx") xxxxx >>> end = time.time() ## 记录程序结束时间 >>> print("elapsed:", e 阅读全文
posted @ 2022-08-11 20:48 小鲨鱼2018 阅读(172) 评论(0) 推荐(0)
摘要: 001、保存为字典 (base) root@PC1:/home/test2# ls a.fastq test.py (base) root@PC1:/home/test2# cat a.fastq ## 测试fastq文件 @SRR1596091.1 HISEQ:62:C35RDACXX:2:110 阅读全文
posted @ 2022-08-11 20:33 小鲨鱼2018 阅读(106) 评论(0) 推荐(0)
摘要: 001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG >gen 阅读全文
posted @ 2022-08-11 19:46 小鲨鱼2018 阅读(257) 评论(0) 推荐(0)
摘要: 001、 >>> str1 = "abeababxxxaacdx" >>> dict1 = {} >>> for i in str1: ## 利用循环结构,将字符串中每个字符出现的次数储存在字典中 ... dict1[i] = str1.count(i) ... >>> for i in dict1 阅读全文
posted @ 2022-08-11 19:39 小鲨鱼2018 阅读(1554) 评论(0) 推荐(0)
摘要: 001、 >>> str1 = "abcdabaewr" ## 测试字符串 >>> import re >>> len(re.findall("a", str1)) ## 统计a出现的次数 3 >>> len(re.findall("b", str1)) ## 统计b出现的次数 2 >>> len( 阅读全文
posted @ 2022-08-11 19:35 小鲨鱼2018 阅读(372) 评论(0) 推荐(0)
摘要: 001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG >gen 阅读全文
posted @ 2022-08-11 19:24 小鲨鱼2018 阅读(148) 评论(0) 推荐(0)
摘要: 001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG >gen 阅读全文
posted @ 2022-08-11 19:07 小鲨鱼2018 阅读(126) 评论(0) 推荐(0)
摘要: 001、 (base) root@PC1:/home/test2# ls collective.txt (base) root@PC1:/home/test2# cat collective.txt ## 测试文件, 删除每个字符中/前的所有内容 test1/1.txt test1/2.txt te 阅读全文
posted @ 2022-08-11 16:16 小鲨鱼2018 阅读(974) 评论(0) 推荐(0)
摘要: 001、方式1 (base) root@PC1:/home/test2# ls test1 test2 test3 (base) root@PC1:/home/test2# tree . ├── test1 │ ├── 1.txt │ ├── 2.txt │ └── 3.txt ├── test2 阅读全文
posted @ 2022-08-11 15:59 小鲨鱼2018 阅读(5521) 评论(0) 推荐(0)
上一页 1 ··· 189 190 191 192 193 194 195 196 197 ··· 403 下一页