2Bit file records
When you read from a 2Bit file you will get a TwoBit.Record
type. When you want to write a sequence to a 2Bit file you must first make a TwoBit.Record
type.
TwoBit.Record
— TypeTwoBit.Record()
Create an unfilled 2bit record.
Record(name::AbstractString, seq::BioSequences.BioSequence, masks::Union{Vector{UnitRange{Int}}, Nothing} = nothing)
Prepare a record for writing to a 2bit formatted file.
Needs a name
, a sequence
, and (optionally) masks
: a vector of ranges that delineate masked regions of sequence.
TwoBit.Record
variables support the following methods.
TwoBit.sequence
— Functionsequence([::Type{S},] record::Record)::S
Get the sequence of record
as S
.
If S
is omitted, the default type is BioSequences.LongDNA{4}
.
Currently, the only provided implementation for S
is BioSequences.LongDNA{4}
.
TwoBit.hassequence
— Functionhassequence(record::Record)
Check that the TwoBit.Record record
contains a sequence.
TwoBit.maskedblocks
— Functionmaskedblocks(record::Record)::Vector{UnitRange{Int}}
Get the masked blocks.