BLAST tools

From Mswiki

Jump to: navigation, search

To BLAST a FASTA file against the non-redundant database over the NCBI internet server (netblast):

/data/6/jrjohns1/blast/netblast-2.2.14/blastc13 -p blastp -d nr -i input.fasta -o input.fasta.out

The -p option indicates the type of BLAST search (if it's a protein FASTA file, then blastp, for DNA blastn), -d indicates the NCBI database to search against (nr = non-redundant), -i indicates the input FASTA file to search against the nr database, and -o indicates the output file name.

To BLAST a FASTA file input.fasta against another FASTA file database.fasta locally:

First, you need to format the database:

/data/6/jrjohns1/blast/blast-2.2.14/formatdb -p T -o T -i database.fasta

The -o option should always be T. For protein databases use -p T, for DNA use -p F.

Then, to perform the BLAST search:

/data/6/jrjohns1/blast/blast-2.2.14/blastall -p blastp -d database.fasta -i input.fasta -o input.fasta.out

Options are the same as for netblast above.

To make a tab-delimited table containing the top three BLAST hits organized by gene:

/data/6/jrjohns1/perlscripts/BlastParser input.fasta.out

This creates a input.fasta.out.simple file

/data/6/jrjohns1/perlscripts/ParseSimple input.fasta.out.simple

This create a input.fasta.out.simple.columns file

/data/6/jrjohns1/perlscripts/ReformatColumns input.fasta.out.simple.columns

This creates a input.fasta.out.simple.columns.reformat file. This is the file you want. Apologies for the convoluted path it takes to get there.

Personal tools