bam1_t build function

Open
#789 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Start by reading the CRAM internal function bam_construct_seq and the surrounding functions, then inspect how BAM records are represented and assembled from component pieces. Define the construction path needed to avoid manual bit/byte shuffling, including sequence creation, and verify that it produces a valid BAM record.

Written by the indexing model from the issue text.

Description

See Will Stokes' request at https://sourceforge.net/p/samtools/mailman/message/36454348/

We desire a way to construct a BAM record from the component pieces that isn't just a manual mess of bit/byte shuffling. Most of it is easy, but some things such as creation of the sequence is complex.

CRAM has an internal function for this (bam_construct_seq), so looking at that and surrounding functions may be a suitable starting point.

Dominant language
C
Stars
950
Forks
475
Avg merge
3d 13h
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from samtools/htslib

All issues in samtools/htslib

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.