NAME
CracTools::Output - A module to manage CracTools output files.
VERSION
version 1.25
SYNOPSIS
# Creating a default output object.
# Everything will be print to the standard output
my $output = CracTools::Output->new();
# Print nice headers
my $output->printHeaders(version => '1.01',summary => 'blabla', args => @ARGV);
# This will print "foo\tbar\n"
$output->printLine('foo','bar');
# Using semicolon as separator charcater
my $output = CracTools::Output->new(sep => ';');
# Print into a file
my $output = CracTools::Output->new(file => 'foo.bar');
DESCRIPTION
CracTools::Output is a simple tool to generate Char-Separated files.
METHODS
new
Arg [sep] : (Optional) Character to use as separator for columns
Arg [file] : (Optional) String - Ouput file, if not specified
CracTools::Output prints to STDOUT.
Arg [NA] : (Optional NA string to use when for undef variables
Example : $output = CracTools::Output->new(file => 'output.txt', sep => '\t');
Description : Create a new CracTools::Output object
ReturnType : CracTools::Output
printHeaders
Arg [version] : (Optional) Version number of the script that is calling "printHeaders" method.
Arg [summary] : (Optional) String - Summary text to print in headers (can have multiple lines
Example : $output->printHeaders(version => $version, summary => "Found $n reads");
Description : Print headers to the output stream with CracTools-core version, date, name of calling script.
printHeaderLine
Arg [1] : Array of strings
Example : $output->printHeaderLine("Read Id","Read_seq","Nb_occ");
Description : Print header line to the file (with a "# " append to the start of the line)
printLine
Arg [1] : Array of strings
Example : $output->printLine("Read Id","Read_seq","Nb_occ");
Description : Print a line to the file, each string of the array parameter is print
with the separator defined for the output.
printOutput
Arg [1] : String - Value to print
Example : $output->printLine("This is a line");
Description : Print the string in parameter to the output stream.
printlnOutput
Arg [1] : String - Value to print
Example : $output->printLine("This is a line");
Description : Print the string in parameter to the output stream with an extra "\n" at the end of the string.
AUTHORS
Nicolas PHILIPPE <nphilippe.research@gmail.com>
Jérôme AUDOUX <jaudoux@cpan.org>
Sacha BEAUMEUNIER <sacha.beaumeunier@gmail.com>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2017 by IRMB/INSERM (Institute for Regenerative Medecine and Biotherapy / Institut National de la Santé et de la Recherche Médicale) and AxLR/SATT (Lanquedoc Roussilon / Societe d'Acceleration de Transfert de Technologie).
This is free software, licensed under:
The GNU Affero General Public License, Version 3, November 2007