NAME
FASTX::ReaderPaired - Warning, Experimental Paired-End FASTQ files reader, based on FASTX::Reader.
VERSION
version 1.12.0
SYNOPSIS
use
FASTX::ReaderPaired;
my
$filepath
=
'/path/to/assembly_R1.fastq'
;
# Will automatically open "assembly_R2.fastq"
my
$fq_reader
= FASTX::Reader->new({
filename
=>
"$filepath"
,
});
while
(
my
$seq
=
$fasta_reader
->getRead() ) {
$seq
->{name},
"\t"
,
$seq
->{seq1},
"\t"
,
$seq
->{qual1},
"\n"
;
$seq
->{name},
"\t"
,
$seq
->{seq2},
"\t"
,
$seq
->{qual2},
"\n"
;
}
NAME
FASTX::ReaderPaired - Warning, Experimental Paired-End FASTQ files reader, based on FASTX::Reader.
VERSION
version 1.11.0
METHODS
new()
Initialize a new FASTX::Reader object passing 'filename' argument for the first pairend, and optionally 'rev' for the second (otherwise can be guessed substituting 'R1' with 'R2' and '_1.' with '_2.')
my
$pairend
= FASTX::Reader->new({
filename
=>
"$file_R1"
,
rev
=>
"$file_R2"
});
To read from STDIN either pass {{STDIN}}
as filename, or don't pass a filename at all. In this case the module will expect an interleaved pairedend file.
my
$seq_from_stdin
= FASTX::Reader->new();
If a '_R2' file is not found, the module will try parsing as interleaved. This can be forced with:
my
$seq_from_file
= FASTX::Reader->new({
filename
=>
"$file"
,
interleaved
=> 1,
});
getReads()
Will return the next sequences in the FASTA / FASTQ file. The returned object has these attributes:
- name
-
header of the sequence (identifier)
- comment1 and comment2
-
any string after the first whitespace in the header, for the first and second paired read respectively.
- seq1 and seq2
-
DNA sequence for the first and the second pair, respectively
- qual1 and qual2
-
quality for the first and the second pair, respectively
SEE ALSO
- FASTX::Reader
-
The FASTA/FASTQ parser this module is based on.
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
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