这个脚本我不明白表达的是什么意思,特别是usage中的这句话我看的很懵,那位大神帮忙解一下第一句话
#include<string>#include<vector>
#include<iostream>
#include<fstream>
#include<boost/algorithm/string.hpp>
#include<map>
#include<math.h>
using namespace std;
void usage()
{
cout <<"Usage: ./StatRfamGff <Input Rfam gff3 file> <Out put Rfam stat file>" << endl;
}
struct ncRNAInfor
{
int Length;
int Number;
};
//到这里一下就可以看懂了,上面帮忙解释下
int main(int argc, char *argv[])
{
string line;
char *Input = argv[optind++];
char *Output = argv[optind++];
if(!Input || !Output)
{
usage();
exit(0);
}
ifstream infile(Input);
ofstream outfile(Output);
map <string, ncRNAInfor> Rfam;
map <string, ncRNAInfor>::iterator Iter;
while(getline(infile,line))
{
if(line[0] == 'S' || line[0] == 'N' || line[0] == '-' )
continue;
vector<string> Vecline;
boost::split(Vecline, line, boost::is_any_of("\t "), boost::token_compress_on);
Rfam[Vecline[4]].Number += 1;
Rfam[Vecline[4]].Length += abs(atoi(Vecline[3].c_str()) - atoi(Vecline[2].c_str()) + 1);
}
for(Iter = Rfam.begin(); Iter != Rfam.end(); Iter++)
outfile << Iter->first << '\t' << Iter->second.Number << '\t' << Iter->second.Length << endl;
return 0;
}