05 2023 档案
摘要:两者都返回首次匹配字符串的索引,re.match函数只从头开始匹配, re.search函数不限制只从头开始匹配。 001、re.match函数 [root@PC1 test2]# python3 Python 3.10.9 (main, Mar 1 2023, 18:23:06) [GCC 11.
阅读全文
摘要:001、判断文件是否存在 (base) [root@PC1 test4]# ls a.txt dir01 (base) [root@PC1 test4]# if [ -e a.txt ]; then echo "exist"; fi ## 判断文件是否存在 exist (base) [root@PC
阅读全文
摘要:001、代码 dat <- c(3, 8, 2, 9, 4) k <- barplot(dat, axes = FALSE, ylim = c(-4, 10) ,names.arg = FALSE) axis(2, at = seq(0, 10, 2)) label <- paste0("label
阅读全文
摘要:001、将所有的小写字母转换为大写 [root@PC1 test4]# ls a.txt [root@PC1 test4]# cat a.txt ## 测试数据 abd mnj uyr XDE THR QYE cvb Ddg gyi [root@PC1 test4]# sed 's/[a-z]/\U
阅读全文
摘要:001、 [root@PC1 test3]# ls test1 test2 [root@PC1 test3]# tree ## 测试数据 . ├── test1 │ └── a.txt └── test2 └── b.txt 2 directories, 2 files [root@PC1 test
阅读全文
摘要:001、 [root@PC1 test4]# ls a.txt [root@PC1 test4]# cat a.txt ## 测试数据 aa bb cc dd kk jj ee uu rr [root@PC1 test4]# sed -n l a.txt aa bb cc$ dd\tkk\tjj$
阅读全文
摘要:001、 [root@PC1 test4]# ls a.txt [root@PC1 test4]# cat a.txt ## 测试数据 ee ff 88 fff aa ff uuk fff uuuu kkk yyy fff kkkk [root@PC1 test4]# awk '{print len
阅读全文
摘要:001、匹配空格 [root@PC1 test4]# ls a.txt [root@PC1 test4]# cat a.txt ## 测试数据 1_aa bb 2_ccdd 3_ee ff 4_gg hh kk [root@PC1 test4]# sed -n l a.txt ## 显示出空格和制表
阅读全文
摘要:001、计算纯合率 (base) [root@PC1 test]# ls outcome.bed outcome.fam outcome.map outcome.ped outcome.bim outcome.log outcome.nosex (base) [root@PC1 test]# (ba
阅读全文
摘要:001、测试数据 (base) [root@PC1 test]# ls ## 测试数据, plink格式 outcome.map outcome.ped (base) [root@PC1 test]# cat outcome.map 1 snp1 0 55910 1 snp2 0 85204 1 s
阅读全文
摘要:--max-missing 参数表示:最大的丢失率不超过 1-xxxx。 (base) [root@PC1 test]# ls outcome.map outcome.ped outcome.vcf (base) [root@PC1 test]# cat outcome.map 1 snp1 0 5
阅读全文
摘要:aaaa、#和%表示的是匹配删除 001、 # 表示从左侧删除匹配的字符, 单个#号表示非贪婪匹配, 两个#号表示贪婪匹配 [root@PC1 test]# ls [root@PC1 test]# var=http://www.aaa.com/123.htm ## 测试字符串 [root@PC1 t
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt b.txt c.txt [root@PC1 test]# find *.txt a.txt b.txt c.txt [root@PC1 test]# find *.txt | awk '{print "mv", $0, $0".bak"}
阅读全文
摘要:001、grep实现 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 234 fw3mh i86st sfg yzv e32kut zd7 utes eywq [root@PC1 test]# grep -o ".$" a.t
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 30 y 10 t 40 d 20 w ## 借助数组来实现 [root@PC1 test]# awk '{ay[NR] = $1; sum += $1} END {f
阅读全文
摘要:001、系统 [root@PC1 software]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) 002、安装依赖 [root@PC1 software]# yum install -y gcc libuuid-deve
阅读全文
摘要:官网:https://mamba.readthedocs.io/en/latest/installation.html 001、系统 [root@PC1 ~]# cat /etc/system-release CentOS Linux release 7.6.1810 (Core) 002、使用sh
阅读全文
摘要:001、系统 [root@PC1 software]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) 002、下载安装包 [root@PC1 software]# wget https://github.com/conda-
阅读全文
摘要:001、ES工程测试版(简称ES) 002、Genuine Intel(R) CPU 是:正式版(性能最好) 003、OEM:是CPU厂商专门为某个品牌生产并打上该品牌的字样的CPU
阅读全文
摘要:001、uname -m [root@PC1 ~]# uname -m x86_64 002、arch [root@PC1 ~]# arch x86_64 003、lscpu [root@PC1 ~]# lscpu
阅读全文
摘要:001、查看时区 [root@PC1 bin]# timedatectl status|grep 'Time zone' Time zone: Asia/Shanghai (CST, +0800) 002、查看当前时间 [root@PC1 bin]# date Mon May 22 01:15:22
阅读全文
摘要:001、 CPU发展至今存在着很多种架构:比如x86架构、ARM架构、MIPS架构、PowerPC架构等。 它们可以分为两类,即复杂指令集计算机(CISC,Complex Instruction Set Computer)和精简指令集计算机(RISC,Reduced Instruction Set
阅读全文
摘要:001、 X86: x86是指intel的开发的一种32位指令集, 官方文档里面称为“IA-32” 002、 AMD64: AMD抢跑了,比Intel率先制造出了商用的兼容x86的CPU,AMD称之为AMD64,同时兼容32位和64位。 003、 X86_64: intel不得不在时机落后的情况下也
阅读全文
摘要:001、测试命令 [root@PC1 test]# bamba bash: bamba: command not found... 002、内核 [root@PC1 test]# uname -a Linux PC1 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23
阅读全文
摘要:001、 [liujiaxin01@PC1 ~]$ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE 002、 [liujiaxin01@PC1 ~]$ docker search smoove 003、 [liujiaxin01@PC1 ~]
阅读全文
摘要:001、普通用户操作docker遇到如下问题 permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%
阅读全文
摘要:001、系统内核 [root@PC1 test01]# uname -a Linux PC1 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux 002、删除旧版本的docke
阅读全文
摘要:001、 [liujiaxin01@PC1 ~]$ docker search smcpp 002、pull [liujiaxin01@PC1 ~]$ docker run --rm -v $PWD:/mnt terhorst/smcpp:latest 003、列出镜像 [liujiaxin01@P
阅读全文
摘要:一、编译安装 001、安装D语言编译器 https://www.cnblogs.com/liujiaxin2018/p/17416628.html 002、安装GNU Scientific library(是一个 C 写成的用于科学计算的库,有超过1000个函数) [root@PC1 softwar
阅读全文
摘要:001、系统 [root@PC1 ~]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) [root@PC1 ~]# 002、测试D语言编译器 [root@PC1 ~]# dmd bash: dmd: command not
阅读全文
摘要:001、 [liujiaxin01@PC1 ~]$ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE ezlabgva/busco v5.4.7_cv1 a8c866d3a435 2 weeks ago 2.36GB brentp/smoove
阅读全文
摘要:https://busco.ezlab.org/busco_userguide.html#conda-package 001、 conda install -c conda-forge -c bioconda busco=5.4.7
阅读全文
摘要:001、系统 [root@PC1 software]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) 002、python版本 [root@PC1 software]# python3 --version Python 3.
阅读全文
摘要:001、列出所有环境 [root@PC1 software]# conda info -e # conda environments: # base * /root/anaconda3 busco-py3.7 /root/anaconda3/envs/busco-py3.7 002、进入指定环境 [
阅读全文
摘要:001、进入该目录 root@utuntu01:~# cd /etc/netplan/ ## 进入该目录 root@utuntu01:/etc/netplan# ls 01-network-manager-all.yaml root@utuntu01:/etc/netplan# 002、备份配置文件
阅读全文
摘要:001、 [root@PC1 test3]# ls a.txt [root@PC1 test3]# cat a.txt ## 测试文件 10 2 3 0 3 6 6 12 1 1 5 1 2 2 2 4 2 26 8 3 33 34 5 3 [root@PC1 test3]# python ## 启
阅读全文
摘要:001、生成基因名称的列表 awk -F "\t" '$3 == "gene" && $NF ~ /gene=/ {print $NF}' chr1.gff | sed 's/\(.*\)\(gene=[^;]\+\)\(.*\)/\2/' | sort | uniq > gene.list 002
阅读全文
摘要:001、 [root@PC1 test4]# ls a.txt [root@PC1 test4]# cat a.txt ## 测试数据 gbkey=mRNA;gene=ATP5O;model;evidence;Supporting [root@PC1 test4]# sed 's/\(.*\)\(g
阅读全文
摘要:001、 [root@PC1 ~]# pip config list 002、 [root@PC1 ~]# cd ~ [root@PC1 ~]# ls -a . .bash_history .bashrc .cshrc Documents .ICEauthority Music Public .tc
阅读全文
摘要:001、python版本 和 pip版本 a、python版本 [root@PC1 pip]# python --version Python 3.11.3 b、pip版本 [root@PC1 Python-3.11.3]# pip --version pip 23.1.2 from /usr/lo
阅读全文
摘要:001、在利用python2.7环境下利用pip安装pyfaidx模块时报如下错误: ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command out
阅读全文
摘要:python2.7中安装pip命令 001、 [root@PC1 test]# pip bash: pip: command not found... 002、 [root@PC1 test]# cat /etc/redhat-release 003、 [root@PC1 software]# cu
阅读全文
摘要:001 下载静态软件 wget https://github.com/shenwei356/seqkit/releases/download/v2.4.0/seqkit_linux_amd64.tar.gz 002、解压 tar -xzvf seqkit_linux_amd64.tar.gz 003
阅读全文
摘要:2>&1 & 0:标准输入 1:标准输出 2:标准错误输出 command 2>&1 > file.txt:将标准输出输出到file中,标准错误输出输出屏幕 command > file.txt 2>&1: 将标准错误输出 输出到标准输出中。 command 2> error.txt 1> righ
阅读全文
摘要:pscp属于putty软件下的命令。 001、从远端传输至本地 pscp root@192.168.254.130:/home/test/a.txt C:\Users\ljx\Desktop 002、从本地上传至远端 pscp C:\Users\ljx\Desktop\b.txt root@192.
阅读全文
摘要:001、如果可行,最方便, 直接生成fastq格式数据 fastq-dump --split-files SRR1770413 002、 a、下载sra格式数据 prefetch SRR1770413 b、转换为fastq格式 fastq-dump --gzip --split-files SRR1
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
阅读全文
摘要:001、从头向前,最短删除 [root@PC1 test]# var=GCF_000001735.4_TAIR10.1_genomic.fna [root@PC1 test]# echo $var GCF_000001735.4_TAIR10.1_genomic.fna [root@PC1 test
阅读全文
摘要:001、rename [root@PC1 test]# ls 1.csv 2.csv 3.csv a.txt b.txt c.txt [root@PC1 test]# rename ".txt" "" *.txt ## 删除.txt后缀 [root@PC1 test]# ls 1.csv 2.csv
阅读全文
摘要:001、在远程服务器终端生成公钥和私钥 [root@PC1 ~]# ssh-keygen -t rsa ## 执行该命令 Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/i
阅读全文
摘要:001、型号 [root@PC1 test]# cat /proc/cpuinfo | grep name | cut -f 2 -d: | uniq -c 6 12th Gen Intel(R) Core(TM) i5-12500H 6: 总核心数 12th:12代处理器 Gen:genunie,
阅读全文
摘要:001、总内存 [root@PC1 test]# free -h total used free shared buff/cache available Mem: 3.7G 830M 1.8G 38M 1.1G 2.5G Swap: 3.9G 0B 3.9G 002、总硬盘 [root@PC1 te
阅读全文
摘要:001、 投递该任务 (base) [b20223040323@admin1 test]$ ls a.txt record.sh (base) [b20223040323@admin1 test]$ cat a.txt ## 循环配置文件 1 1000000000 2 500000000 (base
阅读全文
摘要:001、双引号 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt 1 2 3 4 5 [root@PC1 test]# awk '{print $0, "\""}' a.txt ## 输出双引号 1 " 2 " 3 " 4 " 5 " 002、
阅读全文
摘要:001、直接修改PATH环境变量 [root@PC1 plink]# ls ## 软件目录 LICENSE plink plink_linux_x86_64_20230116.zip prettify toy.map toy.ped [root@PC1 plink]# pwd ## 路径 /home
阅读全文
摘要:ubuntu中默认进入目录后默认显示的路径是完整路径。 01,将其设置为最终的路径:basename (base) root@DESKTOP-IDT9S0E:~# cp ~/.bashrc ~/.bashrc.bak ## 避免意外,备份配置文件 (base) root@DESKTOP-IDT9S0
阅读全文
摘要:export命令扩大了变量的作用范围。 001、 root@DESKTOP-IDT9S0E:/home/test# ls a.txt record.sh root@DESKTOP-IDT9S0E:/home/test# cat a.txt ## 测试文件 01 02 03 04 05 06 07 0
阅读全文
摘要:001、 root@DESKTOP-IDT9S0E:/home/test# ls a.txt b.csv c.ped xx root@DESKTOP-IDT9S0E:/home/test# cat a.txt 1 2 3 4 5 6 7 8 9 10 root@DESKTOP-IDT9S0E:/ho
阅读全文
摘要:001、限定匹配a3次 root@DESKTOP-IDT9S0E:/home/test# ls a.txt root@DESKTOP-IDT9S0E:/home/test# cat a.txt ## 测试数据 1 takkkkkk 2 taakkkkk 3 taaakkkk 4 33333333 5
阅读全文
摘要:a、 正则表达式的类型 使用正则表达式最大的问题在于有不止一种类型的正则表达式。Linux 中的不同应用程序可能会用不同类型的正则表达式。这其中包括编程语言(Java、Perl 和 Python)、Linux 实用工具(比如 sed 编辑器、gawk 程序和 grep 工具)以及主流应用(比如 My
阅读全文
摘要:001、大写转换为小写 root@DESKTOP-IDT9S0E:/home/test# ls a.txt root@DESKTOP-IDT9S0E:/home/test# cat a.txt ## 测试数据 AWF hhdd meh DGEE 345 efff rrt hhkk root@DESK
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt test.py [root@PC1 test]# cat a.txt ## 测试文件 1 abcd 2 abcd 3 abcd 4 abcd [root@PC1 test]# cat test.py ## 测试程序 in_file = o
阅读全文
摘要:001、 >>> import re >>> tmp = re.match(r'^([^\s]+)\s(.*)', "ab cd") >>> tmp <re.Match object; span=(0, 5), match='ab cd'> >>> tmp.group(1) 'ab' >>> tmp
阅读全文
摘要:001、re.match >>> re.match("ab", "abcdefgab") ## 在字符串abcdefgab中查找字符串ab, 返回索引 <re.Match object; span=(0, 2), match='ab'> >>> re.match("xy", "abcdefgab")
阅读全文
摘要:001、 下载安装包 [root@PC1 hisat2]# wget https://github.com/DaehwanKimLab/hisat2/archive/refs/tags/v2.2.1.tar.gz 002、 tar -xavf v2.2.1.tar.gz ## 解压 cd hisat
阅读全文
摘要:001、 -i [root@PC1 test]# ls [root@PC1 test]# touch a.txt a.csv [root@PC1 test]# ls a.csv a.txt [root@PC1 test]# find ./ -name "*.txt" | xargs -i cp {}
阅读全文
摘要:001、不使用 -i选项 [root@PC1 test]# ls abva abvb abvc abvd dir1 dir2 dir3 dir4 dir5 [root@PC1 test]# ls | xargs mv {} {}.bak ## 不使用 -i选项 mv: cannot stat ‘{}
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt 33 ac kk dd adebc kk ad abc uy dd gg 88 [root@PC1 test]# grep -E "ab?c" a.txt ## "ab?c" 等价与
阅读全文
摘要:001、 [root@PC1 test]# ls dir1 dir2 dir3 [root@PC1 test]# du -h ## 查看所有子目录占用磁盘的大小 100M ./dir1 300M ./dir2 30M ./dir3 430M .
阅读全文
摘要:001、 root@ubuntu01:~# cat /etc/issue Ubuntu 22.04.2 LTS \n \l 002、 root@ubuntu01:~# lsb_release -a No LSB modules are available. Distributor ID: Ubunt
阅读全文
摘要:001、系统 [root@PC1 ~]# hostnamectl Static hostname: PC1 Icon name: computer-vm Chassis: vm 🖴 Machine ID: 0701dfe1316f4cd6be6f958130674e6f Boot ID: 541d
阅读全文
摘要:001、创建前 [root@PC1 hiblup]# ls hiblup hiblup_1.3.1_linux_x86_64_20230220.tar.gz hiblup.log [root@PC1 hiblup]# hiblup ## 测试hiblup命令 bash: hiblup: comman
阅读全文
摘要:001、虚拟机开启报错 002、解决方法 a、 b、 c、 d、执行如下命令:bcdedit /set hypervisorlaunchtype off e、重启计算机
阅读全文
摘要:source 命令会在当前 shell 中执行,而 bash 会创建一个新的 shell 会话。 001、 (base) root@DESKTOP-A31BQ38:/home/test2# ls test.sh (base) root@DESKTOP-A31BQ38:/home/test2# cat
阅读全文
摘要:R语言中cor函数应用与数据框,生成以列为基本单位的两两变量之间的相关的矩阵。 01、测试: a <- c(1, 3, 5, 7, 9) b <- c(3, 8, 7, 12, 23) c <- c(12, 23, 54, 63, 89) d <- c(23, 45, 68, 87, 234) da
阅读全文
摘要:ctrl + shift + 3
阅读全文
摘要:001、 #Hmisc package_url="https://cran.r-project.org/src/contrib/Archive/Hmisc/Hmisc_4.8-0.tar.gz" install.packages(package_url, repos = NULL, type = '
阅读全文
摘要:001、 http://hgdownload.cse.ucsc.edu/admin/exe/
阅读全文