当前位置: 首页 > news >正文

信阳建设企业网站公司凡科做网站视频

信阳建设企业网站公司,凡科做网站视频,长沙旅游必去的八个景点,手机网页版微信官网为了程序运行的便利性#xff0c;不想将Decontam放到windows的Rstudio里面运行#xff0c;需要直接在Ubuntu中运行#xff0c;并且为了在Decontam时进行其他操作#xff0c;使用python去运行R 首先你需要有一个conda环境#xff0c;安装了R#xff0c;Decontam#xff0…为了程序运行的便利性不想将Decontam放到windows的Rstudio里面运行需要直接在Ubuntu中运行并且为了在Decontam时进行其他操作使用python去运行R 首先你需要有一个conda环境安装了RDecontamphyloseqrpy2 mamba create -c bioconda -c conda-forge -p {os.path.join(args[conda_env_dir], LBSWrap-Decontam)} r-base4.3.1 python3.10 -y /dev/null 21 mamba install -p {os.path.join(args[conda_env_dir], LBSWrap-Decontam)} bioconda::bioconductor-decontam -y /dev/null 21 mamba install -p {os.path.join(args[conda_env_dir], LBSWrap-Decontam)} bioconda::bioconductor-phyloseq -y /dev/null 21 mamba install -p {os.path.join(args[conda_env_dir], LBSWrap-Decontam)} biopython -y /dev/null 21 os.path.join(args[conda_env_dir], LBSWrap-Decontam, pip)} install rpy2 /dev/null 21 然后建立这个python文件chmod 755给权限就行了 需要有你的fasta文件用于输出通过过滤的和未通过过滤的fasta序列otu文件metadata文件  #! /usr/bin/env python ######################################################### # run Decontam (methodprevalence) in Ubuntu through python # written by PeiZhong in IFR of CAASimport argparse import rpy2.robjects as robjects from Bio import SeqIO import osparser argparse.ArgumentParser(descriptionrun Decontam (methodprevalence) in Ubuntu through python) parser.add_argument(--otu_txt, -otu, typestr, requiredTrue, help OTU table file ) parser.add_argument(--metadata_txt, -metadata, requiredTrue, typestr, help Metadata file ) parser.add_argument(--way, -w, typestr, requiredTrue, help choice from isNotContaminant or isContaminant ) parser.add_argument(--threshold, -t, typefloat, defaultNone, help Threshold , isNotContaminant default 0.5, isContaminant default 0.1 ) parser.add_argument(--result_txt, -r, typestr, requiredTrue, help result txt from Decontam ) parser.add_argument(--input_fasta, -ifa, typestr, requiredTrue, help your fasta file ) parser.add_argument(--output_fasta, -ofa, typestr, requiredTrue, help clean fasta according to the result of Decontam ) parser.add_argument(--contamination_fasta, -cfa, typestr, requiredTrue, help contamination fasta according to the result of Decontam )args parser.parse_args()for filepath in [args.otu_txt, args.metadata_txt, args.input_fasta]:if not os.path.exists(filepath):raise FileNotFoundError(fThe file {filepath} does not exist.)if args.way not in [isNotContaminant, isContaminant]:raise ValueError(The way parameter must be either isNotContaminant or isContaminant.)if args.threshold is None:args.threshold 0.5 if args.way isNotContaminant else 0.1shi, fou (TRUE, FALSE) if args.way isNotContaminant else (FALSE, TRUE)r_code f library(ggplot2) library(decontam) library(phyloseq)otu - read.table({args.otu_txt}, headerTRUE, row.names 1) sample - read.table({args.metadata_txt}, headerTRUE, row.names 1)otu_table - otu_table(t(otu), taxa_are_rows FALSE) sample_data - sample_data(sample) ps - phyloseq(otu_table, sample_data)sample_data(ps)$is.neg - sample_data(ps)$Sample_or_Control Control contamdf.notcontam - {args.way}(ps, methodprevalence, negis.neg, threshold{args.threshold},detailTRUE) # isNotContaminant - True means non-contaminants write.table(contamdf.notcontam, file{args.result_txt}, sep\t, quoteF, row.namesT)robjects.r(r_code)df, df_contam {}, {} with open(args.result_txt,r) as read_result:for line in read_result.readlines():if p.prev not in line and len(line.split(\t)) 6:name, determine line.split(\t)[0].strip(\n), line.split(\t)[6].strip(\n)if determine shi:df[name] 0elif determine fou:df_contam[name] 0with open(args.input_fasta, r) as fasta_file:sequences SeqIO.to_dict(SeqIO.parse(fasta_file, fasta))clean_sequences {key: sequences[key] for key in df} contaminated_sequences {key: sequences[key] for key in df_contam}with open(args.output_fasta, w) as clean_file, open(args.contamination_fasta, w) as contaminated_file:SeqIO.write(clean_sequences.values(), clean_file, fasta)SeqIO.write(contaminated_sequences.values(), contaminated_file, fasta) OTU示例和metadata示例参考....emmm算了比较麻烦我给你们看我的文件 注意R里面-这个横杠会被识别为.容易出错 使用示例 /home/zhongpei/hard_disk_sda2/zhongpei/Software/my_script/Decontam.py -t 0.5 \ -otu ${zubie}_${ruanjian}_decontam_pre.txt -metadata ${zubie}_metadata.txt \-w isContaminant -r ${zubie}_${ruanjian}_decontam.report \ -ifa ${zubie}_${ruanjian}_all.fa -ofa ${zubie}_${ruanjian}_decontam.fa \ -cfa ${zubie}_${ruanjian}_notgood.fa
http://www.zqtcl.cn/news/379955/

相关文章:

  • 蒙特网站建设湖北省建设厅网站上岗证查询
  • 宁波网站建设 联系哪家电子商务网站建设过程范文
  • 南宁商城网站建设网站建设的需求文档
  • dedeampz 部署wordpress 网站访问慢如何评价网站是否做的好处
  • 怎样建设个人影视网站设计学专业
  • 没有公司 接单做网站网站建设加盟合作
  • 如何将域名和网站绑定做网站找投资人
  • 网站开发 平台WordPress首页可见
  • 沧州做网站费用打开上海发布
  • 重庆潼南网站建设公司电话网站能调用一些字体
  • 摄影网站设计素材做彩票网站电话多少
  • 开网站公司企业管理网课
  • 相城高端网站建设施工建设集团网站
  • .电子商务网站的开发原则包括网络服务示范区创建情况
  • 网站如何做权重php做网站登陆验证
  • 昆山制造网站的地方网站建设 有聊天工具的吗
  • 自己做网站制作需要多少钱如何免费注册网站域名
  • 如何做网站美化怎样写网站文案
  • 做网站排名的wordpress 调整 行距
  • 三亚文明城市建设服务中心报名网站房地产活动策划网站
  • 休闲食品网站建设规划书常德做网站专业公司
  • 做美工好的网站网页设计排版布局
  • 网站建设公司合同模板下载wordpress微信公众平台开发教程
  • 快速wordpress 建网站免费代理游戏
  • 网站模板 寻模板大气宽屏网站模板企业源码带后台
  • 做图片推广的网站威海高端网站建设
  • 台州网站公司建站网站首页模板图片
  • 网站建设本科毕业设计论文网址
  • 泰州企业建站程序乐清网站建设公司
  • 微信小程序网站建设哪家好郑州建设网