NAME
FASTX::Seq - A class for representing a sequence for FASTX::Reader
VERSION
version 1.9.0
SYNOPSIS
A sequence object supported from FASTX::Reader
structured as a BioX::Seq
record, but keeping the attribute names as the scalar natively provided by FASTX::Reader
.
use FASTX::Seq;
my $fastq = new($seq, $name, $comment, $qual);
my $fasta = new($seq, $name, $comment);
my $barseq = new("ATGC");
# Change attribute
$fastq->seq("ATGCTT");
new($seq, $name, $comment, $qual)
Create a new instance of FASTX::Seq
. The sequence is the only required field.
seq()
Get or update the sequence field.
my $seq = $fastq->seq();
$fastq->seq("ATGCTT");
name()
Get or update the sequence field.
my $seq = $fastq->name();
$fastq->name("seq1");
qual()
Get or update the sequence field.
my $seq = $fastq->qual();
$fastq->qual("IIIII");
comment()
Get or update the sequence field.
my $seq = $fastq->comment();
$fastq->comment("len=" . length($fastq->seq()));
rev()
Reverse (no complement) the sequence.
my $rev = $fastq->rev();
len()
Length of the sequence
my $len = $fastq->len();
rc()
Reverse and complement the sequence.
my $rc = $fastq->rc();
asfasta()
Return the sequence as a FASTA string.
my $fasta = $seq->asfasta();
asfastq()
Return the sequence as a FASTQ string. Will use a dummy fixed value quality if the sequence didnt have a quality string. Provide an character to use it as quality value.
my $fasta = $seq->asfastq();
as_fasta()
Alias to asfasta()
as_fastq()
Alias to asfastq()
is_fasta()
Return true if the record has not a quality value stored (FASTA)
if ( $seq->is_fasta() ) {
...
}
is_fastq()
Return true if the record has a quality value stored (FASTQ)
if ( $seq->is_fastq() ) {
...
}
AUTHOR
Andrea Telatin <andrea@telatin.com>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2019 by Andrea Telatin.
This is free software, licensed under:
The MIT (X11) License