從ncbi下載數據_如何從NCBI下載所有細菌組件

從ncbi下載數據

One of the most important steps in genome analysis is gathering the data required for downstream research. This sometimes requires us to have the assembled reference genomes (mostly bacterial) so we can verify the classifiers trained or bins detected are correct and useful. This is often achieved using a BLAST search against the candidate reference genomes. However, it is very convenient to have our own BLAST database set up in advance if you are going to make a lot of search queries in future. Using the NCBI Web BLAST might not be a viable option if the project is long-running one with many experiments.

基因組分析中最重要的步驟之一就是收集下游研究所需的數據。 有時這需要我們具有組裝的參考基因組(主要是細菌),因此我們可以驗證訓練的分類器或檢測到的垃圾箱是正確且有用的。 這通常是通過對候選參考基因組進行BLAST搜索來實現的。 但是,如果將來您要進行很多搜索查詢,則預先設置我們自己的BLAST數據庫非常方便。 如果該項目長期運行并進行了許多實驗,則使用NCBI Web BLAST可能不是一個可行的選擇。

In this article, we will see how we can download the set of all the available bacterial references (or assemblies) from either GenBank or RefSeq databases. This wasn't quite straightforward, hence we present an article dedicated to this particular task.

在本文中,我們將看到如何從GenBankRefSeq數據庫下載所有可用細菌參考(或程序集)的集合。 這并不是很簡單,因此我們提供了一篇專門針對此特定任務的文章。

下載組裝信息 (Downloading Assembly Information)

Assembly metadata is available at NCBI under the URL: ftp://ftp.ncbi.nih.gov/genomes/. Here all the directories are listed and can be visited via any modern browser. In this article, we are concerned about the reference genomes from either GenBank or RefSeq databases.

程序集元數據可在NCBI的URL下找到: ftp : //ftp.ncbi.nih.gov/genomes/ 。 這里列出了所有目錄,并且可以通過任何現代瀏覽器進行訪問。 在本文中,我們關注來自GenBankRefSeq數據庫的參考基因組。

In both databases, bacterial references are available under following paths;

在這兩個數據庫中,可以通過以下路徑獲得細菌參考。

  • Genbank: ftp://ftp.ncbi.nih.gov/genomes/genbank/bacteria/

    Genbank: ftp : //ftp.ncbi.nih.gov/genomes/genbank/bacteria/

  • RefSeq: ftp://ftp.ncbi.nih.gov/genomes/refseq/bacteria/

    參考序列: ftp : //ftp.ncbi.nih.gov/genomes/refseq/bacteria/

Furthermore, the information regarding individual assemblies are available under;

此外,有關單個裝配的信息可在下面獲得;

  • Genbank: ftp://ftp.ncbi.nih.gov/genomes/genbank/bacteria/assembly_summary.txt

    Genbank: ftp : //ftp.ncbi.nih.gov/genomes/genbank/bacteria/assembly_summary.txt

  • RefSeq: ftp://ftp.ncbi.nih.gov/genomes/refseq/bacteria/assembly_summary.txt

    參考序列: ftp : //ftp.ncbi.nih.gov/genomes/refseq/bacteria/assembly_summary.txt

Use following command to download the summary file.

使用以下命令下載摘要文件。

wget ftp://ftp.ncbi.nih.gov/genomes/genbank/bacteria/assembly_summary.txt#ORwget ftp://ftp.ncbi.nih.gov/genomes/refseq/bacteria/assembly_summary.txt

Our first step would be to download this text file. The first line of the file will say the following information.

我們的第一步是下載此文本文件。 文件的第一行將顯示以下信息。

#   See ftp://ftp.ncbi.nlm.nih.gov/genomes/README_assembly_summary.txt for a description of the columns in this file.

自述文件的關鍵信息摘要 (The critical information summary of the readme)

  • Column 12: “assembly_level”: this field could be one of the choices; “Complete Genome”, “Scaffold”, “Chromosome”, “Contig”. Usually, the “Complete Genome” rows are important for analysis.

    第12列:“ assembly_level”:此字段可以是選擇之一; “完整基因組”,“腳手架”,“染色體”,“重疊群”。 通常,“完整基因組”行對于分析很重要。
  • Column 14: “genome_rep”: Could be either “Full” or “Partial”. Full contains assemblies from WGS reads.

    第14列:“ genome_rep”:可以為“ Full”或“ Partial”。 完整包含來自WGS讀取的程序集。
  • Column 11: “version_status”: Could be “latest”, “replaces” or “suppressed”. It might be common to go with the “latest” assembly.

    第11欄:“ version_status”:可以是“最新”,“替換”或“被抑制”。 使用“最新”程序集可能很常見。
  • Column 20: “ftp_path”: Path to download the files. In the assembly path, you can use the wildcard file ending “*_genomic.fna.gz” to select the fast assembly file.

    第20列:“ ftp_path”:下載文件的路徑。 在匯編路徑中,可以使用以“ * _genomic.fna.gz ”結尾的通配符文件來選擇快速匯編文件。

In the Bash terminal, you can use the following command to obtain the FTP paths for downloading the references.

在Bash終端中,可以使用以下命令獲取用于下載引用的FTP路徑。

awk -F '\t' '{if($12=="Complete Genome") print $20}' assembly_summary.txt > assembly_summary_complete_genomes.txt

Here we chose Column 12 to be “Complete Genome”. Now in the assembly_summary_complete_genomes.txt file you’ll see the available FTP paths to download the genomes from. If you check the file it’ll look like the following (first 3 lines);

在這里,我們選擇第12列作為“完整基因組”。 現在,在assembly_summary_complete_genomes.txt文件中,您將看到可用于從中下載基因組的FTP路徑。 如果您檢查文件,它將類似于以下內容(前三行);

ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/010/525/GCF_000010525.1_ASM1052v1
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/007/365/GCF_000007365.1_ASM736v1
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/007/725/GCF_000007725.1_ASM772v1

下載Fasta文件 (Downloading the Fasta Files)

It is better to create a folder as references using the following command.

最好使用以下命令創建一個文件夾作為參考。

mkdir references

Now you can execute the following command to download the gzipped FASTA files.

現在,您可以執行以下命令來下載壓縮后的 FASTA文件。

for next in $(cat assembly_summary_complete_genomes.txt); do wget -P 

Now you’ll see gz files for all the assemblies that satisfy your condition specified in the awk command before.

現在,您將看到滿足awk命令之前指定條件的所有程序集的gz文件。

You will be required to either extract them or gather them to a single file for downstream analysis. We suggest the readers have a look at the following article to see how to make a BLAST database.

您將需要提取它們或將它們收集到單個文件中以進行下游分析。 我們建議讀者閱讀以下文章,以了解如何制作BLAST數據庫。

We hope this article would help future researchers to obtain datasets needed for their bacterial studies. Happy reading. Cheers!

我們希望本文能幫助未來的研究人員獲得細菌研究所需的數據集。 祝您閱讀愉快。 干杯!

翻譯自: https://medium.com/computational-biology/how-to-download-all-bacterial-assemblies-from-ncbi-35f4bc5435f9

從ncbi下載數據

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/387918.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/387918.shtml
英文地址,請注明出處:http://en.pswp.cn/news/387918.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

shell之引號嵌套引號大全

萬惡的引號 這個能看懂你就出師了! 轉載于:https://www.cnblogs.com/theodoric008/p/10000480.html

oracle表分區詳解

oracle表分區詳解 從以下幾個方面來整理關于分區表的概念及操作: 表空間及分區表的概念表分區的具體作用表分區的優缺點表分區的幾種類型及操作方法對表分區的維護性操作 1.表空間及分區表的概念 表空間: 是一個或多個數據文件的集合,所有的數據對象都存…

線性插值插值_揭秘插值搜索

線性插值插值搜索算法指南 (Searching Algorithm Guide) Prior to this article, I have written about Binary Search. Check it out if you haven’t seen it. In this article, we will be discussing Interpolation Search, which is an improvement of Binary Search when…

其他命令

keys *這個可以全部的值del name 這個可以刪除某個127.0.0.1:6379> del s_set(integer) 1127.0.0.1:6379> keys z*(匹配)1) "z_set2"2) "z_set"127.0.0.1:6379> exists sex(integer) 0 127.0.0.1:6379> get a"3232…

建按月日自增分區表

一、建按月自增分區表: 1.1建表SQL> create table month_interval_partition_table (id number,time_col date) partition by range(time_col)2 interval (numtoyminterval(1,month))3 (4 partition p_month_1 values less than (to_date(2014-01-01,yyyy-mm…

#1123-JSP隱含對象

JSP 隱含對象 JSP隱含對象是JSP容器為每個頁面提供的Java對象,開發者可以直接使用它們而不用顯式聲明。JSP隱含對象也被稱為預定義變量。 JSP所支持的九大隱含對象: 對象,描述 request,HttpServletRequest類的實例 response&#…

按照時間,每天分區;按照數字,200000一個分區

按照時間,每天分區 create table test_p(id number,createtime date) partition by range(createtime) interval(numtodsinterval(1,day)) store in (users) ( partition test_p_p1 values less than(to_date(20140110,yyyymmdd)) ); create index index_test_p_id …

如果您不將Docker用于數據科學項目,那么您將生活在1985年

重點 (Top highlight)One of the hardest problems that new programmers face is understanding the concept of an ‘environment’. An environment is what you could say, the system that you code within. In principal it sounds easy, but later on in your career yo…

jmeter對oracle壓力測試

下載Oracle的jdbc數據庫驅動包,注意Oracle數據庫的版本,這里使用的是:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production; 一般數據庫的驅動包文件在安裝路徑下:D:\oracle\product\10.2.…

集合里面的 E是泛型 暫且認為是object

集合里面的 E是泛型 暫且認為是object轉載于:https://www.cnblogs.com/classmethond/p/10011374.html

docker部署flask_使用Docker,GCP Cloud Run和Flask部署Scikit-Learn NLP模型

docker部署flaskA brief guide to building an app to serve a natural language processing model, containerizing it and deploying it.構建用于服務自然語言處理模型,將其容器化和部署的應用程序的簡要指南。 By: Edward Krueger and Douglas Franklin.作者&am…

異常處理的原則

1:函數內部如果拋出需要檢測的異常,那么函數上必須要聲明,否則必須在函數內用try catch捕捉,否則編譯失敗。2:如果調用到了聲明異常的函數,要么try catch 要么throws,否則編譯失敗。3&#xff…

模塊化整理

#region常量#endregion#region 事件#endregion#region 字段#endregion#region 屬性#endregion#region 方法#endregion#region Unity回調#endregion#region 事件回調#endregion#region 幫助方法#endregion來自為知筆記(Wiz)轉載于:https://www.cnblogs.com/soviby/p/10013294.ht…

在oracle中處理日期大全

在oracle中處理日期大全 TO_DATE格式 Day: dd number 12 dy abbreviated fri day spelled out friday ddspth spelled out, ordinal twelfth Month: mm number 03 mon abbreviated mar month spelled out march Year: yy two digits 98 yyyy four …

BZOJ4868 Shoi2017期末考試(三分+貪心)

容易想到枚舉最晚發布成績的課哪天發布,這樣與ti和C有關的貢獻固定。每門課要么貢獻一些調節次數,要么需要一些調節次數,剩下的算貢獻也非常顯然。這樣就能做到平方級別了。 然后大膽猜想這是一個凸函數三分就能A掉了。具體的,延遲…

SQL的執行計劃

SQL的執行計劃實際代表了目標SQL在Oracle數據庫內部的具體執行步驟,作為調優,只有知道了優化器選擇的執行計劃是否為當前情形下最優的執行計劃,才能夠知道下一步往什么方向。 執行計劃的定義:執行目標SQL的所有步驟的組合。 我們首…

問卷 假設檢驗 t檢驗_真實問題的假設檢驗

問卷 假設檢驗 t檢驗A statistical Hypothesis is a belief made about a population parameter. This belief may or might not be right. In other words, hypothesis testing is a proper technique utilized by scientist to support or reject statistical hypotheses. Th…

webpack打包ES6降級ES5

Babel是一個廣泛使用的轉碼器,babel可以將ES6代碼完美地轉換為ES5代碼,所以我們不用等到瀏覽器的支持就可以在項目中使用ES6的特性。 安裝babel實現ES6到ES5 npm install -D babel-core babel-preset-es2015 復制代碼安裝babel-loader npm install -D ba…

[轉帖]USB-C和Thunderbolt 3連接線你搞懂了嗎?---沒搞明白.

USB-C和Thunderbolt 3連接線你搞懂了嗎? 2018年11月25日 07:30 6318 次閱讀 稿源:威鋒網 3 條評論按照計算行業的風潮,USB Type-C 將會是下一代主流的接口。不過,在過去兩年時間里,關于 USB-C、Thunderbolt 3、USB 3.1…

sqldeveloper的查看執行計劃快捷鍵F10

簡介:本文全面詳細介紹oracle執行計劃的相關的概念,訪問數據的存取方法,表之間的連接等內容。并有總結和概述,便于理解與記憶!目錄---一.相關的概念Rowid的概念Recursive Sql概念Predicate(謂詞)DRiving Table(驅動表)…