Public API Reference
Contents
FASTX.FASTQ.ILLUMINA13_QUAL_ENCODING
FASTX.FASTQ.ILLUMINA15_QUAL_ENCODING
FASTX.FASTQ.ILLUMINA18_QUAL_ENCODING
FASTX.FASTQ.SANGER_QUAL_ENCODING
FASTX.FASTQ.SOLEXA_QUAL_ENCODING
FASTX.FASTA.Reader
FASTX.FASTA.Record
FASTX.FASTA.Writer
FASTX.FASTQ.Reader
FASTX.FASTQ.Record
FASTX.FASTQ.Writer
FASTX.FASTA.description
FASTX.FASTA.hasdescription
FASTX.FASTA.hasidentifier
FASTX.FASTA.hassequence
FASTX.FASTA.identifier
FASTX.FASTA.seqlen
FASTX.FASTA.sequence
FASTX.FASTQ.description
FASTX.FASTQ.hasdescription
FASTX.FASTQ.hasidentifier
FASTX.FASTQ.hasquality
FASTX.FASTQ.hassequence
FASTX.FASTQ.identifier
FASTX.FASTQ.quality
FASTX.FASTQ.seqlen
FASTX.FASTQ.sequence
FASTA API
The following methods and types are provided by the FASTA submodule for public use. They are not exported as in general using FASTX requires qualifying the submodule (FASTA or FASTQ) that you are using.
FASTX.FASTA.Reader
— Type.FASTA.Reader(input::IO; index = nothing)
Create a data reader of the FASTA file format.
Arguments
input
: data sourceindex=nothing
: filepath to a random access index (currently fai is supported)
FASTX.FASTA.Writer
— Type.FASTA.Writer(output::IO; width=70)
Create a data writer of the FASTA file format.
Arguments
output
: data sinkwidth=70
: wrapping width of sequence characters
FASTX.FASTA.Record
— Type.FASTA.Record()
Create an unfilled FASTA record.
FASTA.Record(data::Vector{UInt8})
Create a FASTA record object from data
.
This function verifies and indexes fields for accessors.
Note that the ownership of data
is transferred to a new record object. Editing the input data will edit the record, and is not advised after construction of the record.
FASTA.Record(str::AbstractString)
Create a FASTA record object from str
.
This function verifies and indexes fields for accessors.
FASTA.Record(identifier, sequence)
Create a FASTA record object from identifier
and sequence
.
FASTA.Record(identifier, description, sequence)
Create a FASTA record object from identifier
, description
and sequence
.
FASTX.FASTA.hasidentifier
— Function.hasidentifier(record::Record)
Checks whether or not the record
has an identifier.
FASTX.FASTA.identifier
— Function.identifier(record::Record)::Union{String, Nothing}
Get the sequence identifier of record
.
Returns nothing if the record has no identifier.
FASTX.FASTA.hasdescription
— Function.hasdescription(record::Record)
Checks whether or not the record
has a description.
FASTX.FASTA.description
— Function.description(record::Record)::Union{String, Nothing}
Get the description of record
.
Returns nothing
if record has no description.
FASTX.FASTA.hassequence
— Function.hassequence(record::Record)
Checks whether or not a sequence record contains a sequence.
FASTX.FASTA.sequence
— Function.sequence(::Type{S}, record::Record, [part::UnitRange{Int}])::S
Get the sequence of record
.
S
can be either a subtype of BioSequences.BioSequence
or String
. If part
argument is given, it returns the specified part of the sequence.
This method makes a new sequence object every time. If you have a sequence already and want to fill it with the sequence data contained in a fasta record, you can use Base.copyto!
.
sequence(record::Record, [part::UnitRange{Int}])
Get the sequence of record
.
This function infers the sequence type from the data. When it is wrong or unreliable, use sequence(::Type{S}, record::Record)
. If part
argument is given, it returns the specified part of the sequence.
This method makes a new sequence object every time. If you have a sequence already and want to fill it with the sequence data contained in a fasta record, you can use Base.copyto!
.
FASTX.FASTA.seqlen
— Function.Get the length of the fasta record's sequence.
FASTQ API
The following methods and types are provided by the FASTQ submodule for public use. They are not exported as in general using FASTX requires qualifying the submodule (FASTA or FASTQ) that you are using.
FASTX.FASTQ.Reader
— Type.FASTQ.Reader(input::IO; fill_ambiguous=nothing)
Create a data reader of the FASTQ file format.
Arguments
input
: data sourcefill_ambiguous=nothing
: fill ambiguous symbols with the given symbol
FASTX.FASTQ.Writer
— Type.FASTQ.Writer(output::IO; quality_header=false)
Create a data writer of the FASTQ file format.
Arguments
output
: data sinkquality_header=false
: output the title line at the third line just after '+'
FASTX.FASTQ.Record
— Type.FASTQ.Record()
Create an unfilled FASTQ record.
FASTQ.Record(data::Vector{UInt8})
Create a FASTQ record object from data
.
This function verifies and indexes fields for accessors.
Note that the ownership of data
is transferred to a new record object. Editing the input data will edit the record, and is not advised after construction of the record.
FASTQ.Record(str::AbstractString)
Create a FASTQ record object from str
.
This function verifies and indexes fields for accessors.
FASTQ.Record(identifier, sequence, quality; offset=33)
Create a FASTQ record from identifier
, sequence
and quality
.
FASTQ.Record(identifier, description, sequence, quality; offset=33)
Create a FASTQ record from identifier
, description
, sequence
and quality
.
FASTX.FASTQ.hasidentifier
— Function.hasidentifier(record::Record)
Checks whether or not the record
has an identifier.
FASTX.FASTQ.identifier
— Function.identifier(record::Record)::Union{String,Nothing}
Get the sequence identifier of record
.
Returns nothing
if the record has no identifier.
FASTX.FASTQ.hasdescription
— Function.hasdescription(record::Record)
Checks whether or not the record
has a description.
FASTX.FASTQ.description
— Function.description(record::Record)::Union{String, Nothing}
Get the description of record
.
Returns nothing
if record
has no description.
FASTX.FASTQ.hassequence
— Function.hassequence(record::Record)
Checks whether or not a sequence record contains a sequence.
Zero-length sequences are allowed in records.
FASTX.FASTQ.sequence
— Function.sequence(::Type{S}, record::Record, [part::UnitRange{Int}])
Get the sequence of record
.
S
can be either a subtype of BioSequences.LongSequence
or String
. If part
argument is given, it returns the specified part of the sequence.
This method makes a new sequence object every time. If you have a sequence already and want to fill it with the sequence data contained in a fastq record, you can use Base.copyto!
.
sequence(::Type{String}, record::Record, [part::UnitRange{Int}])::String
Get the sequence of record
as a String. If part
argument is given, it returns the specified part of the sequence.
sequence(record::Record, [part::UnitRange{Int}])::BioSequences.DNASequence
Get the sequence of record
.
This method makes a new sequence object every time. If you have a sequence already and want to fill it with the sequence data contained in a fastq record, you can use Base.copyto!
.
FASTX.FASTQ.seqlen
— Function.Get the length of the fastq record's sequence.
FASTX.FASTQ.hasquality
— Function.hasquality(record::Record)
Check whether the given FASTQ record
has a quality string.
FASTX.FASTQ.quality
— Function.quality(record::Record, [offset::Integer=33, [part::UnitRange]])::Vector{UInt8}
Get the base quality of record
.
quality(record::Record, encoding_name::Symbol, [part::UnitRange])::Vector{UInt8}
Get the base quality of record
by decoding with encoding_name
.
The encoding_name
can be either :sanger
, :solexa
, :illumina13
, :illumina15
, or :illumina18
.
Returns nothing
if the record has no quality string.
FASTX.FASTQ.SANGER_QUAL_ENCODING
— Constant.Sanger (Phred+33) quality score encoding
FASTX.FASTQ.SOLEXA_QUAL_ENCODING
— Constant.Solexa (Solexa+64) quality score encoding
FASTX.FASTQ.ILLUMINA13_QUAL_ENCODING
— Constant.Illumina 1.3 (Phred+64) quality score encoding
FASTX.FASTQ.ILLUMINA15_QUAL_ENCODING
— Constant.Illumina 1.5 (Phred+64) quality score encoding
FASTX.FASTQ.ILLUMINA18_QUAL_ENCODING
— Constant.Illumina 1.8 (Phred+33) quality score encoding