如何安装BLAST+

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何安装BLAST+相关的知识,希望对你有一定的参考价值。

参考技术A 对于Windows用户,根据自己的机器下载32位或者64位的安装包,下载完成之后按照常规软件安装步骤安装即可。
对于Linux用户,如果是Fedora或者Suse版本的操作系统,可以选择已经编译好RPM包,然后使用yum localinstall ***.rpm命令安装,不过需要root超级用户权限。不过,为了安装的简洁性,对于所有的Linux系统(无论那个版本),还是建议下载已经编译好的可执行文件包,如ncbi-blast-2.2.22+-ia32-linux.tar.bz,然后使用tar -zxvf
ncbi-blast-2.2.22+-ia32-linux.tar.bz 来解压文件,解压后的文件夹ncbi-blast-2.2.22+/bin里面即是可执行的BLAST+程序了,将此文件夹mv到合适的位置(如/usr/local/bif/),然后做好软链接即可(如ln -s /usr/local/bif/ncbi-blast-2.2.22+/bin/* /usr/local/bin)。
无论是Windows还是Linux,安装上面的步骤装好之后,就可以使用BLAST+了,可以不用理会.ncbirc(Windows下是ncbi.ini文件)这个配置文件。本回答被提问者采纳

MBLAST - BLAST

There are given two strings, A and B. An expansion of some string X is a string created by adding or inserting any number (zero, one or more) of blanks anywhere in the string, or in the begining or the end of the string. Eg., if the string X is ‘abcbcd’, then the strings ‘abcb-cd‘, ‘-a-bcbcd-‘ and ‘abcb-cd-‘ are expansions of the string X (blanks are denoted by the character ‘-‘).

If A1 is an expansion of the string A, and B1 is and expansion of the string B, and if A1 and B1 are of the same length, then we define the distance of the strings A1 and B1 as the sum of the distances of the characters on the same positions in these strings. We define the distance of two characters as the absolute difference of their ASCII codes, except the distance of the blank and another character, which is given (and equal for all characters).

You are to write a program which finds the expansions A1 and B1 of strings A and B, that have the smallest difference.

Input

The first line of the input file consists of the string A, and the second line of string B. They are consisted only of lower case characters of the english alphabet (a-z), and the number of characters in any of the strings is less than or equal to 2000.

The third line consists of an integer K, 1 ≤ K ≤ 100, the distance of the blank and the other characters.

Output

The first only line of the input file should consist of the smallest distance as defined in the text of the task.

Sample

 

Input:
cmc
snmn
2

output:
10
Input:
koiv
ua
1

output:
5
input: 
mj
jao
4

output:
12

题目大意:添加空格使得两个字符串的 距离值最小。
类似于 lcs 写法
题目中 k是 字符和空格之间的距离。 这里的‘距离’是题目中定义的
/* ***********************************************
Author        :guanjun
Created Time  :2016/9/4 18:45:31
File Name     :1001.cpp
************************************************ */
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <iomanip>
#include <list>
#include <deque>
#include <stack>
#define ull unsigned long long
#define ll long long
#define mod 90001
#define INF 0x3f3f3f3f
#define maxn 10010
#define cle(a) memset(a,0,sizeof(a))
const ull inf = 1LL << 61;
const double eps=1e-5;
using namespace std;
priority_queue<int,vector<int>,greater<int> >pq;
struct Node{
    int x,y;
};
struct cmp{
    bool operator()(Node a,Node b){
        if(a.x==b.x) return a.y> b.y;
        return a.x>b.x;
    }
};

bool cmp(int a,int b){
    return a>b;
}
char s[2100],t[2100];
int dp[2100][2100];
int main()
{
    #ifndef ONLINE_JUDGE
    freopen("in.txt","r",stdin);
    #endif
    //freopen("out.txt","w",stdout);
    int k;
    scanf("%s %s %d",s+1,t+1,&k);
        int n=strlen(s+1);
        int m=strlen(t+1);
        //dp[0][0]=0;
        for(int i=0;i<=n;i++)dp[i][0]=k*i;
        for(int i=0;i<=m;i++)dp[0][i]=k*i;
        for(int i=1;i<=n;i++){
            for(int j=1;j<=m;j++){
                dp[i][j]=min(dp[i-1][j-1]+abs(s[i]-t[j]),min(dp[i-1][j],dp[i][j-1])+k);
            }
        }
        cout<<dp[n][m]<<endl;
    return 0;
}

 

以上是关于如何安装BLAST+的主要内容,如果未能解决你的问题,请参考以下文章

怎么从从ncbi的ftp上下了windows的本地blast

ssh到linux服务器上 安装软件中./configure的问题 各位大侠帮忙啊

blast的结果

HPC应用软件安装《hmmer》

10在线blast比对结果解析

Bioperl 解析blast的输出结果