示例#1
0
int main(int argc, char *argv[])
{
	int c, ec_k = -1, unitig_k = -1;
	char *seq, *qual;
	FILE *fp;
	int64_t l;
	while ((c = getopt(argc, argv, "k:l:")) >= 0) {
		switch (c) {
			case 'k': ec_k = atoi(optarg); break;
			case 'l': unitig_k = atoi(optarg); break;
		}
	}
	if (optind + 1 >= argc) {
		fprintf(stderr, "Local assembler for small peak regions. Output cleaned unitigs.\nUsage: SAPPER_fermi [-k ecKmer] [-l utgKmer] <in.fq> <out.fq>\n");
		return 1;
	}
	fp = fopen( argv[optind+1], "wb");
	l = fm6_api_readseq(argv[optind], &seq, &qual);
	fm6_api_correct(ec_k, l, seq, qual);
	mag_t *g;
	free(qual);
	g = fm6_api_unitig(unitig_k, l, seq);
	magopt_t *opt = mag_init_opt();
	//opt->flag |= MOG_F_AGGRESSIVE | MOG_F_CLEAN;
	opt->flag |= MOG_F_CLEAN;
	opt->min_merge_len = 30;
	mag_g_clean(g, opt);
	free(opt);
	mag_g_fprint(g, fp);
	mag_g_destroy(g);
	free(seq);
	return 0;
}
示例#2
0
文件: misc.c 项目: lh3/fermi-lite
void fml_mag_destroy(struct mag_t *g)
{
	mag_g_destroy(g);
}