会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小鲨鱼2018
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
106
107
108
109
110
111
112
113
114
···
403
下一页
2023年7月7日
linux 中实现将指定列中多个连续的字符压缩为一个字符
摘要: 001、 (base) [b20223040323@admin2 test]$ ls a.txt (base) [b20223040323@admin2 test]$ cat a.txt ## 测试数据 gene exon exon exon exon gene exon exon gene exo
阅读全文
posted @ 2023-07-07 08:48 小鲨鱼2018
阅读(27)
评论(0)
推荐(0)
2023年7月6日
python 中 文件系统 OS 模块
摘要: 001、列出当前的工作路径 >>> import os ## 导入os模块 >>> os.getcwd() ## 列出当前的工作路径 '/home/test02' 02、改变工作路径 >>> os.getcwd() '/home/test02' >>> os.chdir("/home/test03"
阅读全文
posted @ 2023-07-06 23:35 小鲨鱼2018
阅读(16)
评论(0)
推荐(0)
samtools 的常用命令
摘要: 001、生成统计文件 [root@PC1 test01]# ls ## 测试bam文件 SRR21814498.sorted.bam [root@PC1 test01]# samtools flagstat SRR21814498.sorted.bam > stat.txt ## 生成统计文件 [r
阅读全文
posted @ 2023-07-06 20:54 小鲨鱼2018
阅读(492)
评论(0)
推荐(0)
linux 中根据指定列 删除重复行
摘要: 001、 [root@PC1 test02]# ls a.txt [root@PC1 test02]# cat a.txt ## 测试数据 ID=gene-ABCC1 a 6121 ID=gene-ABCC1 b 6121 ID=gene-JFEE3 j 876 ID=gene-ABCC5 c 57
阅读全文
posted @ 2023-07-06 12:00 小鲨鱼2018
阅读(129)
评论(0)
推荐(0)
2023年7月5日
linux 中 sed命令的 -s选项
摘要: 001、-s用于指定输出的间隔符 [root@PC1 test02]# seq 10 ## 默认输出分隔符为换行符 1 2 3 4 5 6 7 8 9 10 [root@PC1 test02]# seq -s " " 10 ## 指定空格为换行符 1 2 3 4 5 6 7 8 9 10 [root
阅读全文
posted @ 2023-07-05 21:45 小鲨鱼2018
阅读(541)
评论(0)
推荐(0)
linux 中 数组的常见操作
摘要: 001、创建数组 [root@PC1 test02]# ay=(1 2 3 4) ## 生成数组 [root@PC1 test02]# echo ${ay[*]} ## 输出数组 1 2 3 4 [root@PC1 test02]# echo ${#ay[*]} ## 输出数组的长度 4 002、
阅读全文
posted @ 2023-07-05 18:11 小鲨鱼2018
阅读(259)
评论(0)
推荐(0)
linux 中根据列的不同类别输出指定列的最小值、最大值以及平均值
摘要: 001、最大值和最小值 [root@PC1 test03]# ls a.txt [root@PC1 test03]# cat a.txt ## 测试数据 a 6 a 9 a 7 b 5 b 10 b 5 b 9 c 5 c 3 c 4 c 1 ## 根据第一列输出最大值 [root@PC1 test
阅读全文
posted @ 2023-07-05 08:33 小鲨鱼2018
阅读(237)
评论(0)
推荐(0)
2023年7月4日
linux 中判断一列数据是否连续递增
摘要: 001、 [root@PC1 test03]# ls a.txt b.txt [root@PC1 test03]# cat a.txt ## 测试数据连续递增 1 2 3 4 5 6 [root@PC1 test03]# cat b.txt ## 测试数据,非连续递增 1 2 3 5 6 [root
阅读全文
posted @ 2023-07-04 22:42 小鲨鱼2018
阅读(127)
评论(0)
推荐(0)
linux 中ls命令实现对文件的排序
摘要: 001、ls默认是按照文件名称顺序列出的 [root@PC1 test02]# ls ## 测试文件 a.txt b.txt c.txt [root@PC1 test02]# ls -l ## 默认按照文件名称顺序 total 125000 -rw-r--r--. 1 root root 15360
阅读全文
posted @ 2023-07-04 19:58 小鲨鱼2018
阅读(1039)
评论(0)
推荐(0)
2023年7月3日
python中文件读取read、指针位置tell、移动指针seek函数
摘要: 001、文件对象read读入文件 >>> in_file = open("a.txt", "r") >>> in_file.read() ## 'abcd\nefgh\ni\n' 002、文件对象tell 返回指针再文件中的位置 >>> in_file = open("a.txt", "r") ##
阅读全文
posted @ 2023-07-03 18:11 小鲨鱼2018
阅读(475)
评论(0)
推荐(0)
上一页
1
···
106
107
108
109
110
111
112
113
114
···
403
下一页
公告