Skip to content
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ OBJS = main.o vcfindex.o tabix.o \
vcfcall.o mcall.o vcmp.o gvcf.o reheader.o convert.o vcfconvert.o tsv2vcf.o \
vcfcnv.o vcfhead.o HMM.o consensus.o ploidy.o bin.o hclust.o version.o \
regidx.o smpl_ilist.o csq.o vcfbuf.o \
mpileup.o bam2bcf.o bam2bcf_indel.o bam2bcf_iaux.o read_consensus.o bam_sample.o \
mpileup.o mpileup2.o bam2bcf.o bam2bcf_indel.o bam2bcf_iaux.o read_consensus.o bam_sample.o \
vcfsort.o cols.o extsort.o dist.o abuf.o \
ccall.o em.o prob1.o kmin.o str_finder.o
ccall.o em.o prob1.o kmin.o str_finder.o \
mpileup2/mpileup.o
PLUGIN_OBJS = vcfplugin.o

prefix = /usr/local
Expand Down Expand Up @@ -277,6 +278,8 @@ cols.o: cols.c cols.h
regidx.o: regidx.c $(htslib_hts_h) $(htslib_kstring_h) $(htslib_kseq_h) $(htslib_khash_str2int_h) regidx.h
consensus.o: consensus.c $(htslib_vcf_h) $(htslib_kstring_h) $(htslib_synced_bcf_reader_h) $(htslib_kseq_h) $(htslib_bgzf_h) regidx.h $(bcftools_h) rbuf.h $(filter_h)
mpileup.o: mpileup.c $(htslib_sam_h) $(htslib_faidx_h) $(htslib_kstring_h) $(htslib_khash_str2int_h) $(htslib_hts_os_h) regidx.h $(bcftools_h) $(bam2bcf_h) $(bam_sample_h) $(gvcf_h)
mpileup2.o: mpileup2.c $(htslib_sam_h) $(htslib_faidx_h) $(htslib_kstring_h) $(htslib_khash_str2int_h) $(htslib_hts_os_h) $(bcftools_h) mpileup2/mpileup.h
mpileup2/mpileup.o: mpileup2/mpileup.h mpileup2/mpileup.c
bam2bcf.o: bam2bcf.c $(htslib_hts_h) $(htslib_sam_h) $(htslib_kstring_h) $(htslib_kfunc_h) $(bam2bcf_h) mw.h
bam2bcf_indel.o: bam2bcf_indel.c $(htslib_hts_h) $(htslib_sam_h) $(htslib_khash_str2int_h) $(bam2bcf_h) $(htslib_ksort_h) str_finder.h
bam2bcf_iaux.o: bam2bcf_iaux.c $(htslib_hts_h) $(htslib_sam_h) $(htslib_khash_str2int_h) $(bam2bcf_h) $(htslib_ksort_h) str_finder.h read_consensus.h cigar_state.h
Expand Down
3 changes: 2 additions & 1 deletion bam2bcf.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ plp_cd_t;


typedef struct __bcf_callaux_t {
int fmt_flag, ambig_reads;
uint32_t fmt_flag;
int ambig_reads;
int capQ, min_baseQ, max_baseQ, delta_baseQ;
int openQ, extQ, tandemQ; // for indels
uint32_t min_support, max_support; // for collecting indel candidates
Expand Down
5 changes: 5 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ int count_plugins(void);
int main_consensus(int argc, char *argv[]);
int main_csq(int argc, char *argv[]);
int main_mpileup(int argc, char *argv[]);
int main_mpileup2(int argc, char *argv[]);
int main_sort(int argc, char *argv[]);

typedef struct
Expand Down Expand Up @@ -174,6 +175,10 @@ static cmd_t cmds[] =
.alias = "mpileup",
.help = "multi-way pileup producing genotype likelihoods"
},
{ .func = main_mpileup2,
.alias = "mpileup2",
.help = "-new version of mpileup (experimental)" // do not advertise yet
},
#if USE_GPL
{ .func = main_polysomy,
.alias = "polysomy",
Expand Down
18 changes: 1 addition & 17 deletions mpileup.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ DEALINGS IN THE SOFTWARE. */
#include "bam_sample.h"
#include "gvcf.h"

#define MPLP_BCF 1
#define MPLP_VCF (1<<1)
#define MPLP_NO_COMP (1<<2)
#define MPLP_NO_ORPHAN (1<<3)
#define MPLP_REALN (1<<4)
#define MPLP_NO_INDEL (1<<5)
Expand Down Expand Up @@ -1078,7 +1075,7 @@ int read_file_list(const char *file_list,int *n,char **argv[])
continue; \
}

void parse_format_flag(uint32_t *flag, const char *str)
static void parse_format_flag(uint32_t *flag, const char *str)
{
int i, n_tags;
char **tags = hts_readlist(str, 0, &n_tags);
Expand Down Expand Up @@ -1562,19 +1559,6 @@ int main_mpileup(int argc, char *argv[])
fprintf(stderr,"[warning] The -a DP option is required with --gvcf, switching on.\n");
mplp.fmt_flag |= B2B_FMT_DP;
}
if ( mplp.flag&(MPLP_BCF|MPLP_VCF|MPLP_NO_COMP) )
{
if ( mplp.flag&MPLP_VCF )
{
if ( mplp.flag&MPLP_NO_COMP ) mplp.output_type = FT_VCF;
else mplp.output_type = FT_VCF_GZ;
}
else if ( mplp.flag&MPLP_BCF )
{
if ( mplp.flag&MPLP_NO_COMP ) mplp.output_type = FT_BCF;
else mplp.output_type = FT_BCF_GZ;
}
}
if ( !(mplp.flag&MPLP_REALN) && mplp.flag&MPLP_REDO_BAQ )
{
fprintf(stderr,"Error: The -B option cannot be combined with -E\n");
Expand Down
Loading