前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >LULU的使用~~

LULU的使用~~

作者头像
Listenlii-生物信息知识分享
发布2020-06-01 13:38:03
1.3K0
发布2020-06-01 13:38:03
举报
文章被收录于专栏:Listenlii的生物信息笔记

Github:

https://github.com/tobiasgf/lulu

需要准备的东西:

OTU表及其代表序列

BLASTn,VSEARCH或其他计算成对样本间不相似性的算法,用于建立match list

BLASTn,VSEARCH等其他

BLASTn

代码语言:javascript
复制
#先利用OTU序列建立参考数据库
makeblastdb -in OTU_sequences.fasta -parse_seqids -dbtype nucl
#OTU与参考数据库进行比对
blastn -db OTU_sequences.fasta -outfmt '6 qseqid sseqid pident' -out match_list.txt -qcov_hsp_perc 80 -perc_identity 84 -query OTU_sequences.fasta

VSEARCH

代码语言:javascript
复制
vsearch --usearch_global OTU_sequences.fasta --db OTU_sequences.fasta --self --id .84 --iddef 1 --userout match_list.txt -userfields query+target+id --maxaccepts 0 --query_cov .9 --maxhits 10

得到的结果格式如下,第三列为他们的相似度。

LULU package

代码语言:javascript
复制
#安装
library(devtools)
install_github("tobiasgf/lulu")  
#但是会报错
Error: Failed to install 'unknown package' from GitHub:
  invalid multibyte string, element 1

#原因是编码的问题。参考大神的方法:https://bbs.pinggu.org/thread-3640539-2-1.html
#默认的是中文编码
Sys.setlocale()
[1] "LC_COLLATE=Chinese (Simplified)_China.936;LC_CTYPE=Chinese (Simplified)_China.936;LC_MONETARY=Chinese (Simplified)_China.936;LC_NUMERIC=C;LC_TIME=Chinese (Simplified)_China.936"
#改成英文就行了
Sys.setlocale(category = "LC_ALL", locale = "us")
[1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252"
#现在再运行install_github("tobiasgf/lulu") 就不会报错了。

#Usage
#lulu(otutable, matchlist, minimum_ratio_type = "min", minimum_ratio = 1,
#  minimum_match = 84, minimum_relative_cooccurence = 0.95)

#LULU
curated_result <- lulu(otutable_name, matchlist_name)
#原始的OTU表
curated_result$original_table
#提取curated的OTu表
curated_result$curated_table
#剩余的OTU个数
curated_result$curated_count
#丢弃的OTU个数
curated_result$discarded_count
#运行时间
curated_result$runtime
#查看OTU是如何map的
curated_result$otu_map

END

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2019-08-26,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 Listenlii 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档