<<

NAME

Sanger::CGP::TraFiC::Parser

SYNOPSIS

 use Sanger::CGP::TraFiC::Parser;
 my $parser = Sanger::CGP::TraFiC::Parser->new;
 $parser->set_output('output/folder);
 $parser->process_files($list_of_bams);

Constants

SINGLE_END

Only one end of the pair was mapped

INTER_CHROM

Both ends of pair where mapped to different chromosomes

ABERRANT

Both ends mapped to same chromosome but not as a proper pair (i.e. intRA chromosomal)

METHODS

set_output

Description

Set the root path that output should be sent to. Generates file-handles to the 6 files required for processing.

 $parser->set_output('/some/existing/path');

process_files

Description

Find and output candidate reads in the supplied files.

 $parser->process_files([filelist, ...]);
  or
 $parser->process_files([singlefile], readgroup_id);
Notes

When readgroup_id is supplied only reads within the group will be handled. Using this inappropriately will result in no output for files that don't have the specified group. There will be no warnings when this occurs.

pair_to_candidate

Description

Takes a pair of reads and determines if they are suitable for processing as aberrant.

 my ($class, $detail, $fasta) = $parser->pair_to_candidate($sam_r1, $sam_r2);
 next unless(defined $class);
Returns

\@ of the following values

 $class : Type of aberrant read FastA record (see L</Constants>)
 $fasta : FastA record ready for printing
Notes

When the pair of reads input into this function are not found to be candidates an empty array ref is returned.

<<