view release on metacpan or search on metacpan
lib/Bio/Tradis/CommandLine/AddTags.pm view on Meta::CPAN
package Bio::Tradis::CommandLine::AddTags;
$Bio::Tradis::CommandLine::AddTags::VERSION = '1.4.5';
# ABSTRACT: Add given tags to the start of the sequence
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Cwd 'abs_path';
use Bio::Tradis::AddTagsToSeq;
has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
has 'bamfile' => ( is => 'rw', isa => 'Str', required => 0 );
has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
has 'outfile' => ( is => 'rw', isa => 'Str', required => 0 );
has 'verbose' => ( is => 'rw', isa => 'Bool', default => 0 );
has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
sub BUILD {
my ($self) = @_;
lib/Bio/Tradis/CommandLine/CheckTags.pm view on Meta::CPAN
package Bio::Tradis::CommandLine::CheckTags;
$Bio::Tradis::CommandLine::CheckTags::VERSION = '1.4.5';
# ABSTRACT: Check for presence of tr tag in BAM file
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Cwd 'abs_path';
use Bio::Tradis::DetectTags;
has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
has 'bamfile' => ( is => 'rw', isa => 'Str', required => 0 );
has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
sub BUILD {
my ($self) = @_;
my (
$bamfile, $help, $samtools_exec
lib/Bio/Tradis/CommandLine/FilterFastqTags.pm view on Meta::CPAN
package Bio::Tradis::CommandLine::FilterFastqTags;
$Bio::Tradis::CommandLine::FilterFastqTags::VERSION = '1.4.5';
# ABSTRACT: Remove given tags from the start of the sequence
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Cwd 'abs_path';
use Bio::Tradis::FilterTags;
has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 0 );
has 'tag' => ( is => 'rw', isa => 'Str', required => 0 );
has 'mismatch' => ( is => 'rw', isa => 'Int', required => 0, default => 0 );
has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
has 'outfile' => ( is => 'rw', isa => 'Str', required => 0 );
sub BUILD {
my ($self) = @_;
lib/Bio/Tradis/CommandLine/PlotCombine.pm view on Meta::CPAN
package Bio::Tradis::CommandLine::PlotCombine;
$Bio::Tradis::CommandLine::PlotCombine::VERSION = '1.4.5';
# ABSTRACT: Combine multiple plotfiles and generate updated statistics for the combined files
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Cwd 'abs_path';
use Bio::Tradis::CombinePlots;
has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
has 'plotfile' => ( is => 'rw', isa => 'Str', required => 0 );
has 'output_dir' => ( is => 'rw', isa => 'Str', default => 'combined' );
has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
sub BUILD {
my ($self) = @_;
my ( $plotfile, $output_dir, $help );
lib/Bio/Tradis/CommandLine/PlotTradis.pm view on Meta::CPAN
package Bio::Tradis::CommandLine::PlotTradis;
$Bio::Tradis::CommandLine::PlotTradis::VERSION = '1.4.5';
# ABSTRACT: Generate plots as part of a tradis analysis
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Cwd 'abs_path';
use Bio::Tradis::TradisPlot;
has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
has 'mappedfile' => ( is => 'rw', isa => 'Str', required => 0 );
has 'mapping_score' => ( is => 'rw', isa => 'Int', required => 0, default => 30);
has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
has 'outfile' => ( is => 'rw', isa => 'Str', required => 0, default => 'tradis.plot' );
sub BUILD {
my ($self) = @_;
my ( $mappedfile, $outfile, $mapping_score, $help );
lib/Bio/Tradis/CommandLine/RemoveFastqTags.pm view on Meta::CPAN
package Bio::Tradis::CommandLine::RemoveFastqTags;
$Bio::Tradis::CommandLine::RemoveFastqTags::VERSION = '1.4.5';
# ABSTRACT: Remove given tags from the start of the sequence
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Cwd 'abs_path';
use Bio::Tradis::RemoveTags;
has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 0 );
has 'tag' => ( is => 'rw', isa => 'Str', required => 0 );
has 'mismatch' => ( is => 'rw', isa => 'Int', required => 0, default => 0 );
has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
has 'outfile' => ( is => 'rw', isa => 'Str', required => 0 );
sub BUILD {
my ($self) = @_;
lib/Bio/Tradis/CommandLine/RunMapping.pm view on Meta::CPAN
package Bio::Tradis::CommandLine::RunMapping;
$Bio::Tradis::CommandLine::RunMapping::VERSION = '1.4.5';
# ABSTRACT: Perform mapping
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Cwd 'abs_path';
use Bio::Tradis::Map;
has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 0 );
has 'reference' => ( is => 'rw', isa => 'Str', required => 0 );
has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
has 'refname' =>
( is => 'rw', isa => 'Str', required => 0, default => 'ref.index' );
has 'outfile' =>
( is => 'rw', isa => 'Str', required => 0, default => 'mapped.sam' );
has 'smalt' => ( is => 'rw', isa => 'Maybe[Int]', required => 0, default => 0 );
has 'smalt_k' => ( is => 'rw', isa => 'Maybe[Int]', required => 0 );
lib/Bio/Tradis/CommandLine/TradisAnalysis.pm view on Meta::CPAN
$Bio::Tradis::CommandLine::TradisAnalysis::VERSION = '1.4.5';
# ABSTRACT: Perform full tradis analysis
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Cwd qw(abs_path cwd);
use Bio::Tradis::RunTradis;
use Try::Tiny;
has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 0 );
has 'tag' => ( is => 'rw', isa => 'Maybe[Str]', required => 0 );
has 'mismatch' => ( is => 'rw', isa => 'Int', required => 0, default => 0 );
has 'tagdirection' =>
( is => 'rw', isa => 'Str', required => 0, default => '3' );
has 'reference' => ( is => 'rw', isa => 'Str', required => 0 );
has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
has 'mapping_score' =>
( is => 'rw', isa => 'Int', required => 0, default => 30 );
lib/Bio/Tradis/CommandLine/TradisBam.pm view on Meta::CPAN
$Bio::Tradis::CommandLine::TradisBam::VERSION = '1.4.5';
# ABSTRACT: Adds tags to sequences if tags are present
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Cwd 'abs_path';
use Bio::Tradis::DetectTags;
use Bio::Tradis::AddTagsToSeq;
has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
has 'bamfile' => ( is => 'rw', isa => 'Str', required => 1 );
has 'outfile' => (
is => 'rw',
isa => 'Str',
required => 0,
);
has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
has 'verbose' => ( is => 'rw', isa => 'Bool', default => 0 );
has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
lib/Bio/Tradis/Parser/Cigar.pm view on Meta::CPAN
package Bio::Tradis::Parser::Cigar;
$Bio::Tradis::Parser::Cigar::VERSION = '1.4.5';
# ABSTRACT: Take in a cigar string and output start and end relative to the reference sequence
use Moose;
has 'cigar' => ( is => 'ro', isa => 'Str', required => 1 );
has 'coordinate' => ( is => 'ro', isa => 'Num', required => 1 );
has '_results' => (is => 'ro', isa => 'HashRef', lazy => 1, builder => '_build__results');
sub _build__results
{
my($self) = @_;
my %results = ( start => 0, end => 0);
my $current_coordinate = $self->coordinate;
my @cigar_parts = $self->cigar =~ /(\d+[MIDNSHP=X])/g;
for my $cigar_item (@cigar_parts)
{