Showing 1 of 2 files from the diff.
Other files ignored by Codecov
test/test_bam.jl has changed.

@@ -11,18 +11,21 @@
Loading
11 11
    block_size::Int32
12 12
    refid::Int32
13 13
    pos::Int32
14 -
    bin_mq_nl::UInt32
15 -
    flag_nc::UInt32
14 +
    l_read_name::UInt8
15 +
    mapq::UInt8
16 +
    bin::UInt16
17 +
    n_cigar_op::UInt16
18 +
    flag::UInt16
16 19
    l_seq::Int32
17 20
    next_refid::Int32
18 21
    next_pos::Int32
19 22
    tlen::Int32
20 23
    # variable length data
21 24
    data::Vector{UInt8}
22 -
    reader::Reader
25 +
    reader::Union{Reader, Nothing}
23 26
24 27
    function Record()
25 -
        return new(0, 0, 0, 0, 0, 0, 0, 0, 0, UInt8[])
28 +
        return new(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, UInt8[])
26 29
    end
27 30
end
28 31
@@ -49,8 +52,11 @@
Loading
49 52
    return a.block_size == b.block_size &&
50 53
        a.refid         == b.refid &&
51 54
        a.pos           == b.pos &&
52 -
        a.bin_mq_nl     == b.bin_mq_nl &&
53 -
        a.flag_nc       == b.flag_nc &&
55 +
        a.l_read_name   == b.l_read_name &&
56 +
        a.mapq          == b.mapq &&
57 +
        a.bin           == b.bin &&
58 +
        a.n_cigar_op    == b.n_cigar_op &&
59 +
        a.flag          == b.flag &&
54 60
        a.l_seq         == b.l_seq &&
55 61
        a.next_refid    == b.next_refid &&
56 62
        a.next_pos      == b.next_pos &&
@@ -60,19 +66,13 @@
Loading
60 66
61 67
function Base.copy(record::Record)
62 68
    copy = Record()
63 -
    copy.block_size = record.block_size
64 -
    copy.refid      = record.refid
65 -
    copy.pos        = record.pos
66 -
    copy.bin_mq_nl  = record.bin_mq_nl
67 -
    copy.flag_nc    = record.flag_nc
68 -
    copy.l_seq      = record.l_seq
69 -
    copy.next_refid = record.next_refid
70 -
    copy.next_pos   = record.next_pos
71 -
    copy.tlen       = record.tlen
72 -
    copy.data       = record.data[1:data_size(record)]
73 -
    if isdefined(record, :reader)
74 -
        copy.reader = record.reader
69 +
    GC.@preserve copy record begin
70 +
    	dst_pointer = Ptr{UInt8}(pointer_from_objref(copy))
71 +
    	src_pointer = Ptr{UInt8}(pointer_from_objref(record))
72 +
    	unsafe_copyto!(dst_pointer, src_pointer, FIXED_FIELDS_BYTES)
75 73
    end
74 +
    copy.data       = record.data[1:data_size(record)]
75 +
    copy.reader     = record.reader
76 76
    return copy
77 77
end
78 78
@@ -80,8 +80,11 @@
Loading
80 80
    record.block_size = 0
81 81
    record.refid      = 0
82 82
    record.pos        = 0
83 -
    record.bin_mq_nl  = 0
84 -
    record.flag_nc    = 0
83 +
    record.l_read_name = 0
84 +
    record.mapq = 0
85 +
    record.bin = 0
86 +
    record.flag = 0
87 +
    record.n_cigar_op = 0
85 88
    record.l_seq      = 0
86 89
    record.next_refid = 0
87 90
    record.next_pos   = 0
@@ -132,7 +135,7 @@
Loading
132 135
"""
133 136
function flag(record::Record)::UInt16
134 137
    checkfilled(record)
135 -
    return UInt16(record.flag_nc >> 16)
138 +
    return record.flag
136 139
end
137 140
138 141
function hasflag(record::Record)
@@ -318,7 +321,7 @@
Loading
318 321
Get the mapping quality of `record`.
319 322
"""
320 323
function mappingquality(record::Record)::UInt8
321 -
    return UInt8((record.bin_mq_nl >> 8) & 0xff)
324 +
    return record.mapq
322 325
end
323 326
324 327
function hasmappingquality(record::Record)
@@ -397,7 +400,7 @@
Loading
397 400
end
398 401
399 402
function cigar_position(record::Record, checkCG::Bool = true)::Tuple{Int, Int}
400 -
    cigaridx, nops = seqname_length(record) + 1, record.flag_nc & 0xFFFF
403 +
    cigaridx, nops = seqname_length(record) + 1, record.n_cigar_op
401 404
    if !checkCG
402 405
        return cigaridx, nops
403 406
    end
@@ -664,5 +667,5 @@
Loading
664 667
665 668
# Return the length of the read name.
666 669
function seqname_length(record::Record)
667 -
    return record.bin_mq_nl & 0xff
670 +
    return record.l_read_name
668 671
end
Files Coverage
src 79.20%
Project Totals (16 files) 79.20%
codecov-umbrella
Build #315727239 -
unittests
codecov-umbrella
Build #315727239 -
unittests
codecov-umbrella
Build #315727239 -
unittests
codecov-umbrella
Build #315727239 -
unittests
codecov-umbrella
Build #315727239 -
unittests
codecov-umbrella
Build #315727239 -
unittests
codecov-umbrella
Build #315727239 -
unittests
codecov-umbrella
Build #315727239 -
unittests
codecov-umbrella
Build #315727239 -
unittests
codecov-umbrella
Build #315727239 -
unittests
codecov-umbrella
Build #315727239 -
unittests
codecov-umbrella
Build #315727239 -
unittests
codecov-umbrella
Build #315727239 -
unittests

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading