Bio-Roary
view release on metacpan or search on metacpan
lib/Bio/Roary/CommandLine/QueryRoary.pm view on Meta::CPAN
$prepare_input_files->lookup_fasta_files_from_unknown_input_files($self->input_set_two)
],
);
$difference_between_sets->groups_set_one_unique();
$difference_between_sets->groups_set_two_unique();
$difference_between_sets->groups_in_common();
for my $differences_group_filename(($difference_between_sets->groups_set_one_unique_filename,$difference_between_sets->groups_set_two_unique_filename,$difference_between_sets->groups_in_common_filename))
{
$self->create_spreadsheets($differences_group_filename, $prepare_input_files->fasta_files, $self->input_files);
}
}
else {
print "Nothing done\n";
}
}
sub create_spreadsheets
{
my ($self, $groups_file, $fasta_files, $gff_files) = @_;
my $analyse_groups_obj = Bio::Roary::AnalyseGroups->new(
fasta_files => $fasta_files,
groups_filename => $groups_file,
);
my $annotate_groups = Bio::Roary::AnnotateGroups->new(
gff_files => $gff_files,
output_filename => $groups_file.'_reannotated',
groups_filename => $groups_file,
);
$annotate_groups->reannotate;
my $order_genes_obj = Bio::Roary::OrderGenes->new(
analyse_groups_obj => $analyse_groups_obj,
gff_files => $gff_files,
core_definition => $self->core_definition,
pan_graph_filename => 'set_difference_core_accessory_graph.dot',
accessory_graph_filename => 'set_difference_accessory_graph.dot',
);
my $group_statistics = Bio::Roary::GroupStatistics->new(
output_filename => $groups_file.'_statistics.csv',
annotate_groups_obj => $annotate_groups,
analyse_groups_obj => $analyse_groups_obj,
groups_to_contigs => $order_genes_obj->groups_to_contigs
);
$group_statistics->create_spreadsheet;
}
sub usage_text {
my ($self) = @_;
return <<USAGE;
Usage: query_pan_genome [options] *.gff
Perform set operations on the pan genome to see the gene differences between groups of isolates.
Options: -g STR groups filename [clustered_proteins]
-a STR action (union/intersection/complement/gene_multifasta/difference) [union]
-c FLOAT percentage of isolates a gene must be in to be core [99]
-o STR output filename [pan_genome_results]
-n STR comma separated list of gene names for use with gene_multifasta action
-i STR comma separated list of filenames, comparison set one
-t STR comma separated list of filenames, comparison set two
-v verbose output to STDOUT
-h this help message
Examples:
Union of genes found in isolates
query_pan_genome -a union *.gff
Intersection of genes found in isolates (core genes)
query_pan_genome -a intersection *.gff
Complement of genes found in isolates (accessory genes)
query_pan_genome -a complement *.gff
Extract the sequence of each gene listed and create multi-FASTA files
query_pan_genome -a gene_multifasta -n gryA,mecA,abc *.gff
Gene differences between sets of isolates
query_pan_genome -a difference --input_set_one 1.gff,2.gff --input_set_two 3.gff,4.gff,5.gff
For further info see: http://sanger-pathogens.github.io/Roary/
USAGE
}
__PACKAGE__->meta->make_immutable;
no Moose;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Bio::Roary::CommandLine::QueryRoary - Take in a groups file and the protein fasta files and output selected data
=head1 VERSION
version 3.13.0
=head1 SYNOPSIS
Take in a groups file and the protein fasta files and output selected data
=head1 AUTHOR
Andrew J. Page <ap13@sanger.ac.uk>
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2013 by Wellcome Trust Sanger Institute.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
( run in 0.887 second using v1.01-cache-2.11-cpan-9789f410c06 )