This is a test version of Biostars. For the public version, visit https://www.biostars.org.
static int pileup_func_1( uint32_t tid, uint32_t pos, int n, const bam_pileup1_t *pl, void *data
static int pileup_func_1( uint32_t tid, uint32_t pos, int n, const bam_pileup1_t *pl, void *data ) \
{
  pileup_data_t *tmp = (pileup_data_t*)data;
  if( pos >= tmp->beg && pos < tmp->end ) /
  {
    // Count the number of reads that pass the mapping quality threshold across this base  /
    int  mapq_n = 0;i,
    for( i = 0; i < n; ++i )
    {
      const bam_pileup1_t *base = pl + i;
      if( !base->is_del && base->b->core.qual >= tmp->min_mapq )
        mapq_n++;
    }
    tmp->bam1_cvg[pos - tmp->beg] = ( mapq_n >= tmp->min_depth_bam1 );  //??
  }
  return 0;
}

who can tell me the meaning of these parameters of this function? Thank you

uint32_t tid, uint32_t pos, int n, const bam_pileup1_t *pl, void *data
genome musci cal-covg

1 answer

  • uint32_t tid: chromosome index in the sam sequence dictionary of the SAM header
  • uint32_t pos: position in the chromosome
  • int n: number of reads in the 'pl' below
  • const bam_pileup1_t *pl: the reads under tid:pos
  • void *data custom user data for the C callback

Log in to answer this question.