-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c01e3dc
commit 29f40a0
Showing
19 changed files
with
477 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,4 @@ benchmark/.Rhistory | |
taxonkit/binaries* | ||
*names.dmp | ||
*nodes.dmp | ||
*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Tutorial | ||
|
||
## Extract all sequences of certen taxons from the nr database | ||
|
||
### Dataset | ||
|
||
- [prot.accession2taxid.gz](ftp://ftp.ncbi.nih.gov/pub/taxonomy/accession2taxid/prot.accession2taxid.gz) | ||
|
||
### Steps | ||
|
||
Taking bacteria for example. | ||
|
||
1. Getting all taxids of bacteria (taxid 2): | ||
|
||
$ taxonkit list --nodes nodes.dmp --ids 2 --indent "" > bacteria.taxid.txt | ||
|
||
It takes only 2.5s! Number of taxids: | ||
|
||
$ wc -l bacteria.taxid.txt | ||
454591 bacteria.taxid.txt | ||
|
||
2. Extacting accessions with [csvtk](http://bioinf.shenwei.me/csvtk/download/): | ||
|
||
$ csvtk -t grep -f taxid -P bacteria.taxid.txt prot.accession2taxid.gz | csvtk -t cut -f accession.version > bacteria.taxid.acc.txt | ||
|
||
3. Extracting nr sequences: | ||
|
||
$ blastdbcmd -db nr -entry all -outfmt "%a\t%T" | \ | ||
csvtk -t grep -f 2 -P bacteria.taxid.acc.txt | \ | ||
csvtk -t cut -f 1 | \ | ||
blastdbcmd -db nr -entry_batch - -out bacteria.fa | ||
|
||
<div id="disqus_thread"></div> | ||
<script> | ||
|
||
/** | ||
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. | ||
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/ | ||
/* | ||
var disqus_config = function () { | ||
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable | ||
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable | ||
}; | ||
*/ | ||
(function() { // DON'T EDIT BELOW THIS LINE | ||
var d = document, s = d.createElement('script'); | ||
s.src = '//taxonkit.disqus.com/embed.js'; | ||
s.setAttribute('data-timestamp', +new Date()); | ||
(d.head || d.body).appendChild(s); | ||
})(); | ||
</script> | ||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule site
updated
from 30163e to eed57e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.