03 2024 档案
摘要:Linux中文件的隐藏权限通常有2个参数; i 和 a; 使用chattr 修改文件的隐藏权限; 使用lsattr 查看文件的隐藏权限; 001、-i参数; a、对文件:无法对文件进行修改; b、对目录:仅能修改目录中的子文件的内容而不能新建或者删除文件 01、增加、查看文件的-i隐藏属性 [roo
阅读全文
摘要:001、测试数据 [root@pc1 test01]# ls a.txt idx.txt [root@pc1 test01]# cat a.txt ## 测试数据 01 02 03 04 05 06 1 07 08 09 10 11 12 2 13 14 15 16 17 18 3 19 20 21
阅读全文
摘要:001、 [root@pc1 test]# ls a.txt [root@pc1 test]# cat a.txt ## 测试数据 aa bb cc aa jj kk aa mm uy aa mm ww [root@pc1 test]# grep "aa\t" a.txt ##\t在这里不能被识别,
阅读全文
摘要:01、数据结构与算法 02、操作系统 03、计算机网络 04、计算机组成原理 05、设计模式?? 06、数据库??
阅读全文
摘要:设计模式总结了软件开发人员在长期实践中积累的经验,并把这些经验系统化、分类化,以便于在新的项目中复用这些解决方案。设计模式主要应用于面向对象编程语言中,它们描述了如何组织代码以解决重复出现的设计问题,从而提高软件的可重用性、可维护性、扩展性和灵活性。设计模式可以概括为一系列类或对象之间的相互作用,
阅读全文
摘要:1、面向对象编程(继承、类、多态) 2、面向过程编程(与函数相关;全局变量) 3、面向函数编程(函数式编程)(与函数相关;局部变量) 。
阅读全文
摘要:前者:for (row in 1:nrow(gterms)) { gene_terms <- str_split(gterms[row,"GOs"], ",", simplify = FALSE)[[1]] gene_id <- gterms[row, "query"][[1]] tmp <- da
阅读全文
摘要:R语言中sappy、unlist函数的应用 gene_to_go <- data.frame(gene = rep(gene_ids[eggnog_lines_with_go], times = sapply(eggnog_annoations_go, length)), term = unlist
阅读全文
摘要:001、R 语言中出现如下报错 > a <- 1:5 > b <- letters[1:5] > test <- data.frame(a, b) > library(dplyr) > select(test, a) Error in (function (classes, fdef, mtable
阅读全文
摘要:R 语言中双中括号 [[]]与数据类型列表的关系。 for (row in 1:nrow(gterms)) { gene_terms <- str_split(gterms[row,"GOs"], ",", simplify = FALSE)[[1]] gene_id <- gterms[row,
阅读全文
摘要:R语言中管道符号 %>% 的应用及举例 gterms <- egg %>% dplyr::select(query, GOs) %>% na.omit() gene2go <- data.frame(term = character(), gene = character())
阅读全文
摘要:R语言中na.omit函数的应用 以及 在数据框中的应用 gterms <- egg %>% dplyr::select(query, GOs) %>% na.omit() gene2go <- data.frame(term = character(), gene = character()) 示
阅读全文
摘要:001 96,GO:0051093,GO:0051094,GO:0051171,GO:0051172,GO:0051173,GO:0051239,GO:0051240,GO:0051241,GO:0051246,GO:0051247,GO:0051248,GO:0051252,GO:0051254,
阅读全文
摘要:001、R语言出现如下报错: 读取的项目数必需是列数的倍数 > egg <- read.table("XXX.emapper_reformat.annotations",sep="\t",header=T) Warning messages: 1: In scan(file = file, what
阅读全文
摘要:eggnog.db.gzeggnog_proteins.dmnd.gzeggnog.taxa.tar.gzmmseqs.tar.gzpfam.tar.gz
阅读全文
摘要:使用conda安装 001、创建单独的环境名称 (base) [root@pc1 test01]# conda create -n eggnog 002、查看环境 (base) [root@pc1 test01]# conda env list # conda environments: # bas
阅读全文
摘要:001、 conda安装 conda install -c bioconda diamond 002、
阅读全文
摘要:001、确认是否已经安装 (base) [root@pc1 ~]# python Python 3.11.4 (main, Jul 5 2023, 14:15:25) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "lice
阅读全文
摘要:001、问题 Cannot connect to AnnotationHub server, using 'localHub=TRUE' instead Using 'localHub=TRUE' library(AnnotationHub) library(biomaRt) library(clu
阅读全文
摘要:001、报错如下: 错误: package or namespace load failed for ‘dbplyr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): 002、 重新安装
阅读全文
摘要:001、 002、 003、此时画板大小处于可调整大小的状态 。
阅读全文
摘要:001、问题 locate定位文件的时候出现如下问题: locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory 002、原因分析; 安装locate命令后没有更新 解决方法:更新命令库,使用如下
阅读全文
摘要:001、问题 安装软件 make过程中出现如下错误: /usr/bin/ld: cannot find -lgsl/usr/bin/ld: cannot find -lopenblas 002、问题分析 出现类似的这种报错,一般是找不到对应的库文件,比如上面的提示对应如下的两个库文件: libgsl
阅读全文
摘要:001、基础绘图 plot(1:10) legend('topleft', ## legend函数默认会带有一个框线 c("Presence", "Absence"), col= "royalblue1", pch = 15, cex = 1, text.font = 2, inset= 0.02)
阅读全文
摘要:001、 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt 5 8 2 7 3 [root@pc1 test1]# awk '{if(NR == 1) {idx = NR; value = $1}; if($1 > value) {idx
阅读全文
摘要:001、基础绘图 library(ggplot2)#导入ggplot包 ggplot(data = mtcars, aes(x = wt, y = mpg, colour = factor(cyl))) + geom_point() + theme_bw() ## 基础绘图 002、设置y轴刻度标签
阅读全文
摘要:001、基础绘图 library(ggplot2)#导入ggplot包 ggplot(data = mtcars, aes(x = wt, y = mpg, colour = factor(cyl))) + geom_point() + theme_bw() ## 基础绘图 002、设置x轴名称与框
阅读全文
摘要:001、基础绘图 library(ggplot2)#导入ggplot包 ggplot(data = mtcars, aes(x = wt, y = mpg, colour = factor(cyl))) + geom_point() + theme_bw() ## 基础绘图 002、调整x轴上刻度文
阅读全文
摘要:001、基础绘图 library(ggplot2) ## 加载包 ggplot(data = mtcars, aes(x = wt, y = mpg, colour = factor(cyl))) + geom_point() ## 绘制散点图 002、增加四边框线 library(ggplot2)
阅读全文
摘要:001、 # -*- coding: utf-8 -*-的作用是告诉python编码,默认的是ASCII编码,使用中文注释的情况下会报错,而增加# -*- coding: utf-8 -*-则程序可以正常执行 [root@pc1 test1]# ls ## 下面是两个测试程序 test01.py t
阅读全文
摘要:001、脚本解释器用于说明程序执行的方式。 [root@pc1 test1]# ls ## 两个测试脚本, test02.script 相比于test01.script多了指定python解释器的语句 #!/usr/bin/env python test01.script test02.script
阅读全文
摘要:001、第一句通常为 a、#!/usr/bin/env python b、#!/usr/bin/python 首先以上两脚都是指定脚本语言的解释器,均表示 用python解释器执行下面的脚本。 a的写法比b的写法更加的健壮。 因为b把解释器写死了, 如果python的可执行程序不在/usr/bin/
阅读全文
摘要:001、基础绘图 library(ggplot2)#导入ggplot包 ggplot(data = mtcars, aes(x = wt, y = mpg, colour = factor(cyl))) + geom_point() + theme_bw() 002、设置刻度标签的粗细 librar
阅读全文
摘要:001、为了避免脚本多次执行,生成结果多次追加,可以在追加语句的前面增加清空语句避免多次追加 [root@pc1 test1]# ls a.sh [root@pc1 test1]# cat a.sh ## 测试脚本 #!/bin/bash > result.txt ## 或者使用 rm -f res
阅读全文
摘要:001、在特定的情况下,为了防止脚本重复执行,造成混乱,可以在末尾追加如下语句避免脚本重复执行 [root@pc1 test1]# ls a.sh [root@pc1 test1]# cat a.sh ## 测试脚本 #!/bin/bash seq 2 seq 2 sed -i 's/^/#/' $
阅读全文
摘要:linux 中declare命令的用法 001、声明整数型变量 [root@pc1 test1]# declare -i var1 ## 声明变量为整数型变量 [root@pc1 test1]# var1=132 ## 赋值整数型变量 [root@pc1 test1]# echo $var1 ##
阅读全文
摘要:linux shell脚本中 =~ 的作用 =~ 表示正则表达式左侧是否匹配右侧。 001、举例如下: [root@pc1 test1]# str1=12343 ## 纯数字字符串 [root@pc1 test1]# str2=abdef ## 字母字符串 [root@pc1 test1]# str
阅读全文
摘要:linux 中如何判断变量是否为数值 001、 利用正则表达式判断 a、 [root@pc1 test1]# str1="abcd" ## 字母字符串 [root@pc1 test1]# str2="100" ## 数字字符串 [root@pc1 test1]# re="^[-+]?[0-9]+([
阅读全文
摘要:linux 中正则表达式中?号的作用是匹配前面的字母0次或者1次; 001、测试如下: [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试样本 abcd xyz 133 kkkk abde jjj dddu abbcde jjj
阅读全文
摘要:001、简单用法 > a <- c(1,2, 7, 8) ## 定义向量a > b <- c(2, 3, 7, 9) ## 定义向量b > a %in% b ## 判断向量a中元素是否在向量b中,返回逻辑向量 [1] FALSE TRUE TRUE FALSE 002、取两个向量的交集 > a <-
阅读全文
摘要:001、 [root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt ## 测试数据 xx yy$ kk ff ee 88 uu ee ww$ [root@pc1 test2]# grep "$" a.txt ## grep直接检测,检测不到 xx
阅读全文