11 2022 档案

摘要:001、准备如下word界面 002、右击标题1 003、选择修改 004、点击格式 005、选择编号 006、点击定义编号格式 007、输入编号格式 008、选择样式 009、点击确认 010、两个都点击确认 011、点击标题1 012、选择图片位置 013、点击引用 014、选择插入题注 015 阅读全文
posted @ 2022-11-30 21:04 小鲨鱼2018 阅读(1683) 评论(0) 推荐(0) 编辑
摘要:001、问题 >>> import gffutils Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'gffutils' 002、 阅读全文
posted @ 2022-11-19 23:03 小鲨鱼2018 阅读(161) 评论(0) 推荐(0) 编辑
摘要:001、 问题 >>> from Bio import SeqIO 002、解决方法 pip3 install biopython -i https://pypi.douban.com/simple 003、测试效果 from Bio import SeqIO 阅读全文
posted @ 2022-11-19 22:57 小鲨鱼2018 阅读(1313) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test2]# ls a.txt test.py [root@pc1 test2]# cat a.txt ## 测试序列 AGCTTCCCC [root@pc1 test2]# cat test.py ## 测试程序 #!/usr/bin/python in_file 阅读全文
posted @ 2022-11-16 18:21 小鲨鱼2018 阅读(173) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test3]# ls a.txt [root@pc1 test3]# cat a.txt ## 测试数据 ad_33;hh_kk dd;ff;dd;77 uu_77_88_99 [root@pc1 test3]# awk -F "[_;]" '{print $2}' a 阅读全文
posted @ 2022-11-16 18:02 小鲨鱼2018 阅读(334) 评论(0) 推荐(0) 编辑
摘要:001、match >>> import re >>> str1 = "www.baidu.com" ## 测试字符串 >>> re.match("www", str1) <re.Match object; span=(0, 3), match='www'> >>> re.match("www", 阅读全文
posted @ 2022-11-16 16:21 小鲨鱼2018 阅读(21) 评论(0) 推荐(0) 编辑
摘要:001、shell实现 [root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt ## 测试数据 1 4 6 10 8 16 17 20 [root@pc1 test2]# cat a.txt | tr " " "\n" | sed -e '1d' 阅读全文
posted @ 2022-11-16 14:41 小鲨鱼2018 阅读(26) 评论(0) 推荐(0) 编辑
摘要:001、shell实现 [root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt ## 测试数据 a 8 b 3 a 9 a 2 b 3 c 7 c 2 c 10 [root@pc1 test2]# for i in a b c; do grep 阅读全文
posted @ 2022-11-16 11:16 小鲨鱼2018 阅读(165) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt ## 测试数据 ab cd kk jj ee rr tt tt ss nn bb rr [root@pc1 test2]# rev a.txt | sed 's/ /_/' | r 阅读全文
posted @ 2022-11-16 10:29 小鲨鱼2018 阅读(219) 评论(0) 推荐(0) 编辑
摘要:001、 >>> list1 = [("aa",100, 400), ("bb", "kk", "yy"), (33, 400, 500)] >>> for i, j, k in list1: ## 利用列表、元组同时传入多个参数 ... print(i,k) ... aa 400 bb yy 33 阅读全文
posted @ 2022-11-15 23:45 小鲨鱼2018 阅读(244) 评论(0) 推荐(0) 编辑
摘要:001、 直接使用字典进行统计 >>> str1 = "aaaabbcdddefff" ## 测试字符串 >>> dict1 = dict() >>> for i in str1: ## 利用条件分支进行判断 ... if i in dict1: ... dict1[i] += 1 ... else 阅读全文
posted @ 2022-11-15 23:34 小鲨鱼2018 阅读(622) 评论(0) 推荐(0) 编辑
摘要:首先,defaultdict 是 dict 的一个子类。通常 Python 中字典(dict)是通过键值对来存取的,当索引一个不存在的键时,就会引发 keyerror 异常。那么,defaultdict 就可以解决这个问题,它可以实现为不存的键值返回一个默认值。 defaultdict是 colle 阅读全文
posted @ 2022-11-15 23:24 小鲨鱼2018 阅读(88) 评论(0) 推荐(0) 编辑
摘要:和map()类似,filter()也接收一个函数和一个序列。和map()不同的时,filter()把传入的函数依次作用于每个元素,然后根据返回值是True还是False决定保留还是丢弃该元素。 >>> def is_odd(n): ... return n % 2 == 1 ... >>> filt 阅读全文
posted @ 2022-11-15 22:48 小鲨鱼2018 阅读(361) 评论(0) 推荐(0) 编辑
摘要:map函数会根据提供的函数对指定序列做映射。 通过定义可以看到,这个函数的第一个参数是一个函数,剩下的参数是一个或多个序列,返回值是一个集合。 map的作用是以参数序列中的每一个元素调用function函数,返回包含每次function函数返回值 001、 >>> map(lambda x: x * 阅读全文
posted @ 2022-11-15 22:41 小鲨鱼2018 阅读(125) 评论(0) 推荐(0) 编辑
摘要:#-*-coding: UTF-8 -*- 解决python2 中 中文乱码报错的问题 001、 [root@pc1 test1]# ls a.fa test.py [root@pc1 test1]# cat a.fa ## 测试数据 >chr1 xxx aaaggg eeee >chr2 yyy 阅读全文
posted @ 2022-11-14 12:18 小鲨鱼2018 阅读(774) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test1]# ls a.fa test.py [root@pc1 test1]# cat a.fa ## 测试fasta文件 >chr1 kkk aattttt cccc >chr2 yyy ttttuuuu ddfff >chr3 eee uuuuukk sssff 阅读全文
posted @ 2022-11-14 12:00 小鲨鱼2018 阅读(101) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test2]# ls a.fa test.py [root@pc1 test2]# cat a.fa ## 测试fasta文件 >chr1 aattggggc ssff xx >chr2 uuuttcccccc >chr3 ggggcccc tttt [root@pc1 阅读全文
posted @ 2022-11-12 18:01 小鲨鱼2018 阅读(61) 评论(0) 推荐(0) 编辑
摘要:001、 [b20223040323@admin1 test]$ ls ## 测试gff文件 exons_only.gff [b20223040323@admin1 test]$ gff2bed <exons_only.gff > exons_only.bed ## gff2bed模块转换 Warn 阅读全文
posted @ 2022-11-12 17:07 小鲨鱼2018 阅读(288) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt ## 测试数据 NC_003074.8 1000177 1000243 exon141402 NC_003074.8 1000177 1000243 exon141414 NC_0 阅读全文
posted @ 2022-11-10 10:50 小鲨鱼2018 阅读(1782) 评论(0) 推荐(0) 编辑
摘要:001、gff3文件转bed [root@pc1 test2]# ls Capra_hircus.ARS1.108.gff3 [root@pc1 test2]# gff2bed <Capra_hircus.ARS1.108.gff3 > test.bed Warning: If your Wiggl 阅读全文
posted @ 2022-11-09 15:09 小鲨鱼2018 阅读(1895) 评论(0) 推荐(0) 编辑
摘要:001、问题 /usr/bin/ld: cannot find -lm 002、解决方法 yum install glibc-static 阅读全文
posted @ 2022-11-09 14:53 小鲨鱼2018 阅读(407) 评论(0) 推荐(0) 编辑
摘要:001、问题 File "/usr/bin/yum", line 30 002、问题原因 yum采用python作为命令解释器,系统自带的为python2.7, 安装了python3版本,造成不匹配 003、解决办法 修改/usr/bin/yum,把#!/usr/bin/python修改为#!/us 阅读全文
posted @ 2022-11-09 14:50 小鲨鱼2018 阅读(159) 评论(0) 推荐(0) 编辑
摘要:Lambda函数用于创建匿名函数: 001、 >>> add1 = lambda x: x+2 >>> add1(100) 102 >>> add1(50) 52 >>> abc = lambda x: x * 2 >>> abc(10) 20 >>> abc(0.8) 1.6 阅读全文
posted @ 2022-11-08 19:00 小鲨鱼2018 阅读(18) 评论(0) 推荐(0) 编辑
摘要:001、 格式化数值 >>> "{:.2%}".format(0.123456789) '12.35%' >>> "{:.5%}".format(0.123456789) '12.34568%' >>> "{:.2}".format(0.123456789) '0.12' >>> "{:.5}".f 阅读全文
posted @ 2022-11-08 18:47 小鲨鱼2018 阅读(43) 评论(0) 推荐(0) 编辑
摘要:001、 any 只要一个结果为真,结果就为真 >>> any([False, False, True]) True >>> any([False, False, False]) False 002、all 只有所有结果为真才为真 >>> any([False, False, True]) True 阅读全文
posted @ 2022-11-08 18:38 小鲨鱼2018 阅读(90) 评论(0) 推荐(0) 编辑
摘要:001、 abs函数取绝对值 >>> abs(100) 100 >>> abs(-500) 500 002、round函数取小数点位数 >>> round(99.95) ## 默认没有小数点 100 >>> round(100.95) 101 >>> round(100.25) 100 >>> ro 阅读全文
posted @ 2022-11-08 18:14 小鲨鱼2018 阅读(37) 评论(0) 推荐(0) 编辑
摘要:eval()函数用来执行一个字符串表达式,并返回表达式的值。 001、 >>> a="3+3" >>> type(a) <class 'str'> >>> eval(a) ## eval用于返回字符串的值 6 >>> eval("pow(3,3)") 27 >>> eval("pow(2,3)") 阅读全文
posted @ 2022-11-08 12:00 小鲨鱼2018 阅读(36) 评论(0) 推荐(0) 编辑
摘要:利用混合的F2群体研究水稻杂种优势机理的文章于2016年9月以Article的形式发表在Nature上(Huang等,2016),研究人员首先对水稻的杂交种进行分类,综合分类情况,选择17个能代表主要杂种类别的杂交组合发展成F2群体,最终使用10074个F2材料进行关联分析。F2群体包含完整基因型类 阅读全文
posted @ 2022-11-07 09:51 小鲨鱼2018 阅读(212) 评论(0) 推荐(0) 编辑
摘要:001、 >>> import os >>> os.path.abspath("2.txt") ## 列出指定文件的绝对路径 '/home/test/2.txt' >>> os.path.abspath("test1") ## 列出指定目录的绝对路径 '/home/test/test1' 002、o 阅读全文
posted @ 2022-11-06 22:19 小鲨鱼2018 阅读(122) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test]# ls a.sh [root@pc1 test]# cat a.sh ## 测试程序 #!/bin/bash for ((i = 1; i <= 3; i++)) do echo " outer loop:$i " for ((j = 1; j <= 3; 阅读全文
posted @ 2022-11-04 23:02 小鲨鱼2018 阅读(286) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test3]# ls GCF_000001405.40_GRCh38.p14_genomic.gff [root@pc1 test3]# awk '$3 == "gene" {split($9, a, ";"); for(i in a) {split(a[i], b, 阅读全文
posted @ 2022-11-04 18:18 小鲨鱼2018 阅读(109) 评论(0) 推荐(0) 编辑
摘要:001、基本用法 [root@pc1 test4]# ls a.txt [root@pc1 test4]# cat a.txt a b c d b e a d e z b c a d e [root@pc1 test4]# awk '{print ay[$2]++}' a.txt 0 1 0 2 1 阅读全文
posted @ 2022-11-04 17:55 小鲨鱼2018 阅读(101) 评论(0) 推荐(0) 编辑
摘要:001、 >>> import os >>> os.listdir("/home/test") ## 结果返回的是列表 ['a.txt', 'b.txt', 'test1', 'test2', 'test3'] >>> 阅读全文
posted @ 2022-11-04 12:12 小鲨鱼2018 阅读(130) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test]# ls a.txt test.py [root@PC1 test]# cat a.txt ## 测试文件 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 阅读全文
posted @ 2022-11-04 12:07 小鲨鱼2018 阅读(175) 评论(0) 推荐(0) 编辑
摘要:001\ [root@pc1 test3]# cat a.fa >chr1 cccccggggggggttttgg cccgggggg >chr2 uuuuutttttNNNNNddffff dddgggggggggggcccccccccc [root@pc1 test3]# cat test.py 阅读全文
posted @ 2022-11-04 10:05 小鲨鱼2018 阅读(68) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test3]# ls a.txt b.txt test.py [root@pc1 test3]# cat a.txt 1 2 3 [root@pc1 test3]# cat b.txt 1 2 3 [root@pc1 test3]# cat test.py ## 测试程 阅读全文
posted @ 2022-11-03 15:57 小鲨鱼2018 阅读(39) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test3]# python2 ## python2 Python 2.7.5 (default, Jun 28 2022, 15:30:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2 Type "help", 阅读全文
posted @ 2022-11-03 15:51 小鲨鱼2018 阅读(100) 评论(0) 推荐(0) 编辑
摘要:001、 >>> str1 = ">aabbcc" >>> if str1.startswith(">"): ... print("yes") ... yes >>> if not str1.startswith(">"): ## python中if语句取反 ... print("yes") ... 阅读全文
posted @ 2022-11-02 16:24 小鲨鱼2018 阅读(558) 评论(0) 推荐(0) 编辑
摘要:001、提取文件的最后几列 [root@pc1 test3]# ls a.txt [root@pc1 test3]# cat a.txt ## 测试文件 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 0 阅读全文
posted @ 2022-11-02 12:02 小鲨鱼2018 阅读(478) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 02 阅读全文
posted @ 2022-11-02 11:21 小鲨鱼2018 阅读(142) 评论(0) 推荐(0) 编辑
摘要:-b:以字节为单位进行截取。 -c:以字符为单位进行截取。 001、 [root@PC1 test1]# ls a.txt b.txt [root@PC1 test1]# cat a.txt ewr23436546cfgfd [root@PC1 test1]# cut -b 2 a.txt w [r 阅读全文
posted @ 2022-11-02 10:52 小鲨鱼2018 阅读(750) 评论(0) 推荐(0) 编辑
摘要:001、跳转到指定列 n + | (管道) 或者 0nl(小写的L) 002、跳转到行首、行尾 0:行首 $:行尾 home:行首 end:行尾 003、左右移动 nl(小写的L):向右移动n位 hl(小写的L):向左移动n位 阅读全文
posted @ 2022-11-02 10:45 小鲨鱼2018 阅读(520) 评论(0) 推荐(0) 编辑
摘要:001、问题 解决方法如下: 001、win + i打开设置, 点击隐私与安全性 002、点window安全中心 003、点设备安全性 004、点击内核隔离详细信息 005、将该选项关闭 006、重启计算机、测试,没有问题了。 阅读全文
posted @ 2022-11-01 23:49 小鲨鱼2018 阅读(4548) 评论(0) 推荐(0) 编辑
摘要:000、问题如下: 001、 002、 003、 004、勾选 005、 参考:https://www.cnblogs.com/zouhuaxin/p/16732666.html 阅读全文
posted @ 2022-11-01 23:22 小鲨鱼2018 阅读(2702) 评论(0) 推荐(0) 编辑
摘要:001、打包 [root@pc1 test3]# ls a.txt b.txt c.map df110 tmp1 [root@pc1 test3]# tar -cf all.tar * ## 打包 [root@pc1 test3]# ls all.tar a.txt b.txt c.map df11 阅读全文
posted @ 2022-11-01 10:13 小鲨鱼2018 阅读(248) 评论(0) 推荐(0) 编辑

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