The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

FASTX::Seq - A class for representing a sequence for FASTX::Reader

VERSION

version 1.6.1

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.

    my $fasta = $seq->asfastq();

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