Skip to content

Commit

Permalink
Merge pull request #72 from cancerit/feature/avg_rd_len_sec_supp_rds
Browse files Browse the repository at this point in the history
Fixes #64
  • Loading branch information
David Jones authored Mar 6, 2018
2 parents 9194008 + 4c7dded commit b012f94
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bam_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ int bam_access_get_avg_readlength_from_bam(htsFile *sf){
bam1_t *b = bam_init1();
int ret;
while ((ret = sam_read1(sf, head, b)) >= 0 && read_count < 100) {
if((b->core.flag & BAM_FSECONDARY)
|| (b->core.flag & BAM_FSUPPLEMENTARY)
|| (b->core.flag & BAM_FQCFAIL)){
continue;
}
read_count++;
read_length_sum += b->core.l_qseq;
}
Expand Down

0 comments on commit b012f94

Please sign in to comment.