{"id":189,"date":"2022-01-02T20:37:34","date_gmt":"2022-01-02T12:37:34","guid":{"rendered":"https:\/\/linguopeng.top\/?p=189"},"modified":"2022-01-02T20:43:15","modified_gmt":"2022-01-02T12:43:15","slug":"ncbi-nr%e5%ad%90%e5%ba%93%e7%9a%84%e6%9e%84%e5%bb%ba","status":"publish","type":"post","link":"https:\/\/linguopeng.top\/?p=189","title":{"rendered":"NCBI-NR\u5b50\u5e93\u7684\u6784\u5efa"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>#\u4e00\u3001\u4e0b\u8f7dnr\u5e93\u4ee5\u53ca\u5b89\u88c5taxdump\u3001accession2taxid\u3001csvtk\u3001taxonkit\u8f6f\u4ef6\nascp -P33001 -l 500m --mode recv -i ~\/.aspera\/connect\/etc\/asperaweb_id_dsa.openssh  -QTr -l6000m  anonftp@ftp-private.ncbi.nlm.nih.gov:\/blast\/db\/FASTA\/nr.gz .\/\nwget -t 0 -c ftp:\/\/ftp.ncbi.nih.gov\/pub\/taxonomy\/taxdump.tar.gz\nwget -t 0 -c https:\/\/ftp.nacbi.nlm.nih.gov\/pub\/taxonomy\/accession2taxid\/prot.accession2taxid.gz\nconda install csvtk -y\nconda install taxonkit -y\nmkdir taxdump\nmv taxdump.tar.gz taxdump\ntar -zxvf taxdump.tar.gz\nrm taxdump.tar.gz\n\n\u4e8c\u3001\u5efa\u5e93\uff08nr\u5e93\uff09\nnohup makeblastdb -parse_seqids -in nr -dbtype prot -out nr &amp;\n\n\u4e09\u3001\u4f7f\u7528TaxonKit\u63d0\u53d6\u7279\u5b9ataxons\u4e0b\u7684\u6240\u6709taxid(\u4ee5\u75c5\u6bd2\u4e3a\u4f8b\uff1a\u75c5\u6bd2NCBI\u7f16\u53f7 txid:10239)\ntaxonkit list -j 45 --ids 10239 --indent \"\" --data-dir .\/taxdump\/ > Virus.list\ncat prot.accession2taxid | csvtk -t grep -f taxid -P ..\/nr\/Virus.list | csvtk -t cut -f accession.version > Virus.taxid.acc.txt\nblastdb_aliastool -seqidlist Virus.taxid.acc.txt -db \/public1\/data\/xxxx\/data\/parasite\/nr\/nr\/nr -out nr_virues -title nr_virues\nblastdbcmd -db \/public1\/data\/xxxxx\/data\/parasite\/nr\/accession2taxid\/nr_virues -entry all -dbtype prot -out nr_Virus.fa\ndiamond makedb --in nr_Virus.fa --db nr_Virus -p 10\n\u81f3\u6b64nr_Virus\u5b50\u5e93\u5df2\u7ecf\u6784\u5efa\u5b8c\u6210\n\n##################\u6ce8\u610f\uff1a\u4e0d\u63a8\u8350\u4f7f\u7528NR\u5b50\u5e93\u6216\u5355\u4e00\uff0c\u68c0\u7d22\u51fa\u6765\u5047\u9633\u6027\u7387\u975e\u5e38\u9ad8\uff01\r####\n#\u4f46\u662f\u8fd0\u7b97\u8d77\u6765\u80fd\u8282\u7701\u6570\u5341\u500d\u7684\u65f6\u95f4\uff0c\u5c24\u5176\u662f\u968f\u7740NR\u5e93\u7684\u65e5\u76ca\u589e\u5927\uff01###\n#ids 10239 virus \u75c5\u6bd2\n#ids 2157 Archaea \u53e4\u83cc\n#ids 2 Bacteria \u7ec6\u83cc\n#ids 4751 Fungi \u771f\u83cc\n#ids 33208 Metazoa\u540e\u751f\u52a8\u7269\n#ids 3193 > sub.plants.list\r\n#ids 33208 > sub.animals.list\n\r\n\ntaxonkit list -j 45 --ids 10239 --indent \"\" --data-dir .\/taxdump\/ > Virus.list\ntaxonkit list -j 45 --ids 2157  --indent \"\" --data-dir .\/taxdump\/ > Archaea.list\ntaxonkit list -j 45 --ids 2 --indent \"\" --data-dir .\/taxdump\/ > Bacteria.list\ntaxonkit list -j 45 --ids 4751 --indent \"\" --data-dir .\/taxdump\/ > Fungi.list\nzcat prot.accession2taxid | csvtk -t grep -f taxid -P ..\/nr\/Virus.list | csvtk -t cut -f accession.version > Virus.taxid.acc.txt\nzcat prot.accession2taxid | csvtk -t grep -f taxid -P ..\/nr\/Archaea.list | csvtk -t cut -f accession.version > Archaea.taxid.acc.txt\nzcat prot.accession2taxid | csvtk -t grep -f taxid -P ..\/nr\/Bacteria.list | csvtk -t cut -f accession.version > Bacteria.taxid.acc.txt\nzcat prot.accession2taxid | csvtk -t grep -f taxid -P ..\/nr\/Fungi.list | csvtk -t cut -f accession.version > Fungi.taxid.acc.txt\n\n\n\n\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-189","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/linguopeng.top\/index.php?rest_route=\/wp\/v2\/posts\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linguopeng.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linguopeng.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linguopeng.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linguopeng.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=189"}],"version-history":[{"count":5,"href":"https:\/\/linguopeng.top\/index.php?rest_route=\/wp\/v2\/posts\/189\/revisions"}],"predecessor-version":[{"id":196,"href":"https:\/\/linguopeng.top\/index.php?rest_route=\/wp\/v2\/posts\/189\/revisions\/196"}],"wp:attachment":[{"href":"https:\/\/linguopeng.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linguopeng.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linguopeng.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}