02 2024 档案

摘要:001、ncbi官网 002、 选择genome;输出物种名,然后点击search搜索 003、 选择要下载的参考基因组 004、 依次点击1和2 005、进入下载页面 。 阅读全文
posted @ 2024-02-29 11:13 小鲨鱼2018 阅读(176) 评论(0) 推荐(0) 编辑
摘要:linux 中条件测试 case 语句。 case语句用于多重判断匹配;若匹配成功,则执行相关的命令,并结束整个条件测试;若匹配不成功,则执行默认的命令; linux shell 中case 条件判断的首个单词是case, 第一句的结束是 in; 单项匹配判断的结尾是); 单项匹配的结束时两个分号; 阅读全文
posted @ 2024-02-28 08:42 小鲨鱼2018 阅读(66) 评论(0) 推荐(0) 编辑
摘要:linux shell 中实现进度条: #! /bin/bash total_steps=100 for ((step=1; step<=total_steps; step++)); do printf "\r[%-50s] %d%%" $(printf "#%.0s" $(seq 1 $((ste 阅读全文
posted @ 2024-02-27 11:53 小鲨鱼2018 阅读(403) 评论(0) 推荐(0) 编辑
摘要:linux 中 printf "\r" 选项的作用 使用printf "\r"将光标移动到当前行的开头,用新文本覆盖掉同一行之前的文本内容。 阅读全文
posted @ 2024-02-27 11:24 小鲨鱼2018 阅读(87) 评论(0) 推荐(0) 编辑
摘要:001、设置占位长度 [root@pc1 test1]# printf "%s\n" "abc" ## 一般输出 abc [root@pc1 test1]# printf "%20s\n" "abc" ## 设置占位长度20,默认情况下是右对齐 abc [root@pc1 test1]# print 阅读全文
posted @ 2024-02-27 10:04 小鲨鱼2018 阅读(86) 评论(0) 推荐(0) 编辑
摘要:001、不加参数对比 [root@pc1 test1]# ls ## 测试文件及目录 dir1 dir2 dir3 dir4 file1 file2 [root@pc1 test1]# du -sh ## 输出了当前目录的所有目录及文件的总的大小 1.3G . [root@pc1 test1]# d 阅读全文
posted @ 2024-02-25 12:07 小鲨鱼2018 阅读(1120) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test1]# ls ## 测试文件及目录 dir1 dir2 dir3 dir4 file1 file2 [root@pc1 test1]# du -ch ## 显示所有文件及目录的大小 220M ./dir1 530M ./dir2 6.6M ./dir3/dir0 阅读全文
posted @ 2024-02-25 11:54 小鲨鱼2018 阅读(152) 评论(0) 推荐(0) 编辑
摘要:001、首选测试awk中getline这个动作 做了什么 a、 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试数据 01 02 03 04 05 06 kk 07 08 09 10 11 12 13 14 [root@pc1 阅读全文
posted @ 2024-02-23 09:46 小鲨鱼2018 阅读(27) 评论(0) 推荐(0) 编辑
摘要:001、sin 正玄; 直角三角形对边除以斜边;awk的sin函数用于计算正玄,但是单位是弧度; 角度和弧度的转换关系为:角度 * π / 180 = 弧度 如下示例计算30度角和60度角的正玄值: [root@pc1 test1]# echo | awk '{print sin(30 * 3.14 阅读全文
posted @ 2024-02-23 09:45 小鲨鱼2018 阅读(54) 评论(0) 推荐(0) 编辑
摘要:001、awk中sub函数的用法:sub用于替换,其语法如下: a、 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试数据 abcdxabcd abcd xyz qmn opqriytyx abcd uny een abcdka 阅读全文
posted @ 2024-02-23 09:44 小鲨鱼2018 阅读(1648) 评论(0) 推荐(0) 编辑
摘要:001、显示所有的节点信息 (base) [b20223040323@admin1 x_batch2_116]$ scontrol show node | head ## 显示所有的节点信息,并显示前10行 002、显示指定的节点信息 (base) [b20223040323@admin1 x_ba 阅读全文
posted @ 2024-02-22 11:56 小鲨鱼2018 阅读(169) 评论(0) 推荐(0) 编辑
摘要:001、sacct 直接使用:显示24小时内的任务信息 (base) [b20223040323@admin1 x_batch2_116]$ sacct 002、 显示具体的某一任务信息 (base) [b20223040323@admin1 x_batch2_116]$ sacct -j 5996 阅读全文
posted @ 2024-02-22 11:42 小鲨鱼2018 阅读(419) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 abcdabcd xyabdada kkkrrrtt faaafert [root@PC1 test1]# sed -r 's/(.*)(a)(.*$)/\1\3/ 阅读全文
posted @ 2024-02-21 15:01 小鲨鱼2018 阅读(255) 评论(0) 推荐(0) 编辑
摘要:001、ARGC :命令行参数数组ARGV中元素的个数(c:count; v:variable) [root@PC1 test1]# ls a.txt b.txt [root@PC1 test1]# awk '{print ARGC}' a.txt ## ARGC:表示命令行参数数组ARGV中元素的 阅读全文
posted @ 2024-02-20 23:10 小鲨鱼2018 阅读(5) 评论(0) 推荐(0) 编辑
摘要:001、-I [root@PC1 test1]# ls 1.txt 2.txt 3.txt dir01 [root@PC1 test1]# find *.txt | xargs -I {} mv {} dir01/ ## -I 将前边的变量存储至{},便于后续处理 [root@PC1 test1]# 阅读全文
posted @ 2024-02-20 18:25 小鲨鱼2018 阅读(170) 评论(0) 推荐(0) 编辑
摘要:001、字符串首字母转换为大写;以及全部转换为大写 [root@PC1 test1]# str1="abcde" ## 测试字符串 [root@PC1 test1]# echo ${str1^} ## 首字母转换为大写 Abcde [root@PC1 test1]# echo ${str1^^} # 阅读全文
posted @ 2024-02-20 18:22 小鲨鱼2018 阅读(10) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 tmp]# echo {1..30}|xargs printf "%02d %03d\n" 01 002 ## xargs 标准化输出参数 03 004 05 006 07 008 09 010 11 012 13 014 15 016 17 018 19 020 21 阅读全文
posted @ 2024-02-20 18:18 小鲨鱼2018 阅读(20) 评论(0) 推荐(0) 编辑
摘要:linux 中 条件判断中 -r; -n选项; 001、-r选项用于判断文件是否拥有读的权限;测试如下: a、root用户 [root@pc1 test1]# ls a.sh [root@pc1 test1]# ll -h ## 文件a.sh没有任何权限 total 4.0K . 1 root ro 阅读全文
posted @ 2024-02-20 16:26 小鲨鱼2018 阅读(120) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试文件 abcdaaa kaass aa [root@pc1 test1]# sed 's/a/Q/g' a.txt ##加g; 默认是全部替换 QbcdQQQ kQQss 阅读全文
posted @ 2024-02-20 15:34 小鲨鱼2018 阅读(47) 评论(0) 推荐(0) 编辑
摘要:4种; 01、bash a.sh 02、sh a.sh 03、. a.sh 04、source 前两种会重开shell终端; 后两种是本shell; 测试如下: 001、测试前两种方法;不影响当前路径 [root@pc1 test1]# ls a.sh [root@pc1 test1]# pwd # 阅读全文
posted @ 2024-02-20 15:14 小鲨鱼2018 阅读(19) 评论(0) 推荐(0) 编辑
摘要:001、问题 shell终端下,双引号内输出!报错 [root@pc1 test1]# echo "hello world!" -bash: !": event not found 002、问题原因 终端中! 表示执行历史命令。 003、解决方法 a、使用单引号 [root@pc1 test1]# 阅读全文
posted @ 2024-02-20 14:48 小鲨鱼2018 阅读(34) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试文本 aa bb cc kk ee ss ff uu zz vv ee ww ## sed预存储抽取文件的第一列 [root@pc1 test1]# sed -r 's/ 阅读全文
posted @ 2024-02-20 12:25 小鲨鱼2018 阅读(48) 评论(0) 推荐(0) 编辑
摘要:-r:其中一项作用是保证字符为其本身字符; 没有-r字符具有正则意义; 如下例子: 001、 一下命令用于sed删除开头的空格 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试文本 01 02 03 04 05 06 07 08 阅读全文
posted @ 2024-02-20 11:38 小鲨鱼2018 阅读(729) 评论(0) 推荐(0) 编辑
摘要:001、输出偶数行 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试文本 01 01 02 02 03 03 04 04 05 05 06 06 07 07 08 08 09 09 10 10 [root@pc1 test1]# 阅读全文
posted @ 2024-02-20 11:01 小鲨鱼2018 阅读(184) 评论(0) 推荐(0) 编辑
摘要:001、整体重复 a、 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试文本 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 [root@pc1 test1 阅读全文
posted @ 2024-02-20 10:51 小鲨鱼2018 阅读(7) 评论(0) 推荐(0) 编辑
摘要:001、 -c: complement:表示取补集; -d:delete:表示删除 [root@pc1 test1]# echo "ab,123.cd-458fqq" | tr -dc [[:digit:]] | sed 's/$/\n/' ## 删除所有数字的补集,则剩下数字 123458 [ro 阅读全文
posted @ 2024-02-19 17:37 小鲨鱼2018 阅读(43) 评论(0) 推荐(0) 编辑
摘要:001、$RANDOM (0~32767的随机数) a、 [root@pc1 test1]# echo $RANDOM ## 直接输出 31128 [root@pc1 test1]# echo $RANDOM 2539 [root@pc1 test1]# echo $RANDOM 23307 b、限 阅读全文
posted @ 2024-02-19 17:16 小鲨鱼2018 阅读(234) 评论(0) 推荐(0) 编辑
摘要:001、方式1 [root@pc1 test1]# awk 'BEGIN{print 10 + 5}' 15 [root@pc1 test1]# awk 'BEGIN{print 10 / 5}' 2 002、方式2 [root@pc1 test1]# echo | awk '{print 10 + 阅读全文
posted @ 2024-02-19 16:56 小鲨鱼2018 阅读(66) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试文本 33 ff su ii aa kk ff dd sU jj kk ff aa Su ee aa SU kk ff xx ad sk uu ff [root@pc1 阅读全文
posted @ 2024-02-19 15:34 小鲨鱼2018 阅读(79) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试文本 dd ff iiabcjjj ff aa qq aaabcabcabckk aa abc ff uuu aa abcabcabcabcjj kk uu [root@ 阅读全文
posted @ 2024-02-19 15:29 小鲨鱼2018 阅读(66) 评论(0) 推荐(0) 编辑
摘要:0:找到匹配模式 1:未找到匹配模式 2:指定的输入文件不对 001、 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试文本 aa bb cc 11 aa 33 33 dd bb [root@pc1 test1]# grep " 阅读全文
posted @ 2024-02-19 15:05 小鲨鱼2018 阅读(391) 评论(0) 推荐(0) 编辑
摘要:001、while循环:条件满足一直执行 [root@pc1 test1]# i=1 ## 条件满足,一直执行 [root@pc1 test1]# while [[ $i -le 3 ]]; do echo $i; i=$((i+1)); done 1 2 3 002、until循环;条件不满足一直 阅读全文
posted @ 2024-02-19 12:05 小鲨鱼2018 阅读(99) 评论(0) 推荐(0) 编辑
摘要:001、for循环:for循环的终止条件在for语句后面已经提前已知 [root@pc1 test1]# for ((i = 1; i <= 3; i++)); do echo $i; done ## 终止条件i <= 3; i的变化规律;提前已知 1 2 3 002、while循环; while循 阅读全文
posted @ 2024-02-19 11:59 小鲨鱼2018 阅读(25) 评论(0) 推荐(0) 编辑
摘要:001、-a: 后跟一个变量,该变量会被认为是个数组,然后给其赋值,默认是以空格为分割符。 [root@pc1 test1]# read -a ay1 ## -a数据读入数组变量 aa bb cc 100 800 [root@pc1 test1]# echo $ay1 aa [root@pc1 te 阅读全文
posted @ 2024-02-19 11:23 小鲨鱼2018 阅读(379) 评论(0) 推荐(0) 编辑
摘要:001、let [root@pc1 test1]# a=1 [root@pc1 test1]# echo $a 1 [root@pc1 test1]# let a=$a+50 ## 数值变量递加 [root@pc1 test1]# echo $a 51 002、使用括号(()) [root@pc1 阅读全文
posted @ 2024-02-19 10:26 小鲨鱼2018 阅读(42) 评论(0) 推荐(0) 编辑
摘要:通常更推荐使用双方引号。 001、双方引号可以避免变量的单词分割 [root@pc1 test1]# str1="aa bb" ## 测试字符串 [root@pc1 test1]# if [[ $str1 == "aa bb" ]]; then echo "yes"; fi ## 双边引号不用担心变 阅读全文
posted @ 2024-02-19 09:17 小鲨鱼2018 阅读(11) 评论(0) 推荐(0) 编辑
摘要:内部字符单分隔符(Internal Field Separator,IFS) 是一个系统环境变量; 无法使用echo $IFS进行查看 001、查看IFS [root@pc1 test1]# set | grep "^IFS" ## 系统默认的IFS IFS=$' \t\n' [root@pc1 t 阅读全文
posted @ 2024-02-19 09:12 小鲨鱼2018 阅读(87) 评论(2) 推荐(0) 编辑
摘要:001、 (base) [b20223040323@admin1 test2]$ ls test.txt (base) [b20223040323@admin1 test2]$ cat test.txt ## 测试数据如下;根据第一列和第三列对数据进行去重复 ID=gene-RIN1 rna-XM_ 阅读全文
posted @ 2024-02-18 10:08 小鲨鱼2018 阅读(99) 评论(0) 推荐(0) 编辑
摘要:next 是跳过当前行(awk自身是列循环和行循环的结合); continue是跳过当前循环(跳过列循环); 001、next;跳过当前行 (base) [b20223040323@admin1 test2]$ ls a.txt (base) [b20223040323@admin1 test2]$ 阅读全文
posted @ 2024-02-18 10:05 小鲨鱼2018 阅读(178) 评论(0) 推荐(0) 编辑
摘要:001、 (base) [b20223040323@admin1 test2]$ cat 003.txt ## 测试数据如下,第一列有多个项,且部分项有重复,实现根据第三列筛选出最大的项 ID=gene-TRNAC-GCA rna-TRNAC-GCA 72 ID=gene-ATP5O rna-XM_ 阅读全文
posted @ 2024-02-18 09:07 小鲨鱼2018 阅读(276) 评论(0) 推荐(0) 编辑
摘要:\b表示限位符,\B表示与\b相反的匹配 01、\b [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt ## 测试数据 ab xyky 3d ma abki ff ec dfab ff fg ab kk ad ff ab ad fabe j 阅读全文
posted @ 2024-02-17 20:24 小鲨鱼2018 阅读(257) 评论(0) 推荐(0) 编辑
摘要:01、先排序,然后取首尾(数据大时不适用) [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试文件 8 3 39 28 2 4 6 [root@pc1 test1]# sort -n a.txt | head -n 1 ## 最小 阅读全文
posted @ 2024-02-17 15:39 小鲨鱼2018 阅读(254) 评论(0) 推荐(0) 编辑
摘要:001、问题: gatk DBI 模块在 sheep 1号染色体(其他染色体同样的命令并没有报错;一共134 sheep个体)调用GenotypeGVCFs 命令call snps时出现如下报错: 002、问题原因 it looks like we are hitting the limits of 阅读全文
posted @ 2024-02-16 12:10 小鲨鱼2018 阅读(23) 评论(0) 推荐(0) 编辑
摘要:001、将每行的首字母大写 a、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文件 aa bb cc dd ee ff gg hh qq [root@PC1 test1]# sed 's/^[a-z]/\U&/' a.txt 阅读全文
posted @ 2024-02-15 17:51 小鲨鱼2018 阅读(86) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 aa bb ee 33 ff rr aa ff yy [root@PC1 test1]# awk 'NR == 2 {printf("%s\t%d\n", $2, 阅读全文
posted @ 2024-02-15 17:50 小鲨鱼2018 阅读(32) 评论(0) 推荐(0) 编辑
摘要:001、print函数 a、简单输出 > print(100) ## 输出数值 [1] 100 > print("abcd") ## 输出字符串 [1] "abcd" b、输出变量 > a <- 100 > b <- "xyz" > print(a) ## 输出数值变量 [1] 100 > prin 阅读全文
posted @ 2024-02-15 10:23 小鲨鱼2018 阅读(1036) 评论(0) 推荐(0) 编辑
摘要:001、测试数据 [b20223040323@admin1 test]$ ls x_gather_pav.txt [b20223040323@admin1 test]$ cat x_gather_pav.txt ## 测试数据;每一行是一个个体;每一列是一个基因;矩阵中的0表示基因在这个个体中缺失, 阅读全文
posted @ 2024-02-12 13:12 小鲨鱼2018 阅读(15) 评论(0) 推荐(0) 编辑
摘要:001、方法1 双文件 [root@PC1 test1]# ls a.txt cols.list [root@PC1 test1]# cat cols.list ## 列 1 3 5 8 [root@PC1 test1]# cat a.txt ## 测试文件 001 002 003 004 005 阅读全文
posted @ 2024-02-10 23:32 小鲨鱼2018 阅读(162) 评论(0) 推荐(0) 编辑
摘要:001、直接合并 [root@PC1 test1]# str1=aa [root@PC1 test1]# str2=bb ## 测试字符串 [root@PC1 test1]# str3=$str1$str2 ## 直接合并 [root@PC1 test1]# echo $str3 ## 输出合并结果 阅读全文
posted @ 2024-02-10 23:09 小鲨鱼2018 阅读(76) 评论(0) 推荐(0) 编辑
摘要:001、字符串转换为shell数组 [root@PC1 test1]# str1="aa bb 100 200 500" ## 生成测试字符串 [root@PC1 test1]# echo $str1 aa bb 100 200 500 [root@PC1 test1]# ay1=($str1) # 阅读全文
posted @ 2024-02-10 22:43 小鲨鱼2018 阅读(531) 评论(0) 推荐(0) 编辑
摘要:001、字符串变量传入awk,然后转换为数组 [root@PC1 test1]# str1="1 3 7 8" ## 测试字符串 [root@PC1 test1]# awk -v a="$str1" 'BEGIN{split(a, ay1, " "); print length(ay1)}' ## 阅读全文
posted @ 2024-02-10 22:27 小鲨鱼2018 阅读(54) 评论(0) 推荐(0) 编辑
摘要:001、先看整体结构 [root@PC1 test1]# ls ## 测试文件及目录 a.txt test001 test002 test003 [root@PC1 test1]# tree -h ## 查看结构和各个文件的大小 . ├── [ 59] a.txt ├── [ 30] test001 阅读全文
posted @ 2024-02-10 20:08 小鲨鱼2018 阅读(128) 评论(0) 推荐(0) 编辑
摘要:001、 -w选项锁定 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 3432 dsab45cdf 887 abc 33333 77777 sdf fffabc 8888 ddd kk22,kk33k wwww sss 阅读全文
posted @ 2024-02-10 19:00 小鲨鱼2018 阅读(41) 评论(0) 推荐(0) 编辑
摘要:\w ## 匹配文字和数字字符,也就是[A-Za-z0-9], \W ## \w的反置形式,匹配一个或多个非单词字符,如点号句号等。 01、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 3432 dsab45cdf 8 阅读全文
posted @ 2024-02-10 19:00 小鲨鱼2018 阅读(164) 评论(0) 推荐(0) 编辑
摘要:001、 -a: 显示所有目录及文件的大小 [root@PC1 test1]# ls ## 测试文件及目录 a.txt test001 test002 test003 [root@PC1 test1]# du -ah ## 输出所有文件及目录的大小 4.0K ./a.txt 1000M ./test 阅读全文
posted @ 2024-02-10 17:04 小鲨鱼2018 阅读(36) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试文件 yy 33 gg ss ff 11 zz mm dd 88 44 cc [root@PC1 test]# awk 'NF' a.txt ## 每行重复1次 yy 33 阅读全文
posted @ 2024-02-10 12:07 小鲨鱼2018 阅读(37) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 444 777 222 999 eee 333 222 666 111 ggg sss fff zzz mmm nnn rrr ttt hhh [root@PC1 te 阅读全文
posted @ 2024-02-10 10:49 小鲨鱼2018 阅读(17) 评论(0) 推荐(0) 编辑
摘要:001、 a、总变量传入 [root@PC1 test1]# ls ## 测试文件及目录 a.txt b.txt c.csv test [root@PC1 test1]# tree ## 查看目录结构 . ├── a.txt ├── b.txt ├── c.csv └── test 1 direct 阅读全文
posted @ 2024-02-09 21:15 小鲨鱼2018 阅读(100) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test]# ls a.txt b.txt c.txt x.ped y.ped z.ped [root@PC1 test]# du -sh * ## 显示每个文件的大小 30M a.txt 60M b.txt 200M c.txt 20M x.ped 100M y.pe 阅读全文
posted @ 2024-02-09 18:37 小鲨鱼2018 阅读(14) 评论(0) 推荐(0) 编辑
摘要:001、 Linux 中awk命令批量提取多个非连续的行 [root@PC1 test]# ls a.txt lines.list [root@PC1 test]# cat a.txt ## 测试文件 eree fff 1 saaf eee 2 xxxe kkk 3 zzzz mmm 4 2222 阅读全文
posted @ 2024-02-09 12:26 小鲨鱼2018 阅读(48) 评论(0) 推荐(0) 编辑
摘要:Linux 中 如何将文本中最后一个指定的字符串替换为指定的内容 阅读全文
posted @ 2024-02-09 12:24 小鲨鱼2018 阅读(50) 评论(0) 推荐(0) 编辑
摘要:001、纯数字 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 sdf324 7fy323td34 342 fff 435 tih 6334 s234dfg65 [root@PC1 test1]# grep "^[0-9] 阅读全文
posted @ 2024-02-09 12:24 小鲨鱼2018 阅读(122) 评论(0) 推荐(0) 编辑
摘要:001、linux 中 awk命令输出文本的前几列 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt ## 测试文本 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 2 阅读全文
posted @ 2024-02-08 22:06 小鲨鱼2018 阅读(286) 评论(0) 推荐(0) 编辑
摘要:001、linux 中如何输出文本的最后几列 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt ## 测试文本 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 2 阅读全文
posted @ 2024-02-08 21:59 小鲨鱼2018 阅读(69) 评论(0) 推荐(0) 编辑
摘要:001、命令程序: ## step1: 处理 read1 awk 'END{tmp = NR / 4; split(FILENAME, a, "_"); for (i = 1; i <= tmp; i++) {print "@"a[1]"."i,i"/1"}}' name_1.clean.fastq 阅读全文
posted @ 2024-02-08 20:25 小鲨鱼2018 阅读(62) 评论(0) 推荐(0) 编辑
摘要:1、rev + sed实现 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 edab34aberabr dfjhdsfffgggd abdfabdfereab dfabereabfabe [root@PC1 test1]# 阅读全文
posted @ 2024-02-08 19:24 小鲨鱼2018 阅读(560) 评论(0) 推荐(0) 编辑
摘要:001、问题bwa报错如下: paired reads have different names: 002、解决方法,对fastq文件的read名进行重命名 脚本如下: ## step1: 处理 read1 awk 'END{tmp = NR / 4; split(FILENAME, a, "_") 阅读全文
posted @ 2024-02-07 20:04 小鲨鱼2018 阅读(91) 评论(0) 推荐(0) 编辑
摘要:Linux 中添加空行和删除空行 阅读全文
posted @ 2024-02-07 18:04 小鲨鱼2018 阅读(13) 评论(0) 推荐(0) 编辑
摘要:fastq-dump --split-files 和 fastq-dump --split-3 的区别和联系 阅读全文
posted @ 2024-02-07 17:46 小鲨鱼2018 阅读(142) 评论(0) 推荐(0) 编辑
摘要:001、find命令仅仅列出文件,不包括目录 a、 [root@PC1 test1]# ls ## 测试目录 dir001 dir002 dir003 file1.map file1.txt file2.map file2.txt [root@PC1 test1]# find -type f ## 阅读全文
posted @ 2024-02-07 12:49 小鲨鱼2018 阅读(93) 评论(0) 推荐(0) 编辑
摘要:001、awk输出最后的两个字符 a、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试数据 325dsfd3248 fdsfgeiuyeer sfdgdgherc [root@PC1 test1]# awk -F "" '{p 阅读全文
posted @ 2024-02-07 11:12 小鲨鱼2018 阅读(450) 评论(0) 推荐(0) 编辑
摘要:1、tr实现 a、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 ab cd EF Gh ij KL [root@PC1 test1]# cat a.txt | tr "A-Z" "a-z" ## 全部转换为小写 ab 阅读全文
posted @ 2024-02-06 17:09 小鲨鱼2018 阅读(220) 评论(0) 推荐(0) 编辑
摘要:001、一般去重复 [root@PC1 test01]# ls a.txt [root@PC1 test01]# cat a.txt ## 测试文本 c d c a b b [root@PC1 test01]# cat a.txt | sort | uniq ## 去重复后也排序了 a b c d 阅读全文
posted @ 2024-02-06 10:41 小鲨鱼2018 阅读(34) 评论(0) 推荐(0) 编辑
摘要:001、 阅读全文
posted @ 2024-02-05 11:56 小鲨鱼2018 阅读(70) 评论(0) 推荐(0) 编辑
摘要:Linux 中如何给指定的目录或者文件设置访问密码 阅读全文
posted @ 2024-02-05 08:26 小鲨鱼2018 阅读(227) 评论(0) 推荐(0) 编辑
摘要:linux 中实现文本一列按照指定列数输出 阅读全文
posted @ 2024-02-04 22:00 小鲨鱼2018 阅读(19) 评论(0) 推荐(0) 编辑
摘要:001、删除奇数行 a、sed实现 [root@PC1 test01]# ls a.txt [root@PC1 test01]# cat a.txt ## 测试数据 1 01 02 2 03 04 3 05 06 4 07 08 5 09 10 6 11 12 7 13 14 8 15 16 9 1 阅读全文
posted @ 2024-02-04 20:48 小鲨鱼2018 阅读(197) 评论(0) 推荐(0) 编辑
摘要:linux 中实现统计管道符导入所有文件总的大小。 阅读全文
posted @ 2024-02-04 20:44 小鲨鱼2018 阅读(9) 评论(0) 推荐(0) 编辑
摘要:001、正常输出文件信息 [root@PC1 test1]# ls ## 测试文件 a.txt b.csv b.ped b.txt [root@PC1 test1]# ls -lh ## 正常输出文件信息 total 190M -rw-r--r--. 1 root root 20M Feb 9 09 阅读全文
posted @ 2024-02-04 20:44 小鲨鱼2018 阅读(13) 评论(0) 推荐(0) 编辑
摘要:001、问题 htsjdk.samtools.SAMFormatException: SAM validation error: ERROR::READ_GROUP_NOT_FOUND:Record 124082463, Read name SRR11176426.101884444, RG ID 阅读全文
posted @ 2024-02-04 20:11 小鲨鱼2018 阅读(84) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试数据 a 8 b 8 a 4 a 6 b 2 c 8 c 1 ## 利用awk数组进行统计 [root@pc1 test1]# awk '{ay1[$1]++; ay2[ 阅读全文
posted @ 2024-02-01 09:52 小鲨鱼2018 阅读(68) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示