摘要: 001、 (base) root@PC1:/home/test3# ls test.py (base) root@PC1:/home/test3# cat test.py ## 测试程序 #!/usr/bin/python def com_trs(str): list1 = [] str = rev 阅读全文
posted @ 2022-08-09 23:13 小鲨鱼2018 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 001、列表中 >>> list1 = list(range(11,20)) >>> list1 ## 测试列表 [11, 12, 13, 14, 15, 16, 17, 18, 19] >>> select = [2, 3, 7] ## 索引 >>> [list1[k] for k in sele 阅读全文
posted @ 2022-08-09 22:48 小鲨鱼2018 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# head a.fasta ## 测试数据 >scaffold_1 CCCGGGTAAAACGGGTCTTCAAGAAAACGCTCCTC 阅读全文
posted @ 2022-08-09 21:18 小鲨鱼2018 阅读(830) 评论(0) 推荐(0) 编辑
摘要: 001、 (base) root@PC1:/home/test2# ls a.txt test.py (base) root@PC1:/home/test2# cat a.txt ## 测试数据 e d d f k d d e k d f j e f j (base) root@PC1:/home/ 阅读全文
posted @ 2022-08-09 17:09 小鲨鱼2018 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 001、 >>> import re ## 导入re包 >>> str = "aaaabbbbccccdddaaakkkk" ## 测试字符串 >>> re.sub(r"([ab])\1+", "Q", str) ## 将多个连续的a和b替换为一个Q 'QQccccdddQkkkk' 002、 >> 阅读全文
posted @ 2022-08-09 16:53 小鲨鱼2018 阅读(605) 评论(0) 推荐(0) 编辑
摘要: 001、 (base) root@PC1:/home/test2# ls outcome.ped test.py (base) root@PC1:/home/test2# cat outcome.ped ## 测试文件 1 G G C C G G 2 G G G C G G 3 G G C C G 阅读全文
posted @ 2022-08-09 15:06 小鲨鱼2018 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 001、 (base) root@PC1:/home/test2# cat outcome.ped ## 测试文件 1 G G C C G G 2 G G G C G G 3 G G C C G G 4 G G C C G G 5 G G C C G G 6 G G C C G G 7 G G C 阅读全文
posted @ 2022-08-09 15:00 小鲨鱼2018 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试数据 >scaffold_1 CCCGGGTAAAACGGGTCTTCAAGAAAACGCTCCTCC 阅读全文
posted @ 2022-08-09 13:04 小鲨鱼2018 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 001、 (base) root@PC1:/home/test3# ls a.txt test.py (base) root@PC1:/home/test3# cat a.txt ## 测试数据 ddd ff ff jkj jj dffffffgg dgfggggg k fff iyyee (bas 阅读全文
posted @ 2022-08-09 12:45 小鲨鱼2018 阅读(524) 评论(0) 推荐(0) 编辑
摘要: 001、 (base) root@PC1:/home/test3# ls a.txt test.py (base) root@PC1:/home/test3# cat a.txt ## 测试数据 ddd ff ff jkj jj dffffffgg dgfggggg (base) root@PC1: 阅读全文
posted @ 2022-08-09 12:40 小鲨鱼2018 阅读(702) 评论(0) 推荐(0) 编辑
摘要: 001、字典实现 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试数据 >scaffold_1 CCCGGGTAAAACGGGTCTTCAAGAAAACGCTC 阅读全文
posted @ 2022-08-09 11:41 小鲨鱼2018 阅读(78) 评论(0) 推荐(0) 编辑