=head1 LICENSE Copyright (c) 2009 Illumina, Inc. This software is covered by the "Illumina Genome Analyzer Software License Agreement" and the "Illumina Source Code License Agreement", and certain third party copyright/licenses, and any user of this source file is bound by the terms therein (see accompanying files Illumina_Genome_Analyzer_Software_License_Agreement.pdf and Illumina_Source_Code_License_Agreement.pdf and third party copyright/license notices). This file is part of the Consensus Assessment of Sequence And VAriation (CASAVA) software package. =head1 NAME Casava::Demultiplex - Utility library for indexing. =head1 SYNOPSIS =head1 DESCRIPTION This script is a rewrite of the original GERALD library originally implemented for the Pipeline. Library for the creation, initialization and configuration of the Alignment folder. Provides a number of alignment-related services for CASAVA; =head1 SUBROUTINES =cut # POD for for each subroutines is right before the implementation # More POD after __END__ package Casava::Demultiplex::Dx; use strict; use warnings "all"; use Carp; use Exporter 'import'; use Cwd; use lib '@CASAVA_FULL_PERL_LIBDIR@'; # substituted by CMake during install my $LIB_EXEC_DIR = '@CASAVA_FULL_LIBEXECDIR@'; use XML::Simple; use Text::ParseWords; use File::Spec; use File::Path; use File::Copy; use File::Basename 'dirname'; use Data::Dumper; use Casava::Demultiplex::SampleSheet; our @EXPORT_OK = qw(&new); sub new(;$) { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; $self->{SYSTEM} = { 'OS' => "$^O", 'PID' => "$$", 'PERL_VERSION' => "$^V", 'PERL_EXECUTABLE' => "$^X", }; $self->{ID} = '@CASAVA_VERSION_FULL@'; bless ($self, $class); return $self; } sub id($;$) { my $self = shift; if (@_) { $self->{ID} = shift } return $self->{ID}; } sub generalInfo($$\@) { my ($self,$handle,$CLI) = @_; my $data = Data::Dumper->new([$self->{SYSTEM}, $self->{ID}, $0, $CLI, \@INC, [sort(values %INC)], \%ENV], [qw(_System _ID-string _Program _Command-line _Locations _Modules _Environment)]); $data->Pair(' : '); $data->Indent(1); print $handle "# This file contains information about your system that is useful for\n"; print $handle "# diagnosing a problem you may have. For technical assistance, please\n"; print $handle "# contact the Illumina Customer Support team \n"; print $handle "# and send them this file.\n\n"; print $handle join "\n", $data->Dump; print $handle "\n"; } sub specificInfo($$$$) { my ($self,$handle,$mask,$sampleSheet) = @_; my $data = Data::Dumper->new([$mask, $sampleSheet->dump()],[qw(_Mask _Barcodes/Lanes)]); print $handle join "\n", $data->Dump; print $handle "\n"; } 1; __END__ =pod =head1 DIAGNOSTICS =head2 Exit status =over 4 =item 0: succesful completion =item 1: abnormal completion =item 2: fatal error =back =head2 Errors All error messages are prefixed with "ERROR: ". =head2 Warnings All warning messages generated by CASAVA are prefixed with "WARNING: ". =head1 CONFIGURATION AND ENVIRONMENT Name and location of configuration files, with a complete description of the properties that can be set. Name and description of the relevant environment variables =head1 DEPENDENCIES =over 4 =item Standard perl modules strict, warnings, Carp, =item External perl modules XML::Simple =item Casava perl modules Casava::Demultiplex =head1 BUGS AND LIMITATIONS There are no known bugs in this module. All documented features are fully implemented. Please report problems to Illumina Technical Support (support@illumina.com) Patches are welcome. =head1 AUTHOR Mauricio Varea =cut