09 2022 档案
摘要:001、系统 [root@localhost home]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) 002、查看当前glibc版本 [root@localhost home]# ldd --version ldd (G
阅读全文
摘要:001、问题 002、解决方法 wget -c https://github.com/ldc-developers/ldc/releases/download/v1.30.0/ldc2-1.30.0-linux-x86_64.tar.xz tar -xJvf ldc2-1.30.0-linux-x8
阅读全文
摘要:001、系统 [root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) 002、当前make版本 [root@localhost ~]# make --version GNU Make 3.82
阅读全文
摘要:001、系统 [root@localhost home]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) 002、当前gcc 及 g++版本 [root@localhost home]# gcc --version gcc
阅读全文
摘要:001、 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt ## 测试文件 SVLEN=-100 SVTYPE=DEL SVLEN=-62 SVTYPE=RPL NTLEN=25 HOMSEQ=G SVLEN=-100 SVTYPE=DEL
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试文件 243 fsab 989a 34b sa 1113 ab34 df3 add gabe kkkk abk [root@PC1 test]# sed 's/ /\n/g'
阅读全文
摘要:001、 shell实现 [root@PC1 test]# ls test.fa [root@PC1 test]# cat test.fa ## 测试fasta文件 > chr1 ddddgggg ddfgg > chr2 eertttt dddddg > chr3 dfdfgggg lljhhhh
阅读全文
摘要:001、问题 (普通用户没有sudoer权限) 002、解决方法 [liujiaxin01@PC1 coreutils-8.32]$ su - root ## 切换至root用户 Password: Last login: Wed Sep 28 11:22:11 CST 2022 on pts/1
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt h d w q g d t [root@PC1 test]# sed -n "$a,$b"p a.txt ## 同时传入两个变量参数 d w q
阅读全文
摘要:001、 [root@PC1 test]# ls 10.txt 1.txt 4.txt 7.txt a.txt [root@PC1 test]# rm -f {0..9}* ## 删除当前目录中所有以数字开头的文件 [root@PC1 test]# ls a.txt
阅读全文
摘要:在文件的行首添加一行。 001、 echo 实现 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt ## 测试文件 a b c [root@PC1 test2]# echo "xxx" | cat - a.txt ## echo实现 xxx
阅读全文
摘要:pindel官网:http://gmt.genome.wustl.edu/packages/pindel/ 001、基本用法 pindel -i simulated_config.txt -f simulated_reference.fa -o xxxxx -c ALL 其中 -i参数用于指定配置文
阅读全文
摘要:samtools view -bS test.sam > test.bam samtools view -b -S test.sam -o test.bam # 自定义线程数 samtools view -@ 50 -bS test.sam >test.bam 来源:https://blog.csd
阅读全文
摘要:001、 (base) [root@PC1 test]# ls a.txt (base) [root@PC1 test]# cat a.txt ## 测试数据 1 2 3 1 2 3 1 2 3 ## 将相同的序列转换为行 (base) [root@PC1 test]# awk '{if(NR %
阅读全文
摘要:001、脚本模板 #!/bin/bash #SBATCH -J TEST_NAME # 本次作业的名称 #SBATCH -p xhacnormala # 指定作业队列名 #SBATCH -o %j.result # %j将被作业号替代 #SBATCH -e %j.error # 错误日志输出 #SB
阅读全文
摘要:001、 (base) [root@PC1 test]# seq 3 > a.txt (base) [root@PC1 test]# cat a.txt ## 测试数据 1 2 3 (base) [root@PC1 test]# echo >> a.txt ## 末尾追加一个空行 (base) [r
阅读全文
摘要:001、basename命令可以获取末尾文件名和末尾目录名 (base) [root@PC1 home]# basename test2/a.txt a.txt (base) [root@PC1 home]# basename test2/dir01/ dir01 002、去除文件名后缀 (base
阅读全文
摘要:001、 (base) [root@PC1 home]# date +%s 1663810406 (base) [root@PC1 home]# date +%s 1663810410 date +%s //从 1970 年 1 月 1 日 00:00:00 UTC 到目前为止的秒数(时间戳) 参考
阅读全文
摘要:001、 [liujiaxin01@PC1 ~]$ whoami liujiaxin01 ## 非root用户 002、 将bash脚本中注释行后面的颜色设置为亮绿色 [liujiaxin01@PC1 ~]$ echo "highlight Comment ctermfg=green guifg=g
阅读全文
摘要:001、问题, 难以看清楚注释符号后面的内容 a方法: 01、解决方法, 在vim配置文件 /etc/vimrc后增加如下内容 highlight Comment ctermfg=green guifg=green 即:执行(root用户): (base) [root@PC1 test]# echo
阅读全文
摘要:001、 文件名称 dog.slurm #!/bin/bash #SBATCH --job-name=dog # 本次作业的名称 #SBATCH -p xhacnormala # 等价于--partition,指定作业队列名 #SBATCH --output=%j.out # “%j”将被作业号替代
阅读全文
摘要:001、查看利用conda创建的虚拟环境 (base) [root@PC1 software]# conda env list # conda environments: # base * /root/anaconda3 002、利用conda创建虚拟环境 a、创建: (base) [root@PC
阅读全文
摘要:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=D
阅读全文
摘要:001、 (base) liujiaxin01@ubuntu02:~$ conda config --show channels ## 显示当前源 channels: - https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/ - https://m
阅读全文
摘要:001、 (base) liujiaxin01@ubuntu02:~$ conda config --show channels ## 查看当前源 channels: - https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/ - https://mirr
阅读全文
摘要:001、 (base) liujiaxin01@ubuntu02:~$ conda config --show channels ## 查看当前源 channels: - https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/ - https://mirr
阅读全文
摘要:001、 (base) [liujiaxin01@PC1 ~]$ conda config --show channels channels: - defaults
阅读全文
摘要:001、 (base) [liujiaxin01@PC1 software]$ cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) ## 系统发行版 (base) [liujiaxin01@PC1 software]$ conda
阅读全文
摘要:001、 (base) [liujiaxin01@PC1 home]$ cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) ## 系统版本 (base) [liujiaxin01@PC1 home]$ conda --versio
阅读全文
摘要:001、生成自然序列 (base) root@ubuntu02:/home/test# seq 5 ## 默认从1开始递增 1 2 3 4 5 (base) root@ubuntu02:/home/test# seq 2 5 ## 指定起始点 2 3 4 5 002、生成序列的时候指定步长 (bas
阅读全文
摘要:001、 root@ubuntu01:/home/software# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS ## 系统版本 Release
阅读全文
摘要:001、 [root@PC1 software]# cat /etc/redhat-release ## 系统版本 CentOS Linux release 7.6.1810 (Core) [root@PC1 software]# conda --version ## conda版本 conda 4
阅读全文
摘要:001、 [root@PC1 software]# cat /etc/redhat-release ## 系统发行版 CentOS Linux release 7.6.1810 (Core) [root@PC1 software]# conda --version ## conda版本 conda
阅读全文
摘要:001、查看系统 [root@PC1 software]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) 002、下载anaconda安装包: wget https://mirrors.tuna.tsinghua.edu.c
阅读全文
摘要:-O选项表示将下载的内容进行重命名: [root@PC1 test]# ls [root@PC1 test]# wget -O xxxx http://mirrors.aliyun.com/repo/Centos-7.repo ## 下载内容保存为xxx --2022-09-19 09:42:39-
阅读全文
摘要:https://mirrors.aliyun.com/gnu/gcc/
阅读全文
摘要:001、自动获取IP dhclient 002、获取网关 route -n
阅读全文
摘要:001、利用net-tools工具下的 ifoconfig命令 root@ubuntu01:/home/software# ifconfig | head -n 3 ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192
阅读全文
摘要:001、问题src/delly.h:8:10: fatal error: boost/graph/adjacency_list.hpp: No such file or directory 002、解决方法, 安装boost库 Linux下boost库的编译及安装:https://www.cnblo
阅读全文
摘要:001、下载地址 https://www.boost.org/users/download/ 002、 tar -xzvf boost_1_80_0.tar.gz 003、 编译安装 cd boost_1_80_0/ ./bootstrap.sh --with-libraries=all --wit
阅读全文
摘要:001、打开python shell root@ubuntu01:/home/software# python Python 2.7.18 (default, Jul 1 2022, 10:30:50) [GCC 11.2.0] on linux2 Type "help", "copyright",
阅读全文
摘要:001、问题:configure: error: htscodecs submodule files not present. 002、解决方法: git pull git submodule update
阅读全文
摘要:001、问题:error: library used but 'RANLIB' is undefined 002、解决方法: apt-get install libtool 参考:https://blog.csdn.net/qq_36393978/article/details/118415300
阅读全文
摘要:001、问题:configure: error: liblzma development files not found 002、解决方法: apt-get install liblzma-dev 参考:https://blog.csdn.net/weixin_40640700/article/de
阅读全文
摘要:001、问题configure: error: libbzip2 development files not found 002、解决方法: apt-get install libbz2-dev 参考:https://www.yisu.com/ask/5621.html
阅读全文
摘要:001、问题:configure: error: curses development files not found 002、解决方法: apt-get install libncurses5-dev 参考:https://blog.csdn.net/cw616729/article/detail
阅读全文
摘要:001、问题:configure: error: zlib development files not found 002、解决方法: apt install zlib1g apt install zlib1g-dev 参考:https://www.gylmap.com/110743.html
阅读全文
摘要:001、问题 configure: WARNING: S3 support not enabled: requires SSL development files 002、解决方法 apt-get install apache2 apt-get install libssl-dev 参考:https
阅读全文
摘要:001、问题 002、解决方法 apt-get install libcurl4-openssl-dev 参考:https://www.manongdao.com/article-2248882.html
阅读全文
摘要:001、问题 002、解决方法 root@ubuntu01:/home/software/htscodecs# apt-get install libtool 003、再次执行 root@ubuntu01:/home/software/htscodecs# autoreconf -i 参考:http
阅读全文
摘要:001、问题 root@ubuntu01:/home/software/htslib# ./configure ## 编译软件时出现如下报错 002、解决方法 root@ubuntu01:/home/software/htslib# apt install liblzma-dev 参考:https:
阅读全文
摘要:001、问题 root@ubuntu01:/home/software/htslib# ./configure ## 编译软件,出现如下问题 002、解决方法 root@ubuntu01:/home/software/htslib# apt install libbz2-dev 参考:https:/
阅读全文
摘要:001、问题 root@ubuntu01:/home/software# git clone https://github.com/samtools/htslib Cloning into 'htslib'... fatal: unable to access 'https://github.com
阅读全文
摘要:001、问题 root@ubuntu01:/home/software/PopIns2/PopIns2# ./popins2 ./popins2: error while loading shared libraries: libbifrost.so: cannot open shared obje
阅读全文
摘要:001、 root@ubuntu01:/home# dpkg -l 002、过滤特定的包 root@ubuntu01:/home# dpkg -l | grep "vim" ii vim 2:8.2.3995-1ubuntu2 amd64 Vi IMproved - enhanced vi edit
阅读全文
摘要:https://blog.csdn.net/weixin_44031582/article/details/122604217
阅读全文
摘要:001、提取前半部分 root@ubuntu01:/home/test2# cat a.txt ## 测试数据 1 2 3 4 5 6 7 8 9 10 root@ubuntu01:/home/test2# sed -n "1, $(expr $(sed -n "$=" a.txt) / 2)p"
阅读全文
摘要:001、问题 git clone时出现如下问题 fatal: unable to access 'https://github.com/GATB/gatb-minia-pipeline/': GnuT 002、解决方法 root@ubuntu01:/home/software/gatb# vim ~
阅读全文
摘要:001、问题 002、解决方法(安装python依赖的环境): apt-get install python2-dev apt-get install python3-dev
阅读全文
摘要:001、系统 root@ubuntu01:/home# hostnamectl Static hostname: ubuntu01 Icon name: computer-vm Chassis: vm Machine ID: e6fb52b4c8414f29b06dc95d57b5846c Boot
阅读全文
摘要:001、问题 root@ubuntu01:/home# ping www.baidu.com ## 测试网络连通性, 无法解析域名 ping: www.baidu.com: Temporary failure in name resolution 002、修改DNS配置文件 root@ubuntu0
阅读全文
摘要:001、c编译器 root@ubuntu01:/home/test# gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is f
阅读全文
摘要:001、bc实现 root@ubuntu01:/home/test# bc ## 在终端直接输入bc命令 bc 1.07.1 Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Founda
阅读全文
摘要:001、win + r 002、输入:dxdiag, 然后回车 003、bios即是主板信息
阅读全文
摘要:001、右击计算机, 点属性 002、点击设备管理器 003、双击磁盘驱动器
阅读全文
摘要:001、 [root@PC1 test]# smartctl --all /dev/sda smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-123.el7.x86_64] (local build) Copyright (C) 2002-13,
阅读全文
摘要:001、判断一组依次递增的数据 [root@PC1 test2]# cat a.txt ## 测试数据 3 4 5 6 7 8 9 [root@PC1 test2]# awk 'BEGIN{temp = 0} { if(NR > 1 && ($1 - temp) != 1) {print NR,"x
阅读全文
摘要:001、查看一下当前系统 [root@PC1 home]# hostnamectl Static hostname: PC1 Icon name: computer Chassis: n/a Machine ID: 8f7f58c7ef6f42489c3251e9f474be72 Boot ID:
阅读全文
摘要:001、 [root@PC1 test]# df -h ## 查看各个挂载点的大小 Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 46G 4.3G 42G 10% / devtmpfs 1.9G 0 1.9G 0%
阅读全文
摘要:001、ls + sed + awk实现 root@PC1:/home/req/input/E.coli/fastq# ls SRR1770413_1.fastq.gz SRR1770413_2.fastq.gz root@PC1:/home/req/input/E.coli/fastq# ls |
阅读全文
摘要:001、 双端测序下机数据中得到的read1和read2是两条互补链insertsize中方向相对的两条序列,再比对到单链的参考基因组之前会先将其中一条read转义,然后进行比对,所以比对得到的SAM和BAM文件中read1和read2有一条是被转了的。 来源:https://www.jianshu
阅读全文
摘要:001、wc -c 命令: 统计字符数 root@PC1:/home/req/input/test# ls a.txt root@PC1:/home/req/input/test# cat a.txt ## 测试文件 aa bb cc dd ee ff root@PC1:/home/req/inpu
阅读全文
摘要:001、系统镜像官网下载 下载地址:https://manjaro.org/download/ 002、创建一个安装目的地 003、打开vmware软件,点击创建新的虚拟机 004、选择自定义, 点击下一步 005、点击下一步 006、点击稍后安装操作系统,点击下一步 007、选择linux,选择其
阅读全文
摘要:001、 root@PC1:/home/test3# ls root@PC1:/home/test3# seq 1000 > a.txt ## 生成一个测试文件 root@PC1:/home/test3# ls a.txt root@PC1:/home/test3# sha1sum a.txt ##
阅读全文
摘要:001、 dev.off() ## 关闭上一步的绘图设备(如果有) opar <- par(no.readonly = TRUE) ## 保存默认设置 par(bg = "cyan") ## 利用par设置绘图参数 plot(1:10) ## 绘图 002、取消par函数对绘图的设置, 回复默认 p
阅读全文
摘要:001、R语言中plot函数基础背景色为白色 plot(1:10) ## 测试基础绘图 002、 par(bg = "cyan", fg = "purple") ## 利用par函数指定绘图的背景色和前景色 plot(1:10)
阅读全文
摘要:ggplot中 001、默认绘图背景颜色 library(ggplot2) ggplot(mtcars , aes(x=mpg, y=wt)) + geom_point() ## 测试默认绘图颜色 002、调整绘图的背景颜色 ggplot( mtcars , aes(x=mpg, y=wt)) +
阅读全文
摘要:001、在本地创建共享目录, 比如在D盘创建一个share目录: 002、打开vmware及虚拟机; 然后点击vmware上方虚拟机: 003、点击设置 004、点击选项 005、 006、 007、 008、选择第一步在D盘创建的share文件夹,并点击确定: 009、点击下一步 010、点击完成
阅读全文
摘要:001、主板型号 002、进入bios快捷键 开机快速点击F1。
阅读全文
摘要:001、下载 securable.exe软件 002、双击
阅读全文
摘要:001、 mat <- matrix(1:16, 4, 4) ## 生成矩阵 mat ## 显示矩阵 002、提取矩阵的对角线 mat diag(mat) ## 提取矩阵的对角线 003、利用diag生成单位矩阵 diag(5) ## 生成单位矩阵 004、提取矩阵的上三角矩阵及下三角矩阵 mat
阅读全文
摘要:前期分析参考:https://www.jianshu.com/p/4f7aeae81ef1 001、 library(dplyr) library(Seurat) library(patchwork) pbmc.data <- Read10X(data.dir = "C:/Users/75377/D
阅读全文
摘要:001、测试基本绘图 data=iris ## 导入数据 library(ggplot2) ## 加载包 ggplot(data = data, aes(x=Petal.Length,y=Sepal.Length)) + ## 基本绘图程序 geom_point() 002、清除灰色背景、背景框线、
阅读全文
摘要:001、判断是否以升序排列 dat <- 1:5 ## 测试数据 dat1 <- c(1, 5, 2, 3, 4) ## 测试数据 identical(dat, sort(dat)) ## 判断dat是否以升序排列 identical(dat2, sort(dat2)) ## 判断dat2是否以升序
阅读全文
摘要:001、测试1 root@PC1:/home/test# ls ## 3个测试文件 a.txt b.txt c.txt root@PC1:/home/test# cat a.txt a j 6 b d j root@PC1:/home/test# cat b.txt 3 7 k j x v root
阅读全文
摘要:001、 root@PC1:/home/test# ls ## 3个测试文件 a.txt b.txt c.txt root@PC1:/home/test# cat a.txt a j 6 b d j root@PC1:/home/test# cat b.txt 3 7 k j x v root@PC
阅读全文
摘要:该函数类似c语言中的printf函数。 001、 result = 100 print(result) ## print函数可以直接输出变量的结果 print("result is :%d", result) ## print不能输出字符串 + 变量的组合 sprintf("result is :%
阅读全文
摘要:melt函数将“长数据”转换为“短数据”。 001、 指定单个ID library(reshape2) ID <- c(1,1,2,2) Time <- c(1,2,1,2) X1 <- c(5,3,6,2) X2 <- c(6,5,1,4) mydata <- data.frame(ID,Time
阅读全文
摘要:前期参考:https://www.jianshu.com/p/4f7aeae81ef1 001、 library(dplyr) library(Seurat) library(patchwork) pbmc.data <- Read10X(data.dir = "C:/Users/75377/Des
阅读全文
摘要:001、 协方差(Covariance): 可以通俗的理解为:两个变量在变化过程中是同方向变化?还是反方向变化?同向或反向程度如何? 计算公式: 公式简单翻译一下是:如果有X,Y两个变量,每个时刻的“X值与其均值之差”乘以“Y值与其均值之差”得到一个乘积,再对这每时刻的乘积求和并求出均值。 a <-
阅读全文
摘要:001、 相关系数是最早由统计学家卡尔·皮尔逊设计的统计指标,是研究变量之间线性相关程度的量,一般用字母 r 表示。由于研究对象的不同,相关系数有多种定义方式,较为常用的是皮尔逊相关系数。 由于研究对象的不同,相关系数有多种定义方式,较为常用的是皮尔逊相关系数。 研究变量之间线性相关程度的量。 a
阅读全文
摘要:001、 .Primitive 与.Internal的函数通常都是 C语言写成的,所以在R的开发环境中中是无法显示的。到网上下载R的源代码,然后在 src/main/*.c (通常位于这个位置)下查找。 参考:https://blog.csdn.net/weixin_36054993/article
阅读全文
摘要:001、plink软件生成raw文件 root@PC1:/home/test# ls outcome.map outcome.ped ## maf过滤,并将基因型数据转换为0、1、2的形式 root@PC1:/home/test# plink --file outcome --sheep --maf
阅读全文
摘要:001、 a <- 1:5 b <- 11:15 dat <- rbind(a, b) colnames(dat) <- paste0("c", 1:5) dat ## 测试数据框 dimnames(dat) ## 同时获取行名和列名,并生成列表 002、可以利用该函数给数据框或者矩阵命令行名和列名
阅读全文
摘要:missing函数作用就是如果y没有具体的值,那么输出为真,如果y有具体的值,那么输出为假,这么说可能有点抽象,举个例子: 001、 myplot <- function(x,y) { if(missing(y)) { y <- x x <- 1:length(y) } plot(x,y) } my
阅读全文
摘要:概述: 公式: 公式里的U就是下面运行结果的a$u,Σ就是下面的a$d变换成的对角矩阵(diag(a$d)),V就是下面运行结果的a$v 001、 > x <- matrix(1:20,nrow = 4,ncol = 5) ## 生成测试矩阵 > x [,1] [,2] [,3] [,4] [,5]
阅读全文
摘要:001、 seq_len(3) ## 用于生成指定长度的1到指定长度的序列 seq_len(9) seq_len(0)
阅读全文
摘要:相当于poyhton中assert函数, 用于嵌入函数中, 在检测某一确定的变量或条件是否为真, 如果判断为假,则为终止程序。 001、 stopifnot(3 > 0) 002、 stopifnot(3 < 0)
阅读全文
摘要:001、 is.finite(Inf) ## 判断是否为有穷大的数 is.infinite(Inf) ## 判断是否为无穷大的数 is.nan(NaN) ## 判断是否为非数 002、 1.无穷大 R中的无穷大用Inf表示(即Infinity,无穷大),负无穷表示为-Inf。要检查一个数是否为无穷,
阅读全文
摘要:001、 a <- c(8, 2, 3, 7, 6, 1, 2, 4) b <- c(2, 3, 6, 2, 6, 9, 3, 7) c <- c(9, 2, 7, 1, 4, 2, 8, 4) dat <- data.frame(a, b, c) ## 测试数据框 dat dat2 <- scal
阅读全文
摘要:001、 使用methods函数 methods("prcomp") ## moethods函数返回的带*号的函数不能通过直接输入函数名获取函数的源代码,需要使用getAnywhere函数 002、使用getAnywhere函数 getAnywhere(prcomp.default) 参考:http
阅读全文
摘要:001、 root@PC1:/home/test# ls outcome.map outcome.ped root@PC1:/home/test# cat outcome.map ## 测试数据,均为24号染色体数据 24 snp1 0 260996 24 snp2 0 363750 24 snp3
阅读全文
摘要:001、 root@PC1:/home/test# ls outcome.map outcome.ped root@PC1:/home/test# cat outcome.map ## 测试数据map文件 20 OAR20_27119.1 0 217914 20 OAR20_192404.1 0 3
阅读全文
摘要:001、 a <- c(0, 0, 0, 0) b <- c(9, -8, -15, 54) c <- c(8, 2, 8, 9) d <- c(0, 0, 0, 0) dat <- data.frame(a, b, c, d) ## 测试数据框 dat result <- vector() for
阅读全文
摘要:001、 a <- c(-8, 10, 7, -5) b <- c(9, -8, -15, 54) dat <- data.frame(a, b) ## 测试数据框 dat -dat ## 直接加负号 -a
阅读全文
摘要:001、查看系统 [root@PC1 test]# hostnamectl Static hostname: PC1 Icon name: computer Chassis: n/a Machine ID: 1739a8a8e564458e93c6b2f64619a348 Boot ID: b1cc
阅读全文
摘要:z - score: 观测值减去平均值,然后再除以标准差,得到均值为0, 标准差为1的数据,且数据符合正太分布。 001、 dat <- c(10, 8, 2, 6) ## 测试数据 dat scale(dat) ## scale函数实现z-score 002、利用函数进行验证 dat <- c(1
阅读全文
摘要:R语言中diag函数用于获取矩阵的对角线元素 001、 dat <- matrix(1:9, nrow = 3) ## 生成矩阵(方阵,行列相等) dat diag(dat) ## 取对角线元素 002、非方阵情况 dat <- matrix(1:15, nrow = 3) ## 生成3行5列矩阵
阅读全文
摘要:R语言中set.seed()函数的作用是保证前后生成的随机数保持一致。 001、首先查看不使用set.seed函数的情况 x=rnorm(10) ## 生成10个平均值为0, 标准差为1的符合正太分布的随机数 x plot(x) 再次运行以上代码(可以发现生成的随机数发生了编号): x=rnorm(
阅读全文
摘要:001、问题 root@PC1:/home/test3# ping www.baidu.com ping: www.baidu.com: Temporary failure in name resolution 002、解决方法(修改DNS服务配置文件) vim /etc/resolv.conf #
阅读全文
摘要:001、 dat <- rbind(a = 1:5, b = letters[1:5], c = LETTERS[1:5], d = 10:6) ## 测试数据框 dat idx <- order(c(t(row(dat))), runif(length(dat))) idx dat2 <- mat
阅读全文
摘要:001、 dat <- rbind(a = 1:5, b = letters[1:5], c = LETTERS[1:5], d = 10:6) ## 测试数据框 dat idx <- order(c(col(dat)), runif(length(dat))) ## 生成排序的索引 idx dat
阅读全文
摘要:001、R语言中row函数生成行号作为矩阵元素的矩阵 dat <- rbind(a = 1:5, b = letters[1:5], c = LETTERS[1:5]) ## 测试数据框 dat row(dat) ## row函数 002、程序实现 dat <- rbind(a = 1:5, b =
阅读全文
摘要:001、 order(c(1,1,1,2,2,2,3,3,3), c(7, 5, 2, 1, 4, 8, 9, 3, 6)) ## 首先对最小的三个参数排序, 也就是对7、5、2进行排序,结果为3, 2, 1## 然后对1、4、8进行排序及1、2、3(分别加3得: 4、5、6)## 最后对9, 3,
阅读全文
摘要:001、R 语言中的 col() 函数用于获取一个矩阵,该矩阵包含作为参数传递给它的矩阵的列数。 dat <- rbind(a = 1:5, b = letters[1:5], c = LETTERS[1:5]) dat col(dat) ## 列的序号作为矩阵每一列的元素 002、程序实现 dat
阅读全文
摘要:001、rnorm 用于生成符合正态分布的随机数 a <- rnorm(10) ## 生成10个均值为为0, 标准差为1的符合正太分布随机数 a mean(a) sd(a) a <- rnorm(10, 3, 5) ## 生成10个均值为3,标准差为5的符合正太分布随机数 a mean(a) sd(
阅读全文
摘要:001、 dat <- data.frame(a = 4:1, b = 1:4, c = 11:14) ## 测试数据框 dat <- as.matrix(dat) ## 将数据框转换为矩阵 dat c(dat) ## 按列将矩阵转换为一行数据 c(t(dat)) ## 按行将矩阵转换为一行数据
阅读全文
摘要:001、 a <- 4:1 b <- 1:4 c <- letters[1:4] d <- LETTERS[1:4] dat <- rbind(a, b, c, d) dat ## 测试数据框 idx <- c("c", "b") ## 行名索引 idx dat[idx,] ## 根据行名提取数据
阅读全文
摘要:001、 free -h 002、 cat /proc/meminfo
阅读全文
摘要:001、 选中需要注释的代码; 按ctrl + shift + c。 取消注释, 按ctrl + shift + c。
阅读全文
摘要:001、 所谓Phasing就是要把一个二倍体基因组上的等位基因,按照其亲本正确地定位到父亲或者母亲的染色体上,最终使得所有来自同一个亲本的等位基因都能够排列在同一条染色体里面。 来源:https://www.jianshu.com/p/a30de54b83c3
阅读全文
摘要:001、问题 nbrOfWorkers() 002、解决方法 install.packages("future") library(future)
阅读全文
摘要:001、 设置高亮显示:set hlsearch 取消高亮显示:set nosearch 002、 忽略大小写:set ignorecase
阅读全文