08 2022 档案

摘要:上游分析:https://www.jianshu.com/p/4f7aeae81ef1 001、 cell <- pbmc[["pca"]]@cell.embeddings cell <- cell[order(cell[,1], decreasing = T),] cell <- rownames 阅读全文
posted @ 2022-08-30 13:52 小鲨鱼2018 阅读(582) 评论(0) 推荐(0) 编辑
摘要:001、 seq(10) seq(2, 10, 2) ## 设置起始位置, 步长 002、 seq(2, 10, length = 2) ## 设置返回值的个数 seq(2, 10, length = 3) seq(2, 10, length = 4) 阅读全文
posted @ 2022-08-30 13:23 小鲨鱼2018 阅读(362) 评论(0) 推荐(0) 编辑
摘要:001、 dat <- data.frame( rep1 = sample(1:20), rep2 = 20:1, rep3 = 1:20 ) dat image(1:20, 1:3, as.matrix(dat)) ## 参数需要是矩阵 阅读全文
posted @ 2022-08-29 21:27 小鲨鱼2018 阅读(271) 评论(0) 推荐(0) 编辑
摘要:par(mar = ...)、par(mar = ...)均为调整绘图区域与边框之间的距离。 001、 par(mfrow = c(2, 2)) plot(1:10, cex = 3, col = "red", pch = 19) par(mar = c(7, 7, 7, 7)) plot(1:10 阅读全文
posted @ 2022-08-29 15:35 小鲨鱼2018 阅读(478) 评论(0) 推荐(0) 编辑
摘要:001、grep a <- c("cc", "ee", "ff", "gg", "aa", "bb", "dd") grep("aa", a) ## 返回匹配字符的位置索引 grep("aa", a, value = T) ## 直接返回值 002、grepl a <- c("cc", "ee", 阅读全文
posted @ 2022-08-29 15:09 小鲨鱼2018 阅读(518) 评论(0) 推荐(0) 编辑
摘要:001、 a <- par() class(a) ## par函数返回列表 length(a) ## 一共72个可选项 head(a, 3) par()$mfrow par(mfrow = c(2, 2)) ## 修改par中的参数 par()$mfrow 阅读全文
posted @ 2022-08-29 14:26 小鲨鱼2018 阅读(270) 评论(0) 推荐(0) 编辑
摘要:001、floor 向下取整 floor(5.3435) floor(3.8735) 002、round 四舍五入取值 round(5.3435) ## 默认保留小数点后0位 round(5.9435) round(5.3435, digits = 2) ## 保留小数点后2位 round(5.94 阅读全文
posted @ 2022-08-29 00:01 小鲨鱼2018 阅读(1282) 评论(0) 推荐(0) 编辑
摘要:001、选种光标到文件头的内容 ctrl + shift + home 002、选中光标到文件尾的内容 ctrl + shift + end 阅读全文
posted @ 2022-08-28 23:47 小鲨鱼2018 阅读(131) 评论(0) 推荐(0) 编辑
摘要:001、 step1:先home键, 光标移动至行首 step2:shift + end, 选中当前行。 阅读全文
posted @ 2022-08-28 23:44 小鲨鱼2018 阅读(229) 评论(0) 推荐(0) 编辑
摘要:001、删除光标到行首的快捷键 ctrl + backspace ctrl + shift + backspace 002、删除光标到行末 方法1: ctrl + k 方法2: ctrl + shift + delete 阅读全文
posted @ 2022-08-28 23:30 小鲨鱼2018 阅读(167) 评论(0) 推荐(0) 编辑
摘要:001、函数原型 MinMax <- function(data, min, max) { ## 该函数限定了数据框中元素的上下限 data2 <- data data2[data2 > max] <- max data2[data2 < min] <- min return(data2) } 00 阅读全文
posted @ 2022-08-28 23:15 小鲨鱼2018 阅读(75) 评论(0) 推荐(0) 编辑
摘要:001、 dat <- data.frame(a = c(3, 9, 6, 7), b = c(8, 10, 3, 7), c = c(1, 13, 5, 8)) ## 测试数据框 dat dat[dat > 7] ## 筛选数据框中大于7的元素 dat[dat > 7] <- "xxx" ## 将 阅读全文
posted @ 2022-08-28 23:09 小鲨鱼2018 阅读(1108) 评论(0) 推荐(0) 编辑
摘要:R语言中unname函数用去去除数据框或者矩阵的列名及行名 001、 应用于数据框 dat <- data.frame(a = c(3, 7, 6), b = c(6, 1, 7), c = c(1, 6, 4)) ## 测试数据框 rownames(dat) <- LETTERS[1:3] ## 阅读全文
posted @ 2022-08-27 21:56 小鲨鱼2018 阅读(699) 评论(0) 推荐(0) 编辑
摘要:001、 a = 10 b = 5 ifelse(test = a > b, yes = a - b, no = b - a) ## 如果test为真, 则表达式返回yes的值, 否则返回no的值 002、 a = 10 b = 50 ifelse(test = a > b, yes = a - b 阅读全文
posted @ 2022-08-27 21:01 小鲨鱼2018 阅读(231) 评论(0) 推荐(0) 编辑
摘要:001、 dat <- data.frame(a = c(666, 333, 555, 777)) ## 测试数据框, 只有一列 dat x <- dat[c(3,1),] ## 提取第3行和第1行 x class(x) ## 提取数据后, 数据变为数值型 002、增加drop = FALSE参数, 阅读全文
posted @ 2022-08-27 19:09 小鲨鱼2018 阅读(1360) 评论(2) 推荐(1) 编辑
摘要:相对于apply, lapply主要应用于list ?? 返回list?? 001、应用于数据框 dat <- data.frame(a = c(6, 3, 5), b = c(2, 6, 8), c = c(5, 2, 1)) ## 测试数据框 dat lapply(dat, min) ## 返回 阅读全文
posted @ 2022-08-27 18:20 小鲨鱼2018 阅读(573) 评论(0) 推荐(0) 编辑
摘要:前期处理:https://www.jianshu.com/p/fef17a1babc2 #可视化对每个主成分影响比较大的基因集 001、 dat <- pbmc[["pca"]]@feature.loadings ## 绘图数据 dat[1:3, 1:3] par(mai = c(1, 1, 1, 阅读全文
posted @ 2022-08-27 17:54 小鲨鱼2018 阅读(724) 评论(0) 推荐(0) 编辑
摘要:前期处理参考:https://www.jianshu.com/p/fef17a1babc2 001、 dat <- pbmc[["pca"]]@cell.embeddings ## 绘图数据 dat[1:3, 1:3] plot(dat[,1], dat[,2]) ## 绘图 标准结果: 阅读全文
posted @ 2022-08-27 16:48 小鲨鱼2018 阅读(252) 评论(0) 推荐(0) 编辑
摘要:001、 dat <- pbmc[["RNA"]]@meta.features ## 绘图数据 plot(log10(dat$vst.mean), dat$vst.variance.standardized) ## 绘图使用数据 为什么和log10函数和 ggplot2中scale_x_log10( 阅读全文
posted @ 2022-08-27 14:58 小鲨鱼2018 阅读(386) 评论(0) 推荐(0) 编辑
摘要:R中any运算符用于判断逻辑向量中是否至少有一个是TRUE。 001、 any(c(FALSE, FALSE, FALSE)) ## 用于判断逻辑向量中是否至少一个为TRUE any(c(FALSE, FALSE, TRUE)) any(c(TRUE, TRUE, TRUE)) 阅读全文
posted @ 2022-08-27 14:23 小鲨鱼2018 阅读(454) 评论(0) 推荐(1) 编辑
摘要:001、 %||% 函数用于判断 左侧变量是否为NULL, 如果左侧为NULL, 则返回右侧的变量; 否则,返回左侧的变量 library(rlang) x = NULL y = 10 x %||% y ## 左侧变量x为NULL, 则返回右侧变量y的值 x = 888 x %||% y ## 左侧 阅读全文
posted @ 2022-08-27 14:20 小鲨鱼2018 阅读(656) 评论(0) 推荐(0) 编辑
摘要:001、 feelings <- c("sad", "afraid") for (i in feelings) { print( switch (i, ## 依次匹配i happy = "a am glad you are haay", afraid = "there is nothing to f 阅读全文
posted @ 2022-08-27 14:03 小鲨鱼2018 阅读(156) 评论(0) 推荐(0) 编辑
摘要:001、 TRUE == 1 ## TRUE为1 FALSE == 0 ## FALSE为0 TRUE + 10 FALSE + 50 阅读全文
posted @ 2022-08-27 13:47 小鲨鱼2018 阅读(538) 评论(0) 推荐(0) 编辑
摘要:001、 >>> import re >>> s1 = "ATGXAGXATGETAGETAGATGXXY" >>> re.findall('ATG|TAG', s1) ## 同时对字符串s1中的两个字符串进行查找 ['ATG', 'ATG', 'TAG', 'TAG', 'ATG'] 阅读全文
posted @ 2022-08-27 11:56 小鲨鱼2018 阅读(878) 评论(0) 推荐(0) 编辑
摘要:001、 dat <- data.frame(a = c(3, 8, 2, 1), b = c(8, 4, 2, 6), c = c(2, 7, 6, 9)) ## 测试数据狂 dat apply(dat, 2, function(x) sum(x > 2)) ## 统计每一列中大于2的总个数 00 阅读全文
posted @ 2022-08-26 22:50 小鲨鱼2018 阅读(167) 评论(0) 推荐(0) 编辑
摘要:用于计算数据中行的和及列的和。 001、 dat <- data.frame(a = c(3, 8, 2, 1), b = c(8, 4, 2, 6), c = c(2, 7, 6, 9)) ## 测试书 dat rowSums(dat) ## 计算没行的和 apply(dat, 1, sum) c 阅读全文
posted @ 2022-08-26 22:29 小鲨鱼2018 阅读(4841) 评论(0) 推荐(0) 编辑
摘要:方法1vioplot包 001、加载包 library(ggplot2)#绘图包 library(ggpubr)#基于ggplot2的可视化包,主要用于绘制符合出版要求的图形 library(ggsignif)#用于P值计算和显著性标记 library(tidyverse)#数据预处理 librar 阅读全文
posted @ 2022-08-26 16:15 小鲨鱼2018 阅读(1986) 评论(0) 推荐(0) 编辑
摘要:001、 >>> list1 = ["aaa", "bbb", "ccc"] ## 测试列表(可以是任意可迭代对象) >>> dict1 = {} ## 空字典 >>> dict1.fromkeys(list1, "") ## 将列表的值作为键生成字典 {'aaa': '', 'bbb': '', 阅读全文
posted @ 2022-08-25 22:19 小鲨鱼2018 阅读(54) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test3# ls (base) root@PC1:/home/test3# echo "xx" xx (base) root@PC1:/home/test3# echo -n "xx" ## echo -n 实现输出字符串,但是不输出换行符 x 阅读全文
posted @ 2022-08-25 22:02 小鲨鱼2018 阅读(224) 评论(0) 推荐(0) 编辑
摘要:001、 library(tidyverse) ## 加载包 dat <- data.frame(a = c(400, 100, 300, 500), ## 测试数据框 b = c("xxx", "mmm", "nnn", "yyy"), c = c(333, 777, 888, 222)) dat 阅读全文
posted @ 2022-08-25 21:53 小鲨鱼2018 阅读(1356) 评论(0) 推荐(0) 编辑
摘要:001、矩阵乘法符号 %*%; 矩阵相乘的条件是: 左侧矩阵的列数等于右侧矩阵的行数; 相乘的结果是矩阵的行数灯油左侧矩阵的行数, 列数等于右侧矩阵的列数。 c1 = c(2,3) c2 = c(1,5) c3 = c(4,2) dat1 <- (data.frame(c1, c2, c3)) da 阅读全文
posted @ 2022-08-24 16:05 小鲨鱼2018 阅读(5071) 评论(0) 推荐(0) 编辑
摘要:001、 a <- c(2, 3, 6) a cumsum(a) ## 累积求和 cumprod(a) ## 累积求积 阅读全文
posted @ 2022-08-24 15:53 小鲨鱼2018 阅读(180) 评论(0) 推荐(0) 编辑
摘要:001、 a <- c(2, 3, 6) b <- c(3, 1, 4) temp = 0 ## 利用循环实现 for (i in 1:length(a)) { temp = temp + a[i] * b[i] } temp 2、内置函数实现 a <- c(2, 3, 6) b <- c(3, 1 阅读全文
posted @ 2022-08-24 15:49 小鲨鱼2018 阅读(100) 评论(0) 推荐(0) 编辑
摘要:001、前期处理: https://www.jianshu.com/p/4f7aeae81ef1 基本过程如上图: 001、左图数据为scale.data, pbmc[["RNA"]]@scale.data 002、中图数据为feature.loadings, pbmc[["pca"]]@featu 阅读全文
posted @ 2022-08-24 15:29 小鲨鱼2018 阅读(194) 评论(0) 推荐(0) 编辑
摘要:001、 dat <- data.frame(matrix(, nrow = 5, ncol = 0)) ## 创建空数据框, 指定行数为5 dat a = 1:5 cbind(dat, a) ## 可以实现直接合并新的列 阅读全文
posted @ 2022-08-24 14:46 小鲨鱼2018 阅读(455) 评论(0) 推荐(0) 编辑
摘要:001、数据的归一化是在数据的标准化的基础上进行的,而且是按照行来进行的, 即: (每一行的观测值 - 每一行的平均值)/每一行的标准差 验证: a、前期步骤参考:https://www.jianshu.com/p/4f7aeae81ef1 b、 all.genes <- rownames(pbmc 阅读全文
posted @ 2022-08-24 12:33 小鲨鱼2018 阅读(208) 评论(0) 推荐(0) 编辑
摘要:001、 一下查询结果显示没有安装。 pkgbuild::find_rtools(debug = TRUE) 002、安装rtools(以版本对应) 下载rtools:https://cran.r-project.org/bin/windows/Rtools/ 003、双击下载好的安装包进行安装, 阅读全文
posted @ 2022-08-23 22:57 小鲨鱼2018 阅读(3632) 评论(0) 推荐(0) 编辑
摘要:001、问题 002、解决方法 BiocManager::install("pbmc3k.SeuratData") 阅读全文
posted @ 2022-08-23 22:41 小鲨鱼2018 阅读(672) 评论(0) 推荐(0) 编辑
摘要:001、 >>> list1 = ["aa", "bb", "aa", "cc", "aa", "aa", "cc","ee"] ## 测试列表 >>> list1 ['aa', 'bb', 'aa', 'cc', 'aa', 'aa', 'cc', 'ee'] >&g 阅读全文
posted @ 2022-08-23 20:34 小鲨鱼2018 阅读(131) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test3# ls a.txt (base) root@PC1:/home/test3# cat a.txt ## 测试数据 1 aa 2 bb 3 aa 4 cc 5 dd 6 cc 7 kk 8 aa 9 kk ## 根据第二列的重复项筛选数 阅读全文
posted @ 2022-08-23 20:16 小鲨鱼2018 阅读(253) 评论(0) 推荐(0) 编辑
摘要:001、 library(dplyr) dat <- read.table("xx.map", header = F) ## 测试数据 dat dat %>% group_by(V1) %>% top_n(n = 2, wt = V2) ## 以第一列分类, 然后按照第二列从大到小排序,并提取前两个 阅读全文
posted @ 2022-08-23 19:59 小鲨鱼2018 阅读(731) 评论(0) 推荐(0) 编辑
摘要:001、 test <- as.factor(c(2, 3, 7, 8)) test as.numeric(test) ## 不能直接将因子型转换为数值型 as.numeric(as.character(test)) ## 先转换为字符,然后转换为数值 阅读全文
posted @ 2022-08-22 23:09 小鲨鱼2018 阅读(357) 评论(0) 推荐(0) 编辑
摘要:001、 dat3 <- matrix(1:16, nrow = 4, byrow = T) dat3 min(dat3) mean(dat3) max(dat3) dat3[] <- 0 ## 将矩阵元素全部设置为0(可以为任意元素) dat3 阅读全文
posted @ 2022-08-21 23:48 小鲨鱼2018 阅读(444) 评论(0) 推荐(0) 编辑
摘要:001、删除第一列 (base) root@PC1:/home/test# cat test.txt 1 MIR1302-10 1 2 FAM138A 2 3 OR4F5 3 4 RP11-34P13.7 4 5 RP11-34P13.8 5 6 AL627309.1 6 7 RP11-34P13. 阅读全文
posted @ 2022-08-21 23:28 小鲨鱼2018 阅读(1601) 评论(0) 推荐(0) 编辑
摘要:001、 >>> [[0] * 5 for i in range(3)] ## 生成3行5列,元素为0的矩阵 [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] 002、 >>> [ [1, 2, 3] * 2 for i in range(6)] 阅读全文
posted @ 2022-08-20 01:38 小鲨鱼2018 阅读(305) 评论(0) 推荐(0) 编辑
摘要:pyhton 中内置函数enumerate用于将序列生成二元组。 001、 >>> str1 = "hello!" ## 测试字符串 >>> for i in enumerate(str1): ## enumerate用于将序列生成二元组 ... print(i) ... (0, 'h') (1, 阅读全文
posted @ 2022-08-20 01:18 小鲨鱼2018 阅读(42) 评论(0) 推荐(0) 编辑
摘要:001、 >>> test1 = [] >>> test1 [] >>> if not test1: ## 判断列表为空 ... print("no element") ... no element 002、 >>> test1 = () >>> test1 () >>> if not test1: 阅读全文
posted @ 2022-08-20 01:05 小鲨鱼2018 阅读(525) 评论(0) 推荐(0) 编辑
摘要:001、读取fasta文件 root@PC1:/home/test# ls a.fasta root@PC1:/home/test# cat a.fasta ## 测试数据 >Rosalind_1 ATCCAGCT >Rosalind_2 GGGCAACT >Rosalind_3 ATGGATCT 阅读全文
posted @ 2022-08-20 00:38 小鲨鱼2018 阅读(197) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int test(int n) // 定义函数 { if(n > 0) { return n * test(n - 1); // 调用函数自身, 终止条件是n = 0 } else { return 1; } } int main(void) { in 阅读全文
posted @ 2022-08-19 00:56 小鲨鱼2018 阅读(198) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> enum set01 {aaa, bbb, ccc, ddd}; // 表示一定整数值的集合的枚举类型。0, 1, 2, 3 int main(void) { printf("aaa: %d\n", aaa); printf("bbb: %d\n", 阅读全文
posted @ 2022-08-19 00:20 小鲨鱼2018 阅读(32) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> #define NUMBER 5 void psort(int x[], int n) { int i, j; for(i = 0; i < n - 1; i++) //冒泡排序法, 外层循环每循环一次,将最大值,移动至最左端 { for(j = n 阅读全文
posted @ 2022-08-18 23:29 小鲨鱼2018 阅读(207) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> #define xxx(str) {putchar('\a'); puts(str);} // 函数使用; 花括号内为完整的代码块,末尾有分号, 因此main函数ti第一个if之后不再加分号; int main(void) { int i; print 阅读全文
posted @ 2022-08-18 23:02 小鲨鱼2018 阅读(107) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> #define diff(x, y) (x - y) ## 函数式宏, diff函数中的参数,将按照 (x -y)在函数中展开 int main(void) { int a, b; double m, n; printf("a = "); scanf( 阅读全文
posted @ 2022-08-18 22:41 小鲨鱼2018 阅读(74) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat a.fasta ## 测试数据 >Rosalind_1 ATCCAGCT >Rosalind_2 GGGCAACT >Rosalind_3 ATGGATCT > 阅读全文
posted @ 2022-08-18 19:14 小鲨鱼2018 阅读(176) 评论(0) 推荐(0) 编辑
摘要:001、方法1 root@PC1:/home/test# ls test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python str1 = "GATATATGCATATACTT" str2 = "ATAT" result = [ 阅读全文
posted @ 2022-08-18 17:27 小鲨鱼2018 阅读(110) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test# ls test.py root@PC1:/home/test# cat test.py ## 测试程序(起初1只兔子f[1],兔子每隔一个月有繁殖能力,没繁殖一次生3只兔子) #!/usr/bin/pyton f = [1] * 5 ## 生成一个 阅读全文
posted @ 2022-08-18 16:23 小鲨鱼2018 阅读(170) 评论(0) 推荐(0) 编辑
摘要:001、方法1 root@PC1:/home/test# ls test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python str1 = "GAGCCTACTAACGGGAT" ## 两天等长序列 str2 = "CATCGT 阅读全文
posted @ 2022-08-18 15:35 小鲨鱼2018 阅读(205) 评论(0) 推荐(0) 编辑
摘要:001、 >>> test1 = ["aaa", 100, 200] >>> test1 ['aaa', 100, 200] >>> test2 = [str(k) for k in test1] ## 将列表test1中的数值转换为字符串 >>> test2 ['aaa', '100', '200 阅读全文
posted @ 2022-08-18 08:27 小鲨鱼2018 阅读(497) 评论(0) 推荐(0) 编辑
摘要:001、方法1 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat a.fasta ## 测试fasta文件 >Rosalind_6404 CCTGCGGAAGATCGGCACTAGAATAGCCAGAACCGTTTCTC 阅读全文
posted @ 2022-08-18 08:17 小鲨鱼2018 阅读(105) 评论(0) 推荐(0) 编辑
摘要:001、输出最小、最大的键或者值 >>> dict1 = {"c":800, "d":600, "a":900, "b":700} >>> dict1 {'c': 800, 'd': 600, 'a': 900, 'b': 700} >>> min(dict1) ## 输出最小的键 'a' >>> 阅读全文
posted @ 2022-08-18 08:03 小鲨鱼2018 阅读(1828) 评论(0) 推荐(0) 编辑
摘要:001、方法1: root@PC1:/home/test# ls test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python out_file = open("result.txt", "w") str1 = "AAAACCC 阅读全文
posted @ 2022-08-18 07:29 小鲨鱼2018 阅读(192) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int count_bits(unsigned x) //此处定义函数, 用于返回任意unsigned 整型以二进制位表示时,1的总个数 { int bits = 0; while(x) { if(x & 1U) { bits++; } x >>= 1 阅读全文
posted @ 2022-08-18 03:27 小鲨鱼2018 阅读(1229) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int count_1(unsigned x) //此处定义一个统计unsigned int型数据用二进制位表示时所有1的个数 { int count = 0; while(x) { if(x & 1U) { count++; } x >>= 1; } 阅读全文
posted @ 2022-08-18 02:14 小鲨鱼2018 阅读(278) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int count_1(unsigned x) //定义统计unsigned int型数据二进制位1的个数的函数 { int count = 0; while(x) { if(x & 1U) { count++; } x >>= 1; } return 阅读全文
posted @ 2022-08-18 01:49 小鲨鱼2018 阅读(91) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int main(void) { unsigned int x; printf("x = "); scanf("%u", &x); // 输出整数类数据 int count = 0; while(x) { if(x & 1U) // 判断x二进制表示时 阅读全文
posted @ 2022-08-18 01:05 小鲨鱼2018 阅读(89) 评论(0) 推荐(0) 编辑
摘要:c语言中 1u表示 unsigned int 型的1. 即无符号型的整数1. & : 在c语言中表示整数类中按位操作的逻辑与运算符。(按位操作的逻辑运算符& 不同于逻辑运算符&&) unsigned x & 1U: 判断x二进制表示时末尾的数字是0还是1; 如果x的二进制位的末尾是1, 则x & 1 阅读全文
posted @ 2022-08-18 00:43 小鲨鱼2018 阅读(2748) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test4# ls test.py (base) root@PC1:/home/test4# cat test.py ## 测试程序 #!/usr/bin/python str1 = "AGCTTTTCATTCTGACTGCAACGGGCAATA 阅读全文
posted @ 2022-08-17 23:32 小鲨鱼2018 阅读(118) 评论(0) 推荐(0) 编辑
摘要:001、 capitalize将字符串的首字符转换为大写, 其余全部转换为小写 >>> str1 = "aaBBccEEff" >>> str1 'aaBBccEEff' >>> str1.capitalize() ## 将字符串首字符转换为大写, 其余全部转换为小写 'Aabbcceeff' 00 阅读全文
posted @ 2022-08-17 21:35 小鲨鱼2018 阅读(742) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test4# ls test.py (base) root@PC1:/home/test4# cat test.py ## 测试程序 #!/usr/bin/python rna = "AUGGCCAUGGCGCCCAGAACUGAGAUCAAUA 阅读全文
posted @ 2022-08-17 20:46 小鲨鱼2018 阅读(182) 评论(0) 推荐(0) 编辑
摘要:001、列出当前工作目录 >>> import os >>> os.getcwd() ## 列出当前目录 '/home/test4' 002、修改工作目录 >>> os.chdir("/home/test3/") ## 修改当前的工作目录 >>> os.getcwd() '/home/test3' 阅读全文
posted @ 2022-08-17 18:44 小鲨鱼2018 阅读(62) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt ## 测试数据 ##1 ##2 ##3 4 i 6 y #kk mm a 9 7 6 (base) root@PC1:/home/tes 阅读全文
posted @ 2022-08-17 18:12 小鲨鱼2018 阅读(84) 评论(0) 推荐(0) 编辑
摘要:001、n (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 5 (base) root@PC1:/home/test4# sed 'n;p' a.txt ## n的作用是将两行作 阅读全文
posted @ 2022-08-17 17:05 小鲨鱼2018 阅读(332) 评论(0) 推荐(0) 编辑
摘要:001: p:输出缓冲区中的所有内容。 P:输出缓冲区中一个个换行符之前的内容 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 5 ## N的作用是预先读取下一行,将两行作为一行 阅读全文
posted @ 2022-08-17 16:53 小鲨鱼2018 阅读(823) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 34aaaa 5 6 7 aaaa 8 9 10 (base) root@PC1:/home/test4# sed '$ 阅读全文
posted @ 2022-08-17 16:25 小鲨鱼2018 阅读(382) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 34aaaa 5 6 7 aaaa 8 9 10 (base) root@PC1:/home/test4# sed -e:b -e '$!{N;1,1bb' -e\} -e '/\n.*aaa/! 阅读全文
posted @ 2022-08-17 16:20 小鲨鱼2018 阅读(883) 评论(0) 推荐(0) 编辑
摘要:001、方法1 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# head -n 5 a.fasta ## 参考基因组文件 >NC_056054.1 Ovis aries strain OAR_USU_Benz2616 bree 阅读全文
posted @ 2022-08-17 07:56 小鲨鱼2018 阅读(198) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt e ds d g d E d G D f (base) root@PC1:/home/test4# sed 's/e/MMM/' a.t 阅读全文
posted @ 2022-08-17 06:12 小鲨鱼2018 阅读(2111) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 (base) root@PC1:/home/test2# sed 'n; 阅读全文
posted @ 2022-08-17 01:24 小鲨鱼2018 阅读(203) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt 1 2 3 4 5 6 7 8 9 10 (base) root@PC1:/home/test2# cat a.txt | sed 'N 阅读全文
posted @ 2022-08-17 01:21 小鲨鱼2018 阅读(771) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt ## 测试数据 This is 1 This is 2 This is 3 This is 4 This is 5 (base) roo 阅读全文
posted @ 2022-08-17 01:18 小鲨鱼2018 阅读(298) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt ## 测试数据 01 02 AAA 03 04 05 BBB 06 07 08 CCC 09 10 (base) root@PC1:/h 阅读全文
posted @ 2022-08-17 01:07 小鲨鱼2018 阅读(531) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# cat a.txt ## 测试数据 1 2 3 k 4 5 6 7 k 8 9 10 (base) root@PC1:/home/test2# sed '/k/{n;d}' a.txt ## 删除匹配k之后的一行 1 2 3 k 5 阅读全文
posted @ 2022-08-17 00:57 小鲨鱼2018 阅读(67) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# cat a.txt ## 测试数据 1 2 3 k 4 5 6 7 k 8 9 10 (base) root@PC1:/home/test2# sed '/k/, +2{/k/b; d}' a.txt ## 删除匹配k之后的两行 1 阅读全文
posted @ 2022-08-17 00:54 小鲨鱼2018 阅读(614) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt ## 测试数据 1 2 3 k 4 5 6 7 k 8 9 10 (base) root@PC1:/home/test2# sed '/ 阅读全文
posted @ 2022-08-17 00:42 小鲨鱼2018 阅读(49) 评论(0) 推荐(0) 编辑
摘要:001、方法1 root@PC1:/home/test# ls a.txt test.py root@PC1:/home/test# cat a.txt ## 测试数据 #chromosome nc_accession gene gene_id ccds_id ccds_status cds_str 阅读全文
posted @ 2022-08-16 23:18 小鲨鱼2018 阅读(146) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# cat a.txt ## 测试数据 e f k s g d a c m s e g (base) root@PC1:/home/test2# sed 's/m/Q/g' a.txt ## 将m替换为Q e f k s g d a c 阅读全文
posted @ 2022-08-16 21:23 小鲨鱼2018 阅读(385) 评论(0) 推荐(0) 编辑
摘要:001、 >>> test = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"] ## 测试列表 >>> test ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h 阅读全文
posted @ 2022-08-16 18:39 小鲨鱼2018 阅读(2466) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test/test# ls a.txt root@PC1:/home/test/test# cat a.txt ## 测试数据 a b c d b d k 8 m 9 k d 0 r k b f f b 8 b 9 k d root@PC1:/home/tes 阅读全文
posted @ 2022-08-16 18:09 小鲨鱼2018 阅读(46) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test/test# ls a.txt root@PC1:/home/test/test# cat a.txt ## 测试数据 a b c d 3 8 6 9 0 r k 3 root@PC1:/home/test/test# awk '{for(i = 1; 阅读全文
posted @ 2022-08-16 17:56 小鲨鱼2018 阅读(268) 评论(0) 推荐(0) 编辑
摘要:001、 c语言中整数类变量一共包含四个基本类型。 001、char型 002、 short int型 003、int型 004、long int型。 其中每种基本类型分为signed型 和 unsigned型, 也就是有符号型和无符号型, 但是有符号型和无符号型的长度是一样的。 #include 阅读全文
posted @ 2022-08-16 02:52 小鲨鱼2018 阅读(1182) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> #include <limits.h> ## CHAR_BIT定义了char型所占用的位数, 该变量定义在limits.h头文件中 int main(void) { printf("CHAR_BIT = %d\n", CHAR_BIT); return 阅读全文
posted @ 2022-08-16 02:40 小鲨鱼2018 阅读(245) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> // 文件包含指令, 头文件 int main(void) { unsigned i; // 声明一个unsigned int 型的变量。 printf("i = "); scanf("%u", &i); // 此处从键盘输入,使用%u运算符 int 阅读全文
posted @ 2022-08-16 02:33 小鲨鱼2018 阅读(120) 评论(0) 推荐(0) 编辑
摘要:c语言中 1u: 表示是unsigned 1; 其二进制表示形式是 0000 0000 0000 0001. (此处假定int型的长度为2字节,1个字节8位); x & 1u: &符号表示按位操作的逻辑与运算,即两者都为1时,结果才为1. if (x & 1u)实质上就是判断x用二进制表示时,末尾的 阅读全文
posted @ 2022-08-16 02:12 小鲨鱼2018 阅读(967) 评论(0) 推荐(0) 编辑
摘要:对于整数内部的位,有4种逻辑运算。 a、逻辑与, &, 两者都为1时结果为1. b、逻辑或, |, 两者只要一个为1结果就为1. c、逻辑异或,^,有且只有一个为1结果才为1. d、反码, ~,如果是0,结果是1; 如果是1,结果为0. a & b; 对操作数的各二进制位进行逻辑运算。 5 & 4 阅读全文
posted @ 2022-08-16 01:02 小鲨鱼2018 阅读(103) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test# ls a.fasta target.txt test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fasta", "r") targ 阅读全文
posted @ 2022-08-15 18:32 小鲨鱼2018 阅读(51) 评论(0) 推荐(0) 编辑
摘要:001、 方法1 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fasta", "r") dict1 = dic 阅读全文
posted @ 2022-08-15 18:17 小鲨鱼2018 阅读(40) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fasta", "r") dict1 = dict() 阅读全文
posted @ 2022-08-15 18:04 小鲨鱼2018 阅读(89) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fasta", "r") dict1 = {} for 阅读全文
posted @ 2022-08-15 17:58 小鲨鱼2018 阅读(105) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# cat test.py ## 测试程序 #1/usr/bin/python in_file = open("a.fasta", "r") dict1 = dict() 阅读全文
posted @ 2022-08-15 17:46 小鲨鱼2018 阅读(99) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fasta", "r") dict1 = {} for i in in_file: i = i.strip() if i.startsw 阅读全文
posted @ 2022-08-15 17:27 小鲨鱼2018 阅读(114) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test# ls a.fastq test.py root@PC1:/home/test# cat a.fastq ## 测试fastq文件 @DJB775P1:248:D0MDGACXX:7:1202:12362:49613 TGCTTACTCTGCGTTG 阅读全文
posted @ 2022-08-15 16:51 小鲨鱼2018 阅读(126) 评论(0) 推荐(0) 编辑
摘要:001、 split + join实现 >>> str1 = 'abcdedfg' >>> str1 'abcdedfg' >>> str1.split('d') ## 拆分为列表 ['abc', 'e', 'fg'] >>> "".join(str1.split('d')) ## 组合成字符串 ' 阅读全文
posted @ 2022-08-15 16:44 小鲨鱼2018 阅读(777) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test# ls a.fastq test.py root@PC1:/home/test# cat a.fastq ## 测试fastq文件 @DJB775P1:248:D0MDGACXX:7:1202:12362:49613 TGCTTACTCTGCGTTG 阅读全文
posted @ 2022-08-15 16:28 小鲨鱼2018 阅读(410) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test# ls a.fastq test.py root@PC1:/home/test# cat a.fastq ## 测试fastq文件 @DJB775P1:248:D0MDGACXX:7:1202:12362:49613 TGCTTACTCTGCGTTG 阅读全文
posted @ 2022-08-15 16:03 小鲨鱼2018 阅读(203) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test# ls a.fastq test.py root@PC1:/home/test# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.fastq", "r") out_file = open 阅读全文
posted @ 2022-08-15 15:53 小鲨鱼2018 阅读(135) 评论(0) 推荐(0) 编辑
摘要:001、 >>> set1 = {"a", "b", "c", "d"} ## 测试集合 >>> set1 {'c', 'a', 'd', 'b'} >>> set1.remove("d") ## 删除集合中的元素 >>> set1 {'c', 'a', 'b'} >>> set1.add(&qu 阅读全文
posted @ 2022-08-15 14:49 小鲨鱼2018 阅读(78) 评论(0) 推荐(0) 编辑
摘要:001、 >>> dict1 = {"a":100, "b":200, "c":300, "d":400, "e":500} ## 测试字典 >>> dict1 {'a': 100, 'b': 200, 'c': 300, 'd': 400, 'e': 500} >>> dict1.get("b") 阅读全文
posted @ 2022-08-15 14:37 小鲨鱼2018 阅读(148) 评论(0) 推荐(0) 编辑
摘要:001、利用内置函数update实现 >>> dict1 = {"a":100, "b":200} ## 测试字典1 >>> dict1 {'a': 100, 'b': 200} >>> dict2 = {"c":300, "d":400} ## 测试字典2 >>> dict2 {'c': 300, 阅读全文
posted @ 2022-08-15 14:26 小鲨鱼2018 阅读(139) 评论(0) 推荐(0) 编辑
摘要:001、 直接利用索引实现 >>> test1 = {"a":100, "b":200, "c":300, "d":400} ## 测试字典 >>> test1 {'a': 100, 'b': 200, 'c': 300, 'd': 400} >>> test1["b"] = 8888 ## 更新字 阅读全文
posted @ 2022-08-15 14:15 小鲨鱼2018 阅读(426) 评论(0) 推荐(0) 编辑
摘要:001、利用索引实现 >>> test1 = {"a":100, "b":200, "c":300, "d":400} ## 测试字典 >>> test1 {'a': 100, 'b': 200, 'c': 300, 'd': 400} >>> test1["e"] = 500 ## 直接利用索引实 阅读全文
posted @ 2022-08-15 14:10 小鲨鱼2018 阅读(1364) 评论(0) 推荐(0) 编辑
摘要:001、 >>> test1 = ["a", "b", "c", "d", "e", "f", "g"] ## 测试列表 >>> test1 ['a', 'b', 'c', 'd', 'e', 'f', 'g'] >>> test1[2:-2] ## 同时删除首尾的两个字符 ['c&# 阅读全文
posted @ 2022-08-15 13:44 小鲨鱼2018 阅读(38) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> #include <limits.h> int main(void) { printf("CHAR_BIT: %d\n", CHAR_BIT); return 0; } 阅读全文
posted @ 2022-08-15 02:21 小鲨鱼2018 阅读(60) 评论(0) 推荐(0) 编辑
摘要:001、 c语言中将表示字符的char型的长度定义为1. #include <stdio.h> #include <limits.h> int main(void) { printf("sizeof(char) = %u\n", (unsigned)sizeof(char)); printf("si 阅读全文
posted @ 2022-08-15 02:14 小鲨鱼2018 阅读(382) 评论(0) 推荐(0) 编辑
摘要:001、字符型和整型可以归纳为四大类。 char、 short int、 int、 long int。 char可以归为3类: char、signed char、unsigned char; short int可以归为两类: signed short int、 unsigned short int; 阅读全文
posted @ 2022-08-15 01:31 小鲨鱼2018 阅读(493) 评论(0) 推荐(0) 编辑
摘要:001、二进制数、八进制数、16进制数向十进制转换 转换规则: 002、十进制数向二进制、八进制、16位进制数转换 阅读全文
posted @ 2022-08-15 00:45 小鲨鱼2018 阅读(353) 评论(0) 推荐(0) 编辑
摘要:001、自动存储期: 在函数中不使用存储类说明符static而定义出的对象(变量),被赋予了自动存储期,它具有以下特性: 程序执行到对象声明的时候就创建出了相应的对象。而执行到包含该声明的程序块的结尾,也就是大括号的时候,该对象就会消失。 也就是说,该对象拥有短暂的寿命,另外,如果不显式地进行初始化 阅读全文
posted @ 2022-08-14 23:26 小鲨鱼2018 阅读(97) 评论(0) 推荐(0) 编辑
摘要:001、 文件作用域: 定义在函数外, 从定义开始到程序的结束均有效。 002、 块作用域: 定义在程序块内, 在程序块中起作用。 001、如果两个同名变量分别拥有文件作用域和块作用域, 那么只有拥有块作用域的变量是“可见”的, 而拥有文件作用域的变量会被“隐藏”起来。(块作用域的优先级高于文件作用 阅读全文
posted @ 2022-08-14 23:12 小鲨鱼2018 阅读(176) 评论(0) 推荐(0) 编辑
摘要:001、 >>> str1 = "xabdxyabxykk" ## 测试字符串 >>> str1 'xabdxyabxykk' >>> str1.find("ab") ## 返回测试字符串中首次匹配ab的首字符的索引 1 >>> str1.find("ab", 3) ## 指定在字符串中匹配的起始位 阅读全文
posted @ 2022-08-14 17:02 小鲨鱼2018 阅读(76) 评论(0) 推荐(0) 编辑
摘要:文章来源:https://www.jianshu.com/p/2475c3240a67 简化的短序列匹配程序 (map.py) 把short.fa中的序列比对到ref.fa, 输出短序列匹配到ref.fa文件中哪些序列的哪些位置。 f1 = r'E:\Bioinformatics\Python\pr 阅读全文
posted @ 2022-08-14 16:54 小鲨鱼2018 阅读(85) 评论(0) 推荐(0) 编辑
摘要:001、 >>> test1 = "100 200" ## test1为字符串 >>> test1 '100 200' >>> a,b = test1.split() ## 拆分字符串,直接赋值给变量名 >>> a '100' >>> b '200' >>> test2 = [500, 1000] 阅读全文
posted @ 2022-08-14 16:32 小鲨鱼2018 阅读(474) 评论(0) 推荐(0) 编辑
摘要:001、 方法1 root@PC1:/home/test3# ls a.txt test.py root@PC1:/home/test3# cat a.txt ## 测试文件 ACTGCCCTAAGTGCTCCTTCTGGC 2 ATAAGGTGCATCTAGTGCAGATA 25 TGAGGTAG 阅读全文
posted @ 2022-08-14 16:10 小鲨鱼2018 阅读(59) 评论(0) 推荐(0) 编辑
摘要:001、方法1 root@PC1:/home/test3# ls test.py root@PC1:/home/test3# cat test.py ## 测试程序 #!/usr/bin/python result = "" str1 = "ACGTACGTACGTCACGTCAGCTAGAC" # 阅读全文
posted @ 2022-08-14 15:30 小鲨鱼2018 阅读(156) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test3# ls a.txt test.py root@PC1:/home/test3# cat test.py ## 测试程序 #!/usr/bin/python in_file = open("a.txt", "r") lines = in_file.r 阅读全文
posted @ 2022-08-14 14:53 小鲨鱼2018 阅读(384) 评论(0) 推荐(0) 编辑
摘要:001、 >>> "{0}".format("xxx") ## 位置参数 'xxx' >>> "{0}.{1}.{2}".format("xxx", "yyy", "zzz") 'xxx.yyy.zzz' >>> "\t{0}.{1}.{2}".format("xxx", "yyy", "zzz") 阅读全文
posted @ 2022-08-14 14:09 小鲨鱼2018 阅读(34) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int main(void) { int i; int result = 0; printf("i = "); scanf("%d", &i); while(i > 0) { result = result * 10 + i % 10; i /= 10 阅读全文
posted @ 2022-08-14 02:44 小鲨鱼2018 阅读(29) 评论(0) 推荐(0) 编辑
摘要:001、 在函数定义中, 形参名不能和函数内部的变量同名, 否则会发生冲突。 002、 定义不同函数时, 可以使用不能的形参名, 因为虽然同名,但是分别属于不同的函数。 003、 在函数调用过程中, 实参可以和形参同名, 因为实参不属于调用函数的部分。 阅读全文
posted @ 2022-08-14 01:41 小鲨鱼2018 阅读(1267) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> //以下为函数定义 int max2(int a, int b) // 该句称为函数头;int 表示函数返回类型; max2表示函数名; int a 和int b为形参声明。 { if(a > b) return a; //此处花括号内为函数体 els 阅读全文
posted @ 2022-08-14 01:07 小鲨鱼2018 阅读(522) 评论(0) 推荐(0) 编辑
摘要:001、 元素为数组的数组: 二维数据 #include <stdio.h> int main(void) { int i, j; int tensu1[4][3] = {{91, 63, 78}, {67, 72, 46}, {89, 34, 53}, {32, 54, 34}}; int ten 阅读全文
posted @ 2022-08-14 00:28 小鲨鱼2018 阅读(95) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test3# ls a.map test.py root@PC1:/home/test3# cat a.map ## 测试数据 1 snp1 1 1 snp2 2 1 snp3 3 1 snp4 4 1 snp5 5 1 snp6 6 2 snp7 1 2 s 阅读全文
posted @ 2022-08-13 23:40 小鲨鱼2018 阅读(218) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test2# ls a.fasta scaffold.txt test.py root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene2 myc AGCTGCCTAAGC GGCATAGCTAATCG >gene 阅读全文
posted @ 2022-08-13 23:14 小鲨鱼2018 阅读(100) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene2 myc AGCTGCCTAAGC GGCATAGCTAATCG >gen 阅读全文
posted @ 2022-08-13 22:46 小鲨鱼2018 阅读(200) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG >gen 阅读全文
posted @ 2022-08-13 19:10 小鲨鱼2018 阅读(99) 评论(0) 推荐(0) 编辑
摘要:001、方法1 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG > 阅读全文
posted @ 2022-08-13 18:25 小鲨鱼2018 阅读(170) 评论(0) 推荐(0) 编辑
摘要:001、 >>> print("xxxx") ## 输出内容, 同时添加换行符 xxxx >>> print("xxxx", end = "") ## 输出内容, 不添加换行符 xxxx>>> 参考:https://blog.csdn.net/DisolveDislove/article/detai 阅读全文
posted @ 2022-08-13 18:18 小鲨鱼2018 阅读(344) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG >gen 阅读全文
posted @ 2022-08-13 18:12 小鲨鱼2018 阅读(150) 评论(0) 推荐(0) 编辑
摘要:001、问题 (base) root@PC1:/home/test2# curl -O ftp://ftp.arabidopsis.org/home/tair/Genes/TAIR10_genome_release/TAIR10_gff3/TAIR10_GFF3_genes.gff curl: er 阅读全文
posted @ 2022-08-13 17:53 小鲨鱼2018 阅读(3501) 评论(0) 推荐(0) 编辑
摘要:001、 >>> import openpyxl ## 导入包 >>> import numpy as np >>> import pandas as pd >>> s1=list('ATGATAGCAGTGAAATGGG') ## 将序列储存为列表 >>> s1 ['A', 'T', 'G', ' 阅读全文
posted @ 2022-08-13 16:36 小鲨鱼2018 阅读(94) 评论(0) 推荐(0) 编辑
摘要:001、 >>> test = [("a",100), ("b", 200), ("c", 300)] >>> test [('a', 100), ('b', 200), ('c', 300)] >>> dict(test) ## 列表转换为字典 {'a': 100, 'b': 200, 'c': 阅读全文
posted @ 2022-08-13 16:14 小鲨鱼2018 阅读(417) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> #define NUMBER 5 // 此处为对象式宏, 运行程序时, main函数体内的NUMBER将被替换为5 int main(void) { int i; int tensu[NUMBER]; int sum = 0; printf("plea 阅读全文
posted @ 2022-08-13 00:45 小鲨鱼2018 阅读(51) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> #define NUMBER 7 int main(void) { int i, temp; int array[NUMBER]; puts("please input the arrays."); for(i = 0; i < NUMBER; i++ 阅读全文
posted @ 2022-08-13 00:37 小鲨鱼2018 阅读(173) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int main(void) { int i; puts("please input an positive num."); printf("i = "); scanf("%d", &i); while (i > 0) { printf("%d", i 阅读全文
posted @ 2022-08-12 22:04 小鲨鱼2018 阅读(159) 评论(0) 推荐(0) 编辑
摘要:001、c语言中字符常量用单引号括起来, 用putchar函数输出。 字符常量是 int类型。 字符常量为什么是int型? #include <stdio.h> int main(void) { int i; for (i = 1; i <= 5; i++) { putchar('*'); ## 单 阅读全文
posted @ 2022-08-12 20:48 小鲨鱼2018 阅读(555) 评论(0) 推荐(0) 编辑
摘要:001、 >>> dict1 = {"d":400, "a":300, "e":500, "b":700, "c":600} ## 测试字典 >>> dict1 {'d': 400, 'a': 300, 'e': 500, 'b': 700, 'c': 600} >>> sorted(dict1.k 阅读全文
posted @ 2022-08-12 20:15 小鲨鱼2018 阅读(106) 评论(0) 推荐(0) 编辑
摘要:001、 >>> test = [10, 20, 10, 30, 30, 10, 40, 10, 30] ## 测试列表 >>> from collections import Counter as ct ## 借助Counter函数实现 >>> ct(test) Counter({10: 4, 3 阅读全文
posted @ 2022-08-12 17:33 小鲨鱼2018 阅读(141) 评论(0) 推荐(0) 编辑
摘要:001、 >>> import re >>> str = "sefderfhjuynb" >>> re.findall(".{3}", str) ## 步长为3 ['sef', 'der', 'fhj', 'uyn'] >>> re.findall(".{2}", str) ## 步长为2 ['se 阅读全文
posted @ 2022-08-12 17:19 小鲨鱼2018 阅读(228) 评论(0) 推荐(0) 编辑
摘要:001、 root@PC1:/home/test2# ls test.py root@PC1:/home/test2# cat test.py ## 测试程序 #!/usr/bin/python out_file = open("result.txt", "w") for i in range(1, 阅读全文
posted @ 2022-08-12 16:41 小鲨鱼2018 阅读(248) 评论(0) 推荐(0) 编辑
摘要:001、 continue表示跳过后面的程序,重新循环,而pass表示站位,什么也不做,后面的代码(else之前)还是会执行, 好多情况下是没有想清楚这部分应该怎么写,所以先用pass站位,能让程序顺利跑起来。等想好这部分怎么写了,再替换掉pass部分 root@PC1:/home/test2# l 阅读全文
posted @ 2022-08-12 15:57 小鲨鱼2018 阅读(360) 评论(0) 推荐(0) 编辑
摘要:001、首个字符查找 >>> seq = 'ATGTGACCCTGATTTTGAATGatgAtgAtGaTGaTg' ## 测试字符串 >>> seq.find('ATG') ## 字符串内建函数find返回第一个匹配字符的索引 0 >>> seq.find('GAC') 4 >>> seq.fi 阅读全文
posted @ 2022-08-12 14:32 小鲨鱼2018 阅读(482) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >OR4F5_ENSG00000186092_ENST00000641515_61_1 阅读全文
posted @ 2022-08-12 13:30 小鲨鱼2018 阅读(93) 评论(0) 推荐(0) 编辑
摘要:001、 fasta序列迭代 (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG >gene2 jun ACCGAATCGGAGCGATG GGCATTAAAGATC 阅读全文
posted @ 2022-08-12 12:39 小鲨鱼2018 阅读(348) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int main(void) { printf("!0 = %d\n", !0); // !+ 0, 返回1 printf("!5 = %d\n", !5); printf("!-3 = %d\n", !-3); // ! + 非0, 返回0 retu 阅读全文
posted @ 2022-08-12 01:01 小鲨鱼2018 阅读(1054) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int main(void) { int i; do { puts("0: stone; 1: scissors; 2: colth"); printf("i = "); scanf("%d", &i); if(i > 2 || i <0) { put 阅读全文
posted @ 2022-08-12 00:56 小鲨鱼2018 阅读(433) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int main(void) { int i; do { int random; printf("random = "); scanf("%d", &random); if (random % 2) { puts("odd"); } else { pu 阅读全文
posted @ 2022-08-12 00:42 小鲨鱼2018 阅读(264) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int main(void) { int i; printf("i = "); scanf("%d", &i); switch(i % 3) ## 条件 { case 0: puts("can be devided by 3."); break; ## 阅读全文
posted @ 2022-08-12 00:13 小鲨鱼2018 阅读(140) 评论(0) 推荐(0) 编辑
摘要:001\ #include <stdio.h> int main(void) { int i, j, max; puts("please input two integers"); printf("i = "); scanf("%d", &i); printf("j = "); scanf("%d" 阅读全文
posted @ 2022-08-11 23:30 小鲨鱼2018 阅读(736) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int main(void) { int i, j; printf("i = "); scanf("%d", &i); printf("j = "); scanf("%d", &j); printf("last digit of i: %d\n", i 阅读全文
posted @ 2022-08-11 22:58 小鲨鱼2018 阅读(242) 评论(0) 推荐(0) 编辑
摘要:001、0在linux 中表示True? root@PC1:/home/test2# [ 3 -gt 1 ] ## 判断为真, 这$?为0, True为0?? root@PC1:/home/test2# echo $? 0 002、python 中True表示为1 >>> False + False 阅读全文
posted @ 2022-08-11 22:01 小鲨鱼2018 阅读(347) 评论(0) 推荐(0) 编辑
摘要:001、获取反向序列 >>> myseq = 'AGCTGGCTA' >>> myseq[::-1] ## 利用切片实现 'ATCGGTCGA' >>> temp = [] >>> for i in reversed(myseq): ## 借助reversed函数实现 ... temp.append 阅读全文
posted @ 2022-08-11 21:10 小鲨鱼2018 阅读(868) 评论(0) 推荐(0) 编辑
摘要:001、 >>> import time ## 导入time包 >>> start = time.time() ## 记录程序开始时间 >>> print("xxxxx") xxxxx >>> end = time.time() ## 记录程序结束时间 >>> print("elapsed:", e 阅读全文
posted @ 2022-08-11 20:48 小鲨鱼2018 阅读(165) 评论(0) 推荐(0) 编辑
摘要:001、保存为字典 (base) root@PC1:/home/test2# ls a.fastq test.py (base) root@PC1:/home/test2# cat a.fastq ## 测试fastq文件 @SRR1596091.1 HISEQ:62:C35RDACXX:2:110 阅读全文
posted @ 2022-08-11 20:33 小鲨鱼2018 阅读(89) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG >gen 阅读全文
posted @ 2022-08-11 19:46 小鲨鱼2018 阅读(244) 评论(0) 推荐(0) 编辑
摘要:001、 >>> str1 = "abeababxxxaacdx" >>> dict1 = {} >>> for i in str1: ## 利用循环结构,将字符串中每个字符出现的次数储存在字典中 ... dict1[i] = str1.count(i) ... >>> for i in dict1 阅读全文
posted @ 2022-08-11 19:39 小鲨鱼2018 阅读(1544) 评论(0) 推荐(0) 编辑
摘要:001、 >>> str1 = "abcdabaewr" ## 测试字符串 >>> import re >>> len(re.findall("a", str1)) ## 统计a出现的次数 3 >>> len(re.findall("b", str1)) ## 统计b出现的次数 2 >>> len( 阅读全文
posted @ 2022-08-11 19:35 小鲨鱼2018 阅读(357) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG >gen 阅读全文
posted @ 2022-08-11 19:24 小鲨鱼2018 阅读(132) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG >gen 阅读全文
posted @ 2022-08-11 19:07 小鲨鱼2018 阅读(115) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls collective.txt (base) root@PC1:/home/test2# cat collective.txt ## 测试文件, 删除每个字符中/前的所有内容 test1/1.txt test1/2.txt te 阅读全文
posted @ 2022-08-11 16:16 小鲨鱼2018 阅读(952) 评论(0) 推荐(0) 编辑
摘要:001、方式1 (base) root@PC1:/home/test2# ls test1 test2 test3 (base) root@PC1:/home/test2# tree . ├── test1 │ ├── 1.txt │ ├── 2.txt │ └── 3.txt ├── test2 阅读全文
posted @ 2022-08-11 15:59 小鲨鱼2018 阅读(5481) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls ## 当前目录下三个文件夹 test1 test2 test3 (base) root@PC1:/home/test2# tree ## 使用tree命令查看 . ├── test1 │ ├── 1.txt │ ├── 2.t 阅读全文
posted @ 2022-08-11 15:48 小鲨鱼2018 阅读(1485) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt ## 测试数据 a b c e a d a d e a f j 3 j k r a d a a a a a a f f a e (bas 阅读全文
posted @ 2022-08-11 15:10 小鲨鱼2018 阅读(120) 评论(0) 推荐(0) 编辑
摘要:printf命令用于格式化输出 001、输出字符串 %s (base) root@PC1:/home/test2# printf "%s\n" abcde ## %s 输出字符串 abcde (base) root@PC1:/home/test2# printf "xxx--%s\n" abcde 阅读全文
posted @ 2022-08-11 14:26 小鲨鱼2018 阅读(1296) 评论(0) 推荐(0) 编辑
摘要:cmp命令用于判断两个文件是否相同 001、 (base) root@PC1:/home/test2# ls (base) root@PC1:/home/test2# seq 5 > a.txt; seq 3 > b.txt; seq 5 > c.txt ## 3个测试文件 (base) root@ 阅读全文
posted @ 2022-08-11 14:10 小鲨鱼2018 阅读(339) 评论(0) 推荐(0) 编辑
摘要:001、 [ -a FILE ] 如果 FILE 存在则为真。 [ -b FILE ] 如果 FILE 存在且是一个块特殊文件则为真。 [ -c FILE ] 如果 FILE 存在且是一个字特殊文件则为真。 [ -d FILE ] 如果 FILE 存在且是一个目录则为真。 [ -e FILE ] 如 阅读全文
posted @ 2022-08-11 13:51 小鲨鱼2018 阅读(356) 评论(0) 推荐(0) 编辑
摘要:-s选项; 01、文件不存在; 为假 02、文件存在,但是大小为空; 为假 03、文件存在,且大小不为空; 为真 001、 [ -s file ]:文件存在且不为0是为真。 (base) root@PC1:/home/test2# ls a.txt b.txt (base) root@PC1:/ho 阅读全文
posted @ 2022-08-11 13:46 小鲨鱼2018 阅读(907) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt 1 2 8 10 (base) root@PC1:/home/test2# cat -s a.txt ## 将多个连续的空行压缩为一个空 阅读全文
posted @ 2022-08-11 13:35 小鲨鱼2018 阅读(52) 评论(0) 推荐(0) 编辑
摘要:001、 = 判断字符串是否相同 (base) root@PC1:/home/test2# a=abcd (base) root@PC1:/home/test2# b=opqr (base) root@PC1:/home/test2# c=abcd ## 测试字符串 (base) root@PC1: 阅读全文
posted @ 2022-08-11 13:25 小鲨鱼2018 阅读(587) 评论(0) 推荐(0) 编辑
摘要:001、 #include <stdio.h> int main(void) { int a = 10; double b = 5.5; printf("a = %f\n", a); ## %f输出int型 printf("b = %d\n", b); ## %d输出double型 return 0 阅读全文
posted @ 2022-08-11 01:22 小鲨鱼2018 阅读(775) 评论(0) 推荐(0) 编辑
摘要:001、 运算对象, 即操作数的类型不同时,较小的数据类型操作数会转换为较大的数据类型(范围更大), 然后再进行运算。 例如 int + double型, 自动转换为double + double型。(因为double型比int型可以表示的范围更大。) 阅读全文
posted @ 2022-08-11 00:54 小鲨鱼2018 阅读(278) 评论(0) 推荐(0) 编辑
摘要:001、c语言中每种数据类型可存储额值都是有范围的。 例如,int类型的取值范围是-32767 到 32767。 例如声明int型 、double型变量时,分配的存储空间是不一样的,因此可以存储的数值范围就不一样。 这些数据类型都有一些固定的属性, 继承了这些属性而创建出来的实体变量称为对象。 阅读全文
posted @ 2022-08-11 00:32 小鲨鱼2018 阅读(758) 评论(0) 推荐(0) 编辑
摘要:001、单精度 #include <stdio.h> int main(void) { float i; puts("please input an float number."); printf("float i = "); scanf("%f", &i); ## 此处使用%f printf("i 阅读全文
posted @ 2022-08-11 00:26 小鲨鱼2018 阅读(2725) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta b.vcf test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >NC_000964.3 Bacillus subtilis subsp. 阅读全文
posted @ 2022-08-10 22:57 小鲨鱼2018 阅读(501) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >scaffold_1 CCCGGGTAAAACGGGTCTTCAAGAAAACGCTCCTCCGTT 阅读全文
posted @ 2022-08-10 01:24 小鲨鱼2018 阅读(185) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >scaffold_1 CCCGGGTAAAACGGGTCTTCAAGAAAACGCTCCTCCGTT 阅读全文
posted @ 2022-08-10 01:21 小鲨鱼2018 阅读(257) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta (base) root@PC1:/home/test2# sed '$a tag_tag' a.fasta -i ## 在fasta末尾添加一个标记tag_tag (base) root@PC1:/home/t 阅读全文
posted @ 2022-08-10 01:05 小鲨鱼2018 阅读(94) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta list.txt test.py (base) root@PC1:/home/test2# head a.fasta ## 基因组fasta文件 >NC_000964.3 Bacillus subtilis s 阅读全文
posted @ 2022-08-10 00:13 小鲨鱼2018 阅读(778) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test3# ls test.py (base) root@PC1:/home/test3# cat test.py ## 测试程序 #!/usr/bin/python def com_trs(str): list1 = [] str = rev 阅读全文
posted @ 2022-08-09 23:13 小鲨鱼2018 阅读(83) 评论(0) 推荐(0) 编辑
摘要:001、列表中 >>> list1 = list(range(11,20)) >>> list1 ## 测试列表 [11, 12, 13, 14, 15, 16, 17, 18, 19] >>> select = [2, 3, 7] ## 索引 >>> [list1[k] for k in sele 阅读全文
posted @ 2022-08-09 22:48 小鲨鱼2018 阅读(307) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# head a.fasta ## 测试数据 >scaffold_1 CCCGGGTAAAACGGGTCTTCAAGAAAACGCTCCTC 阅读全文
posted @ 2022-08-09 21:18 小鲨鱼2018 阅读(926) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.txt test.py (base) root@PC1:/home/test2# cat a.txt ## 测试数据 e d d f k d d e k d f j e f j (base) root@PC1:/home/ 阅读全文
posted @ 2022-08-09 17:09 小鲨鱼2018 阅读(492) 评论(0) 推荐(0) 编辑
摘要:001、 >>> import re ## 导入re包 >>> str = "aaaabbbbccccdddaaakkkk" ## 测试字符串 >>> re.sub(r"([ab])\1+", "Q", str) ## 将多个连续的a和b替换为一个Q 'QQccccdddQkkkk' 002、 >> 阅读全文
posted @ 2022-08-09 16:53 小鲨鱼2018 阅读(641) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls outcome.ped test.py (base) root@PC1:/home/test2# cat outcome.ped ## 测试文件 1 G G C C G G 2 G G G C G G 3 G G C C G 阅读全文
posted @ 2022-08-09 15:06 小鲨鱼2018 阅读(223) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# cat outcome.ped ## 测试文件 1 G G C C G G 2 G G G C G G 3 G G C C G G 4 G G C C G G 5 G G C C G G 6 G G C C G G 7 G G C 阅读全文
posted @ 2022-08-09 15:00 小鲨鱼2018 阅读(162) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试数据 >scaffold_1 CCCGGGTAAAACGGGTCTTCAAGAAAACGCTCCTCC 阅读全文
posted @ 2022-08-09 13:04 小鲨鱼2018 阅读(142) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test3# ls a.txt test.py (base) root@PC1:/home/test3# cat a.txt ## 测试数据 ddd ff ff jkj jj dffffffgg dgfggggg k fff iyyee (bas 阅读全文
posted @ 2022-08-09 12:45 小鲨鱼2018 阅读(541) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@PC1:/home/test3# ls a.txt test.py (base) root@PC1:/home/test3# cat a.txt ## 测试数据 ddd ff ff jkj jj dffffffgg dgfggggg (base) root@PC1: 阅读全文
posted @ 2022-08-09 12:40 小鲨鱼2018 阅读(715) 评论(0) 推荐(0) 编辑
摘要:001、字典实现 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试数据 >scaffold_1 CCCGGGTAAAACGGGTCTTCAAGAAAACGCTC 阅读全文
posted @ 2022-08-09 11:41 小鲨鱼2018 阅读(82) 评论(0) 推荐(0) 编辑
摘要:001、问题 pip install慢 002、解决方法 临时修改 在 pip install 包名 -i https://pypi.tuna.tsinghua.edu.cn/simple。 例如: pip install scipy -i https://pypi.tuna.tsinghua.ed 阅读全文
posted @ 2022-08-08 23:18 小鲨鱼2018 阅读(327) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@ubuntu01pc1:~# conda --version conda 4.12.0 (base) root@ubuntu01pc1:~# python --version Python 3.9.12 002、 创建python3.8环境 conda create 阅读全文
posted @ 2022-08-08 22:21 小鲨鱼2018 阅读(1525) 评论(0) 推荐(0) 编辑
摘要:001、 (base) root@ubuntu01pc1:~# conda --version ## conda版本 conda 4.12.0 002、在终端执行如何命令 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn 阅读全文
posted @ 2022-08-08 21:03 小鲨鱼2018 阅读(1343) 评论(0) 推荐(0) 编辑
摘要:001、系统 root@ubuntu01pc1:/home/test# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: 22.04 阅读全文
posted @ 2022-08-08 20:44 小鲨鱼2018 阅读(739) 评论(0) 推荐(0) 编辑
摘要:001、python中global关键字 将 局部变量升级为全局变量 (base) root@PC1:/home/test# ls test.py (base) root@PC1:/home/test# cat test.py ## 测试脚本 #!/usr/bin/python def test_f 阅读全文
posted @ 2022-08-08 19:33 小鲨鱼2018 阅读(28) 评论(0) 推荐(0) 编辑

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