Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samtools 64 bit support #1117

Merged
merged 18 commits into from Oct 31, 2019
Merged

samtools 64 bit support #1117

merged 18 commits into from Oct 31, 2019

Conversation

daviesrob
Copy link
Member

@daviesrob daviesrob commented Oct 1, 2019

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

bam_tview.c Outdated Show resolved Hide resolved
bedidx.c Show resolved Hide resolved
test/large_pos/depth.expected.sam Outdated Show resolved Hide resolved
test/large_pos/depth_bed.expected.sam Outdated Show resolved Hide resolved
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
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
Contributor

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.

None yet

4 participants