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.RecordType
TwoBit.Record()

Create an unfilled 2bit record.

source
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.

source

TwoBit.Record variables support the following methods.

TwoBit.sequenceFunction
sequence([::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}.

source
TwoBit.hassequenceFunction
hassequence(record::Record)

Check that the TwoBit.Record record contains a sequence.

source