Skip to content

samtools 64 bit support#1117

Merged
valeriuo merged 18 commits into
samtools:developfrom
daviesrob:bigness2
Oct 31, 2019
Merged

samtools 64 bit support#1117
valeriuo merged 18 commits into
samtools:developfrom
daviesrob:bigness2

Conversation

@daviesrob

@daviesrob daviesrob commented Oct 1, 2019

Copy link
Copy Markdown
Member

Make samtools work with 64 bit positions, now HTSlib supports them.

Looked at so far are sort, merge, depth, tview and the BED file reader. This is a work-in-progress, more sub-commands will be added.

Includes tests as it's easy to otherwise miss places where 32-bitness has crept in.

Later additions:
stats, markdup, calmd, fixmate, faidx, mpileup, depad, targetcut, coverage

Comment thread bam_tview.c Outdated
Comment thread bedidx.c
Comment thread test/large_pos/depth.expected.sam
Comment thread test/large_pos/depth_bed.expected.sam
Comment thread test/large_pos/tview.expected.out.new Outdated
Comment thread bam_markdup.c Outdated
int32_t orientation, leftmost;
hts_pos_t this_coord, this_end, other_coord, other_end;
int32_t this_ref, other_ref;
int8_t orientation, leftmost;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftmost could end up with the wrong sign, due to truncation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true. The uses of leftmost should be separated out in that function.

daviesrob and others added 18 commits October 30, 2019 14:21
Separate tid from pos in heap1_t.  Merge rev with pos as only
one bit is needed.

Radix sort is changed to work exclusively on bytes instead of
SHIFT bits at a time.  It now counts the number of bytes needed
to store pos and tid separately, which should make it more
efficient when pos is small.
Use bedidx.h in bam2depth.c and bam_plcmd.c for bed_* function
prototypes.
Tests for round-trip, index, bedidx, sort, merge, depth, and
tview.

Unrelated fix of "my variable $f masks earlier declaration" warning.
This checks various boundary locations rather than just +10Gb to all
and also validates fixmates generation of PNEXT and TLEN as well as
samtools sort.
Added another smaller variable for the stored value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants