r533: added --no-pairing
to prevent the use of any pairing information for paired-end reads.
This commit is contained in:
parent
5acd709524
commit
d4b5dfc297
4
main.c
4
main.c
|
|
@ -6,7 +6,7 @@
|
||||||
#include "mmpriv.h"
|
#include "mmpriv.h"
|
||||||
#include "getopt.h"
|
#include "getopt.h"
|
||||||
|
|
||||||
#define MM_VERSION "2.3-r531"
|
#define MM_VERSION "2.3-r533-dirty"
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
|
@ -41,6 +41,7 @@ static struct option long_options[] = {
|
||||||
{ "secondary", optional_argument, 0, 0 },
|
{ "secondary", optional_argument, 0, 0 },
|
||||||
{ "cs", optional_argument, 0, 0 },
|
{ "cs", optional_argument, 0, 0 },
|
||||||
{ "end-bonus", required_argument, 0, 0 },
|
{ "end-bonus", required_argument, 0, 0 },
|
||||||
|
{ "no-pairing", no_argument, 0, 0 },
|
||||||
{ "help", no_argument, 0, 'h' },
|
{ "help", no_argument, 0, 'h' },
|
||||||
{ "max-intron-len", required_argument, 0, 'G' },
|
{ "max-intron-len", required_argument, 0, 'G' },
|
||||||
{ "version", no_argument, 0, 'V' },
|
{ "version", no_argument, 0, 'V' },
|
||||||
|
|
@ -135,6 +136,7 @@ int main(int argc, char *argv[])
|
||||||
else if (c == 0 && long_idx ==12) opt.flag |= MM_F_NO_LJOIN; // --no-long-join
|
else if (c == 0 && long_idx ==12) opt.flag |= MM_F_NO_LJOIN; // --no-long-join
|
||||||
else if (c == 0 && long_idx ==13) opt.flag |= MM_F_SR; // --sr
|
else if (c == 0 && long_idx ==13) opt.flag |= MM_F_SR; // --sr
|
||||||
else if (c == 0 && long_idx ==17) opt.end_bonus = atoi(optarg); // --end-bonus
|
else if (c == 0 && long_idx ==17) opt.end_bonus = atoi(optarg); // --end-bonus
|
||||||
|
else if (c == 0 && long_idx ==18) opt.flag |= MM_F_INDEPEND_SEG; // --no-pairing
|
||||||
else if (c == 0 && long_idx == 14) { // --frag
|
else if (c == 0 && long_idx == 14) { // --frag
|
||||||
if (optarg == 0 || strcmp(optarg, "yes") == 0 || strcmp(optarg, "y") == 0)
|
if (optarg == 0 || strcmp(optarg, "yes") == 0 || strcmp(optarg, "y") == 0)
|
||||||
opt.flag |= MM_F_FRAG_MODE;
|
opt.flag |= MM_F_FRAG_MODE;
|
||||||
|
|
|
||||||
7
map.c
7
map.c
|
|
@ -414,7 +414,12 @@ static void worker_for(void *_data, long i, int tid) // kt_for() callback
|
||||||
qseqs[j] = s->seq[off + j].seq;
|
qseqs[j] = s->seq[off + j].seq;
|
||||||
quals[j] = is_sr? s->seq[off + j].qual : 0;
|
quals[j] = is_sr? s->seq[off + j].qual : 0;
|
||||||
}
|
}
|
||||||
mm_map_frag(s->p->mi, s->n_seg[i], qlens, qseqs, quals, &s->n_reg[off], &s->reg[off], b, s->p->opt, s->seq[off].name);
|
if (s->p->opt->flag & MM_F_INDEPEND_SEG) {
|
||||||
|
for (j = 0; j < s->n_seg[i]; ++j)
|
||||||
|
mm_map_frag(s->p->mi, 1, &qlens[j], &qseqs[j], &quals[j], &s->n_reg[off+j], &s->reg[off+j], b, s->p->opt, s->seq[off+j].name);
|
||||||
|
} else {
|
||||||
|
mm_map_frag(s->p->mi, s->n_seg[i], qlens, qseqs, quals, &s->n_reg[off], &s->reg[off], b, s->p->opt, s->seq[off].name);
|
||||||
|
}
|
||||||
for (j = 0; j < s->n_seg[i]; ++j) // flip the query strand and coordinate to the original read strand
|
for (j = 0; j < s->n_seg[i]; ++j) // flip the query strand and coordinate to the original read strand
|
||||||
if (s->n_seg[i] == 2 && ((j == 0 && (pe_ori>>1&1)) || (j == 1 && (pe_ori&1)))) {
|
if (s->n_seg[i] == 2 && ((j == 0 && (pe_ori>>1&1)) || (j == 1 && (pe_ori&1)))) {
|
||||||
int k, t;
|
int k, t;
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
#define MM_F_NO_PRINT_2ND 0x4000
|
#define MM_F_NO_PRINT_2ND 0x4000
|
||||||
#define MM_F_2_IO_THREADS 0x8000
|
#define MM_F_2_IO_THREADS 0x8000
|
||||||
#define MM_F_LONG_CIGAR 0x10000
|
#define MM_F_LONG_CIGAR 0x10000
|
||||||
|
#define MM_F_INDEPEND_SEG 0x20000
|
||||||
|
|
||||||
#define MM_IDX_MAGIC "MMI\2"
|
#define MM_IDX_MAGIC "MMI\2"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue