上一页 1 ··· 155 156 157 158 159 160 161 162 163 ··· 408 下一页
摘要: 和map()类似,filter()也接收一个函数和一个序列。和map()不同的时,filter()把传入的函数依次作用于每个元素,然后根据返回值是True还是False决定保留还是丢弃该元素。 >>> def is_odd(n): ... return n % 2 == 1 ... >>> filt 阅读全文
posted @ 2022-11-15 22:48 小鲨鱼2018 阅读(374) 评论(0) 推荐(0)
摘要: map函数会根据提供的函数对指定序列做映射。 通过定义可以看到,这个函数的第一个参数是一个函数,剩下的参数是一个或多个序列,返回值是一个集合。 map的作用是以参数序列中的每一个元素调用function函数,返回包含每次function函数返回值 001、 >>> map(lambda x: x * 阅读全文
posted @ 2022-11-15 22:41 小鲨鱼2018 阅读(139) 评论(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 阅读(810) 评论(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 阅读(109) 评论(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 阅读(80) 评论(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 阅读(339) 评论(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 阅读(1879) 评论(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 阅读(2208) 评论(0) 推荐(0)
摘要: 001、问题 /usr/bin/ld: cannot find -lm 002、解决方法 yum install glibc-static 阅读全文
posted @ 2022-11-09 14:53 小鲨鱼2018 阅读(442) 评论(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 阅读(173) 评论(0) 推荐(0)
上一页 1 ··· 155 156 157 158 159 160 161 162 163 ··· 408 下一页