请先在B站观看视频,毕竟看视频比看书学习快多了
1.B站检索(第一天:illumina、PacBio、Nanopore测序原理)

2.B站检索(Nanopore平台宏基因组测序的优点)

本流程复现自Nature communication的文章“Short- and long-read metagenomics expand individualized structural variations in gut microbiomes”
数据来源 https://www.ncbi.nlm.nih.gov/bioproject/PRJNA820119
脚本来源 https://github.com/chen318liang/Gut-Metagenome-Pipeline-Based-on-Nanopore-Sequencing
按图示下载数据





也可采用sra-toolkit批量下载方法,具体见文
https://www.jianshu.com/p/6f8f9a6d1a56
使用fasterq-dump转换数据
fasterq-dump SRR5318040 -t . -e 24;
###-e 24 是24线程
本分析涉及到的分析软件很多,不同的软件安装方法差异很大,以下是安装所需软件的下载源或安装源。
提前熟悉linux的基本命令,awk, sed,grep等等
OPERA-MS v0.9.0 mumandco mcaller guppy Prokka CD-hit iqtree2
IGV seqkit dRep gtdbtk samtools MAFFT CAT blast Nanopolish Canu Flye minimap2 MetaWRAP prokka salmon
pip install drep clustalw Emboss ViennaRNA
rnammer
https://services.healthtech.dtu.dk/software.php
ont-tombo
nanodisco
crsprdetect
prophagehunter
itol
CRISPRDetect (https://github.com/davidchyou/CRISPRDetect_2.4)
crisprdetectparser.py (https://github.com/hwalinga/crisprdetect-parser)
~/miniconda3/envs/metawrap/bin/metawrap-scripts/split_salmon_out_into_bins.py
注意设置好对应变量,注意提前测试所需软件及脚本是否可用
#!/bin/bash
threads="20"
assembly="/data/chenliang/Zymo_Community_Standards_data_assembly/spades_hybird_assembly/Zymo-GridION-EVEN_spades_hybird_assembly/scaffolds.fasta"
out="quant_bins"
reads_1="/data/chenliang/MC.Hiseq/MC_1.fastq"
reads_2="/data/chenliang/MC.Hiseq/MC_2.fastq"
tmp=${reads_1##*/}
sample=${tmp%_*}
bin_folder="bin_refinement/metawrap_70_10_bins/"
salmon index -p $threads -t $assembly -i ${out}/assembly_index
salmon quant -i ${out}/assembly_index --libType IU -1 $reads_1 -2 $reads_2 -o ${out}/alignment_files/${sample}.quant --meta -p $threads
home=$(pwd)
cd ${out}/alignment_files/
/software_users/chenliang/miniconda3/envs/metawrap/bin/metawrap-scripts/summarize_salmon_files.py
cd $home
mkdir ${out}/quant_files
#for f in $(ls ${out}/alignment_files/ | grep .quant.counts); do mv ${out}/alignment_files/$f ${out}/quant_files/; done
#n=$(ls ${out}/quant_files/ | grep counts | wc -l)
/software_users/chenliang/miniconda3/envs/metawrap/bin/metawrap-scripts/split_salmon_out_into_bins.py ${out}/quant_files/ $bin_folder $assembly > ${out}/bin_abundance_table.tab
使用的5种策略,Canu, Flye, OPERA-MS, Spades, MetaSPAdes.
使用fastANI计算ANI时需要用到参考基因组,请提前下载
https://zenodo.org/record/3935737#.Y1rh37ZBxD8
这一步没啥特别的,注意提前测试软件和脚本就行。观察脚本,提前将文件置于对应位置的话能省不少事情。
minimap2 samtools make_IGV_snapshots.py emapper.py prokka
这步用到了CD-hit需要编译安装,而iqtree2可在github下载,用于化系统发育树。
#####################
Part III. Prediction of prophage, redundancy removal, gene annotation, and construction of evolutionary trees
###################
# prophage dientification using the machine-learning-based tool ProphageHunter
# Webserver address
https://pro-hunter.genomics.cn/
# Candidate propages clustering by CDhit
CDhit-est -i Candidate_propahge.fasta -c 0.95 -o Candidate_propahge_clusted.fasta
# Viral genomic CDS prediction using multiphate2 (https://github.com/carolzhou/multiPhATE2)
#Set up the configuration file as required and then run cmd as follow
python3 multiPhate.py multiPhate.config
# Create phylogenetic tree using iqtree2 (https://github.com/iqtree/iqtree2)
#Join_MCP_TLS.faa is joined protein sequence with major capsid protein and terminal large subunit
iqtree2 -s Join_MCP_TLS.faa -m MFP -B 1000 --bnni -T 40
CRISPRDetect.pl安装比较繁琐,现在github下载安装,之后要安装依赖环境,根据对应报错提示安装就行,我花了不少时间。crisprdetectparser.py直接在github下载就行。
#!/usr/bin/bash
## CRISPRDetect (https://github.com/davidchyou/CRISPRDetect_2.4)
## crisprdetectparser.py (https://github.com/hwalinga/crisprdetect-parser)
path="/data/nano_meta_ref/result/spades/hybird_temp/spades"
perl CRISPRDetect.pl -f $path/contigs.fasta -o CRISPRDetect_result \
-check_direction 0 -array_quality_score_cutoff 3 -T 20
python crisprdetectparser.py --spacers-directory spacer_dir --spacers-extension fna CRISPRDetect_result > metadata.tsv
这一步要用到原始fast5格式,暂时不用做。
1.Complete, closed bacterial genomes from microbiomes using nanopore sequencing.
DOI: 10.1038/s41587-020-0422-6
DOI: 10.1186/s40168-022-01311-1
DOI: 10.1128/msystems.00433-22
1.Nanopore测序笔记
https://www.jianshu.com/p/5d011720bc10
2.原核生物基因组三代数据(pacbio/nanopore)组装
https://www.jianshu.com/p/2e9d9feed61c
3.centos7安装perl-XML-Simple(可能用到)
https://www.jianshu.com/p/ec7d8f35b095
4.fasterq-dump 人多力量大(SRA数据转换教程)
https://www.jianshu.com/p/e9f6e16e2c8a
5.使用libmamba库来加速canda环境的解决(加速conda软件安装)
https://www.jianshu.com/p/904d5ed1d841
6.CD-hit安装及使用
https://www.jianshu.com/p/4e217eba4e96
7.perl 模块安装与使用(中间有需要装模块的步骤)
总的来说,我对ruby还比较陌生,我正在为我正在创建的对象编写一些rspec测试用例。许多测试用例都非常基础,我只是想确保正确填充和返回值。我想知道是否有办法使用循环结构来执行此操作。不必为我要测试的每个方法都设置一个assertEquals。例如:describeitem,"TestingtheItem"doit"willhaveanullvaluetostart"doitem=Item.new#HereIcoulddotheitem.name.shouldbe_nil#thenIcoulddoitem.category.shouldbe_nilendend但我想要一些方法来使用
我试图在一个项目中使用rake,如果我把所有东西都放到Rakefile中,它会很大并且很难读取/找到东西,所以我试着将每个命名空间放在lib/rake中它自己的文件中,我添加了这个到我的rake文件的顶部:Dir['#{File.dirname(__FILE__)}/lib/rake/*.rake'].map{|f|requiref}它加载文件没问题,但没有任务。我现在只有一个.rake文件作为测试,名为“servers.rake”,它看起来像这样:namespace:serverdotask:testdoputs"test"endend所以当我运行rakeserver:testid时
作为我的Rails应用程序的一部分,我编写了一个小导入程序,它从我们的LDAP系统中吸取数据并将其塞入一个用户表中。不幸的是,与LDAP相关的代码在遍历我们的32K用户时泄漏了大量内存,我一直无法弄清楚如何解决这个问题。这个问题似乎在某种程度上与LDAP库有关,因为当我删除对LDAP内容的调用时,内存使用情况会很好地稳定下来。此外,不断增加的对象是Net::BER::BerIdentifiedString和Net::BER::BerIdentifiedArray,它们都是LDAP库的一部分。当我运行导入时,内存使用量最终达到超过1GB的峰值。如果问题存在,我需要找到一些方法来更正我的代
Rails2.3可以选择随时使用RouteSet#add_configuration_file添加更多路由。是否可以在Rails3项目中做同样的事情? 最佳答案 在config/application.rb中:config.paths.config.routes在Rails3.2(也可能是Rails3.1)中,使用:config.paths["config/routes"] 关于ruby-on-rails-Rails3中的多个路由文件,我们在StackOverflow上找到一个类似的问题
对于具有离线功能的智能手机应用程序,我正在为Xml文件创建单向文本同步。我希望我的服务器将增量/差异(例如GNU差异补丁)发送到目标设备。这是计划:Time=0Server:hasversion_1ofXmlfile(~800kiB)Client:hasversion_1ofXmlfile(~800kiB)Time=1Server:hasversion_1andversion_2ofXmlfile(each~800kiB)computesdeltaoftheseversions(=patch)(~10kiB)sendspatchtoClient(~10kiBtransferred)Cl
我需要从一个View访问多个模型。以前,我的links_controller仅用于提供以不同方式排序的链接资源。现在我想包括一个部分(我假设)显示按分数排序的顶级用户(@users=User.all.sort_by(&:score))我知道我可以将此代码插入每个链接操作并从View访问它,但这似乎不是“ruby方式”,我将需要在不久的将来访问更多模型。这可能会变得很脏,是否有针对这种情况的任何技术?注意事项:我认为我的应用程序正朝着单一格式和动态页面内容的方向发展,本质上是一个典型的网络应用程序。我知道before_filter但考虑到我希望应用程序进入的方向,这似乎很麻烦。最终从任何
我在我的项目中添加了一个系统来重置用户密码并通过电子邮件将密码发送给他,以防他忘记密码。昨天它运行良好(当我实现它时)。当我今天尝试启动服务器时,出现以下错误。=>BootingWEBrick=>Rails3.2.1applicationstartingindevelopmentonhttp://0.0.0.0:3000=>Callwith-dtodetach=>Ctrl-CtoshutdownserverExiting/Users/vinayshenoy/.rvm/gems/ruby-1.9.3-p0/gems/actionmailer-3.2.1/lib/action_mailer
我构建了两个需要相互通信和发送文件的Rails应用程序。例如,一个Rails应用程序会发送请求以查看其他应用程序数据库中的表。然后另一个应用程序将呈现该表的json并将其发回。我还希望一个应用程序将存储在其公共(public)目录中的文本文件发送到另一个应用程序的公共(public)目录。我从来没有做过这样的事情,所以我什至不知道从哪里开始。任何帮助,将不胜感激。谢谢! 最佳答案 无论Rails是什么,几乎所有Web应用程序都有您的要求,大多数现代Web应用程序都需要相互通信。但是有一个小小的理解需要你坚持下去,网站不应直接访问彼此
我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r
刚入门rails,开始慢慢理解。有人可以解释或给我一些关于在application_controller中编码的好处或时间和原因的想法吗?有哪些用例。您如何为Rails应用程序使用应用程序Controller?我不想在那里放太多代码,因为据我了解,每个请求都会调用此Controller。这是真的? 最佳答案 ApplicationController实际上是您应用程序中的每个其他Controller都将从中继承的类(尽管这不是强制性的)。我同意不要用太多代码弄乱它并保持干净整洁的态度,尽管在某些情况下ApplicationContr