const char* docstring="" "fastaCov 0.75 uniclust.fasta > 0.75.fasta\n" " remove sequences in uniclust.fasta with more than 1-0.75=25\% gaps\n" ; #include #include #include #include #include #include using namespace std; /* calculate portion of non-gap residues */ float calCov(const string sequence) { if (sequence.length()==0) return 0.; float cov=0; for (int i=0;i') { if (calCov(sequence)>=cov_cut) { if (outfile!="-") fp_out<=cov_cut) { if (outfile!="-") fp_out<1) cov_cut/=100.; string infile=(argc<=2)?"-":argv[2]; string outfile=(argc<=3)?"-":argv[3]; fastaCov(cov_cut,infile,outfile); return 0; }