<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://stab.st-andrews.ac.uk/wiki/index.php?action=history&amp;feed=atom&amp;title=Updating_BLAST_databases</id>
		<title>Updating BLAST databases - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://stab.st-andrews.ac.uk/wiki/index.php?action=history&amp;feed=atom&amp;title=Updating_BLAST_databases"/>
		<link rel="alternate" type="text/html" href="http://stab.st-andrews.ac.uk/wiki/index.php?title=Updating_BLAST_databases&amp;action=history"/>
		<updated>2026-06-03T06:57:40Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://stab.st-andrews.ac.uk/wiki/index.php?title=Updating_BLAST_databases&amp;diff=3280&amp;oldid=prev</id>
		<title>PeterThorpe: Created page with &quot;= crontab runs every sunda: updates all balstable dbs =     &gt; more PT_download_BLAST_db.sh  #!/bin/bash  #$ -cwd  set -euo pipefail  # script to convert donwload NR    cd /she...&quot;</title>
		<link rel="alternate" type="text/html" href="http://stab.st-andrews.ac.uk/wiki/index.php?title=Updating_BLAST_databases&amp;diff=3280&amp;oldid=prev"/>
				<updated>2018-10-23T14:25:58Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;= crontab runs every sunda: updates all balstable dbs =     &amp;gt; more PT_download_BLAST_db.sh  #!/bin/bash  #$ -cwd  set -euo pipefail  # script to convert donwload NR    cd /she...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= crontab runs every sunda: updates all balstable dbs =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; more PT_download_BLAST_db.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #$ -cwd&lt;br /&gt;
 set -euo pipefail&lt;br /&gt;
 # script to convert donwload NR&lt;br /&gt;
 &lt;br /&gt;
 cd /shelf/public/blastntnr/blastDatabases&lt;br /&gt;
 &lt;br /&gt;
 rm -rf prot.accession2taxid.gz.md5 prot.accession2taxid.gz *.dmp taxcat.zip taxdump.tar.gz nr.faa taxdb.*&lt;br /&gt;
 &lt;br /&gt;
 # get the accession to txid db&lt;br /&gt;
 wget ftp://ftp.ncbi.nih.gov/pub/taxonomy/accession2taxid/prot.accession2taxid.gz.md5&lt;br /&gt;
 wget ftp://ftp.ncbi.nih.gov/pub/taxonomy/accession2taxid/prot.accession2taxid.gz&lt;br /&gt;
 md5sum -c prot.accession2taxid.gz.md5&lt;br /&gt;
 pigz -d prot.accession2taxid.gz&lt;br /&gt;
 &lt;br /&gt;
 # get the tax id files&lt;br /&gt;
 wget ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxcat.zip&lt;br /&gt;
 unzip taxcat.zip&lt;br /&gt;
 &lt;br /&gt;
 # get the tax dump files&lt;br /&gt;
 wget ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz&lt;br /&gt;
 #tar -zxvf taxdump.tar.gz&lt;br /&gt;
 &lt;br /&gt;
 # download human genomic&lt;br /&gt;
 perl update_blastdb.pl --passive --force human_genomic&lt;br /&gt;
 &lt;br /&gt;
 # download nr&lt;br /&gt;
 perl update_blastdb.pl --passive --force blastdb nr&lt;br /&gt;
 &lt;br /&gt;
 # download nt&lt;br /&gt;
 perl update_blastdb.pl --passive --force blastdb nt&lt;br /&gt;
 &lt;br /&gt;
 # download swissprot&lt;br /&gt;
 wget ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.fasta.gz&lt;br /&gt;
 &lt;br /&gt;
 folders=*.tar.gz&lt;br /&gt;
 for folder in ${folders}&lt;br /&gt;
 do&lt;br /&gt;
     tar -zxvf ${folder}&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 export BLASTDB=/shelf/public/blastntnr/blastDatabases&lt;br /&gt;
 &lt;br /&gt;
 # diamond can only use protein databases with this program.&lt;br /&gt;
 blastdbcmd -entry &amp;#039;all&amp;#039; -db nr &amp;gt; nr.faa&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;im making the nr fasta file&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # load diamond v0.7.11.60&lt;br /&gt;
 module load diamond&lt;br /&gt;
 diamond makedb --in nr.faa -d nr&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;nr fasta done&amp;quot;&lt;br /&gt;
 pigz -d uniprot_sprot.fasta.gz&lt;br /&gt;
 diamond makedb --in uniprot_sprot.fasta -d uniprot&lt;br /&gt;
 &lt;br /&gt;
 #diamond makedb --in /mnt/shared/cluster/blast/ncbi/extracteduniref90.faa -d uniref90&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 #files required for pyhon script to get tax id and species name ..&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;downloading and unzipping done&amp;quot;&lt;br /&gt;
 pigz -d prot.accession2taxid.gz&lt;br /&gt;
 &lt;br /&gt;
 python prepare_accession_to_description_db.py&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;four discription to accession number database done&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 pigz prot.accession2taxid&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;deleting nr.faa&amp;quot;&lt;br /&gt;
 rm nr.faa&lt;br /&gt;
 echo &amp;quot;finished&amp;quot;&lt;/div&gt;</summary>
		<author><name>PeterThorpe</name></author>	</entry>

	</feed>