上一页 1 ··· 76 77 78 79 80 81 82 83 84 ··· 367 下一页
摘要: 001、 >>> str1 = "ab" ## 测试字符串 >>> str1 'ab' >>> str1.ljust(10) ## 调整宽度为10, 左侧对齐, 默认用空格填充 'ab ' >>> str1.ljust(10, "+") ## 设置用+号填充 'ab++++++++' >>> str 阅读全文
posted @ 2023-06-08 20:52 小鲨鱼2018 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 001、 >>> list1 = [111, 222, 333] >>> list1 [111, 222, 333] >>> list1 = [str(i) for i in list1] ## 将列表中数值转换为字符串 >>> list1 ['111', '222', '333'] 阅读全文
posted @ 2023-06-08 20:35 小鲨鱼2018 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 001、 [root@PC1 test04]# ls a.txt [root@PC1 test04]# cat a.txt ## 测试数据 3333 gene 9999 kkkk gene 7777 8888 gene gene 0000 6666 ## 输出匹配字符及其下一行 [root@PC1 阅读全文
posted @ 2023-06-08 18:28 小鲨鱼2018 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 001、 [root@PC1 test04]# ls a.txt [root@PC1 test04]# cat a.txt ## 测试数据 3333 gene 9999 kkkk gene 7777 8888 gene 0000 6666 [root@PC1 test04]# sed -n '/ge 阅读全文
posted @ 2023-06-08 18:15 小鲨鱼2018 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 001、 [root@PC1 test04]# ls a.txt [root@PC1 test04]# cat a.txt ## 测试数据 3333 gene 9999 kkkk gene 7777 8888 gene 0000 6666 [root@PC1 test04]# awk '$1 == 阅读全文
posted @ 2023-06-08 18:10 小鲨鱼2018 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 001、 [b20223040323@admin2 test]$ ls a.gff [b20223040323@admin2 test]$ cat a.gff region 1 pseudogene 2 transcript 3 exon 4 pseudogene 5 transcript 6 ex 阅读全文
posted @ 2023-06-08 00:33 小鲨鱼2018 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 001、 >>> str1 = "abcdaaab" ## 测试字符串 >>> str1.count("a") ## 统计a出现的次数 4 >>> str1.count("b") 2 >>> str1.count("c") 1 >>> str1.count("a", 0, 4) ## 可以指定统计字 阅读全文
posted @ 2023-06-07 23:19 小鲨鱼2018 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 001、全部转换为大写、或者全部转换为小写 >>> str1 = "abcDEFgh" >>> str1.lower() ### 小写 'abcdefgh' >>> str1.upper() ## 大写 'ABCDEFGH' >>> str1 'abcDEFgh' >>> str1.casefold 阅读全文
posted @ 2023-06-07 22:34 小鲨鱼2018 阅读(260) 评论(0) 推荐(0) 编辑
摘要: conda create -n py27 python=2.7 conda activate py27 conda install -c conda-forge r-base=4.3.0 R if (!require("BiocManager", quietly = TRUE)) install.p 阅读全文
posted @ 2023-06-07 21:28 小鲨鱼2018 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 001、 >>> list1 = ["aa", "bb", "cc", "dd", "ee", "ff", "gg"] ## 测试列表 >>> list1 ['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg'] >>> list1[2:] ## 从2开始,一直到最 阅读全文
posted @ 2023-06-07 16:25 小鲨鱼2018 阅读(143) 评论(0) 推荐(0) 编辑
上一页 1 ··· 76 77 78 79 80 81 82 83 84 ··· 367 下一页