view release on metacpan or search on metacpan
lib/Bio/Align/Subset.pm view on Meta::CPAN
such as abi (ABI) and scf. There are many more, for a complete listing
see the SeqIO HOWTO (L<http://bioperl.open-bio.org/wiki/HOWTO:SeqIO>).
If no format is specified and a filename is given then the module will
attempt to deduce the format from the filename suffix. If there is no
suffix that Bioperl understands then it will attempt to guess the
format based on file content. If this is unsuccessful then SeqIO will
throw a fatal error.
The format name is case-insensitive: 'FASTA', 'Fasta' and 'fasta' are
all valid.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/AlignIO/stockholm.pm view on Meta::CPAN
-file => '>file');
Function: Initialize a new L<Bio::AlignIO::stockholm> reader or writer
Returns : L<Bio::AlignIO> object
Args : -line_length : length of the line for the alignment block
-alphabet : symbol alphabet to set the sequences to. If not set,
the parser will try to guess based on the alignment
accession (if present), defaulting to 'dna'.
-spaces : (optional, def = 1) boolean to add a space in between
the "# STOCKHOLM 1.0" header and the annotation and
the annotation and the alignment.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/BLAST/Database.pm view on Meta::CPAN
my $self = $class->SUPER::new(\%args);
$self->full_file_basename or croak 'must provide a full_file_basename';
unless( $self->type ) {
$self->type( $self->_guess_type )
or croak 'type not provided, and could not guess it';
}
if( $self->write ) {
$self->create_dirs || -d dirname( $self->full_file_basename )
or croak 'either directory must exist, or create_dirs must be set true';
lib/Bio/BLAST/Database.pm view on Meta::CPAN
my $indexed = (any {/sd$/} @files) && (any {/si$/} @files);
### set our data
$self->type( $self->_guess_type )
or confess 'could not determine db type';
### type: $self->type
$self->format_time( _parse_datestr($datestr) ); #< will die on failure
$title =~ s/\s+$//;
$self->title( $title );
$self->_indexed_seqs( $indexed );
$self->sequences_count( $seq_cnt );
}
sub _guess_type {
my ($self) = @_;
my $saved_type = $self->type;
foreach my $guess (qw( protein nucleotide )) {
$self->type( $guess );
if( $self->files_are_complete ) {
$self->type( $saved_type );
return $guess;
}
}
$self->type( $saved_type );
return;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/BPWrapper/AlnManipulations.pm view on Meta::CPAN
# my $in_format = $opts{"input"} || $default_format;
# my $in_format;
# use IO::Scalar;
# my $s;
# my ($guesser);
# if ($file eq "STDIN") {
# my $line_ct = 0;
# my $lines;
# while(<>) { $lines .= $_; $line_ct++; last if $line_ct >= 100 } # read the first 100 lines
# $guesser = Bio::Tools::GuessSeqFormat->new( -text => $lines );
# } else {
# open $ifh, "<", $file or die $!;
# $guesser = Bio::Tools::GuessSeqFormat->new( -file => $file );
# }
# $in_format = $guesser->guess();
# die "unknown file format. Try specify with -i flag.\n" unless $in_format;
# seek (STDIN, 0, 0);
# warn "$in_format\n";
my $in_format = $opts{'input'} || 'clustalw';
if ($opts{"concat"}) {
# foreach my $file (glob @ARGV) {
while ($file = shift @ARGV) {
# warn "reading $file\n";
# $guesser = Bio::Tools::GuessSeqFormat->new( -file => $file);
# $in_format = $guesser->guess;
$in = Bio::AlignIO->new(-file => $file, -format => $in_format);
while ($aln=$in->next_aln()) { push @alns, $aln }
}
} else {
$file = shift @ARGV || "STDIN"; # If no more arguments were given on the command line
if ($in_format && $in_format =~ /blast/) { # guess blastoutput as "phylip", so -i 'blast' is needed
# if ($opts{"input"} && $opts{"input"} =~ /blast/) { # "blastxml" (-outfmt 5 ) preferred
my $searchio = Bio::SearchIO->new( -format => 'blast', ($file eq "STDIN")? (-fh => \*STDIN) : (-file => $file)); # works for regular blast output
# my $searchio = Bio::SearchIO->new( -format => 'blast', -fh => $ifh);
while ( my $result = $searchio->next_result() ) {
while( my $hit = $result->next_hit ) {
my $hsp = $hit->next_hsp; # get first hit; others ignored
$aln = $hsp->get_aln();
}
}
} else { # would throw error if format guessed wrong
# $in = Bio::AlignIO->new(-format => $in_format, ($file eq "STDIN")? (-fh => \*STDIN) : (-file => $file));
# $in = Bio::AlignIO->new(-format => $in_format, -fh => $ifh);
$in = Bio::AlignIO->new(-format=>$in_format, ($file eq "STDIN")? (-fh => \*STDIN) : (-file => $file) );
$aln = $in->next_aln()
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Biblio.pm view on Meta::CPAN
} else {
my %param = @args;
@param { map { lc $_ } keys %param } = values %param; # lowercase keys
my $access =
$param {'-access'} ||
$class->_guess_access ( $param {'-location'} ) ||
'soap';
$access = "\L$access"; # normalize capitalization to lower case
# load module with the real implementation - as defined in $access
return unless (&_load_access_module ($access));
lib/Bio/Biblio.pm view on Meta::CPAN
# this is kept here for the future when more access protocols
# (e.g. CORBA) may be available for accessing bibliographic query
# services
sub _guess_access {
# my ($class, $location) = @_;
return 'soap';
}
1;
lib/Bio/Biblio.pm view on Meta::CPAN
require Bio::DB::Biblio::$access
It prints an error on STDERR if it fails to find and load the module
(for example, because of the compilation errors in the module).
=head2 _guess_access
Usage : $class->_guess_access ($location)
Returns : string with a guessed access protocol (e.g. 'soap')
Args : 'location' defines where to find a bibliographic service
in a protocol-dependent manner (e.g. for SOAP it is
a URL of a bibliographic WebService)
It makes an expert guess what kind of access/transport protocol should
be used based on the I<location> of the service (e.g. if the
I<location> looks like an IOR then the access protocol is probably
CORBA).
=head1 OVERVIEW OF CLASSES AND PACKAGES
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Cluster/ClusterFactory.pm view on Meta::CPAN
=head1 SYNOPSIS
use Bio::Cluster::ClusterFactory;
# if you don't provide a default type, the factory will try
# some guesswork based on display_id and namespace
my $factory = Bio::Cluster::ClusterFactory->new(-type => 'Bio::Cluster::UniGene');
my $clu = $factory->create_object(-description => 'NAT',
-display_id => 'Hs.2');
lib/Bio/Cluster/ClusterFactory.pm view on Meta::CPAN
Title : new
Usage : my $obj = Bio::Cluster::ClusterFactory->new();
Function: Builds a new Bio::Cluster::ClusterFactory object
Returns : Bio::Cluster::ClusterFactory
Args : -type => string, name of a ClusterI derived class.
If not provided, the factory will have to guess
from ID and namespace, which may or may not be
successful.
=cut
lib/Bio/Cluster/ClusterFactory.pm view on Meta::CPAN
sub create_object {
my ($self,@args) = @_;
my $type = $self->type();
if(! $type) {
# we need to guess this
$type = $self->_guess_type(@args);
$self->throw("No cluster type set and unable to guess.") unless $type;
$self->type($type);
}
return $type->new(-verbose => $self->verbose, @args);
}
=head2 _guess_type
Title : _guess_type
Usage :
Function: Guesses the right type of L<Bio::ClusterI> implementation
based on initialization parameters for the prospective
object.
Example :
lib/Bio/Cluster/ClusterFactory.pm view on Meta::CPAN
cluster object
=cut
sub _guess_type{
my ($self,@args) = @_;
my $type;
# we can only guess from a certain number of arguments
my ($dispid, $ns, $members) =
$self->_rearrange([qw(DISPLAY_ID
NAMESPACE
MEMBERS
)], @args);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Community/IO.pm view on Meta::CPAN
# These all come from the same base, Moose::Object, so this is fine
my $params = $real_class->BUILDARGS(@args);
my $format = delete $params->{'-format'};
if (not defined $format) {
# Try to guess format
my $guesser = Bio::Community::IO::FormatGuesser->new();
if ($params->{'-file'}) {
$guesser->file( $params->{'-file'} );
} elsif ($params->{'-fh'}) {
$guesser->fh( $params->{'-fh'} );
}
$format = $guesser->guess;
}
if (not defined $format) {
$real_class->throw("Could not automatically detect input format.");
}
view all matches for this distribution
view release on metacpan or search on metacpan
#ifndef IVSIZE
# ifdef LONGSIZE
# define IVSIZE LONGSIZE
# else
# define IVSIZE 4 /* A bold guess, but the best we can make. */
# endif
#endif
#ifndef UVTYPE
# define UVTYPE unsigned IVTYPE
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/DB/Das/Chado.pm view on Meta::CPAN
if(ref($arg) eq 'HASH'){
return $self->{'name2term'} = $arg;
} elsif($arg) {
return $self->{'name2term'}{$arg};
#rather than trying to guess what a caller wants, the caller will have
#deal with what comes... (ie, a scalar or a hash).
# my $val= $self->{'name2term'}{$arg};
# if(ref($val)) {
# #? use $cvnames scalar here to pick which cv?
# my @val= @$val;
# foreach $val (@val) {
# my $cv= $self->{'termcvs'}{$val};
# return $val if($cv =~ /^(SO|sequence)/i); # want sofa_id
# }
# return $val[0]; #? 1st is best guess
# }
# return $val;
} else {
return $self->{'name2term'};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/DB/GFF/Adaptor/biofetch.pm view on Meta::CPAN
);
# now load each feature in turn
my ($transcript_version,$mRNA_version) = (0,0);
for my $feat ($seq->all_SeqFeatures) {
my $attributes = $self->get_attributes($feat);
my $name = $self->guess_name($attributes);
my $location = $feat->location;
my @segments = map {[$_->start,$_->end,$_->seq_id]}
$location->can('sub_Location') ? $location->sub_Location : $location;
lib/Bio/DB/GFF/Adaptor/biofetch.pm view on Meta::CPAN
}
}
\@result;
}
sub guess_name {
my $self = shift;
my $attributes = shift;
# remove this fix when Lincoln fixes it properly
return ["Misc" => "Misc"] unless ($attributes); # these are arbitrary, and possibly destructive defaults
my @ordered_attributes = sort {($self->_preferred_tags->{$a->[0]} || 0) <=> ($self->_preferred_tags->{$b->[0]} || 0)} @$attributes;
view all matches for this distribution
view release on metacpan or search on metacpan
#ifndef IVSIZE
# ifdef LONGSIZE
# define IVSIZE LONGSIZE
# else
# define IVSIZE 4 /* A bold guess, but the best we can make. */
# endif
#endif
#ifndef UVTYPE
# define UVTYPE unsigned IVTYPE
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Das/ProServer/SourceHydra/dbi.pm view on Meta::CPAN
=head1 SUBROUTINES/METHODS
=head2 sources : DBI sources
Effectively returns the results of a SHOW TABLES LIKE '$basename%'
query. In Oracle I guess this would need changing to table_name from
all_tables where like '$basename%' or something.
my @sources = $dbihydra->sources();
$basename comes from $self->config->{'basename'};
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
else {
print
"*** Dependencies will be installed the next time you type '$make'.\n";
}
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
inc/Module/AutoInstall.pm view on Meta::CPAN
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::getcwd() );
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
if ( @Missing and not( $CheckOnly or $UnderCPAN ) ) {
require Config;
print
"*** Dependencies will be installed the next time you type '$Config::Config{make}'.\n";
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
inc/Module/AutoInstall.pm view on Meta::CPAN
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::cwd() );
view all matches for this distribution
view release on metacpan or search on metacpan
bin/bp_genbank_ref_extractor view on Meta::CPAN
sub file_extension_for {
## TODO in some cases, extension changes whether it's protein or DNA or whatever
## and this should be supported
## XXX there must be a more elegant to handle the formats on this scripts
## to update this list, look in the _guess_format method, inside SeqIO.pm of bioperl
for ($_[0]) {
if (/embl/i) {return '.embl';}
elsif (/entrezgene/i) {return '.asn';}
elsif (/fasta/i) {return '.fasta';} # fasta|fast|fas|seq|fa|fsa|nt|aa|fna|faa
elsif (/fastq/i) {return '.fastq';}
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
if (-f $themakefile) {
my $grepres = `$^X -ne 'print if /^(X_\\w+LIBS|LIBS|XLIB)\\b/' $themakefile`; warn $grepres . "\n";
} else {
warn "$themakefile (file not found)\n".
"Can not find EMBOSS source to guess XLIB and LIBS\n".
"Use parameter EMB_SRC_ROOT to set EMBOSS source location\n\n";
}
}
$EMB_LIBS = join (" ", map { "-L$EMB_ROOT/$_" } @lib_search_dirs) . " " .
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/EnsEMBL/DBSQL/ArchiveStableIdAdaptor.pm view on Meta::CPAN
} elsif ($stable_id =~ /.*P\d+(\.\d+)?$/) {
$id_type = "Translation";
} elsif ($stable_id =~ /.*E\d+(\.\d+)?$/) {
$id_type = "Exon";
# if guessing fails, look in db
} else {
my $sql = qq(
SELECT type from stable_id_event
WHERE old_stable_id = ?
OR new_stable_id = ?
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/FeatureIO.pm view on Meta::CPAN
my %param = @args;
@param{ map { lc $_ } keys %param } = values %param; # lowercase keys
my $format = $param{'-format'} ||
$class->_guess_format( $param{-file} || $ARGV[0] );
if( ! $format ) {
if ($param{-file}) {
$format = $class->_guess_format($param{-file});
} elsif ($param{-fh}) {
$format = $class->_guess_format(undef);
}
}
$format = "\L$format"; # normalize capitalization to lower case
return unless( $class->_load_format_module($format) );
return "Bio::FeatureIO::$format"->new(@args);
lib/Bio/FeatureIO.pm view on Meta::CPAN
sub _filehandle {
my ($self,@args) = @_;
return $self->_fh(@args);
}
=head2 _guess_format
Title : _guess_format
Usage : $obj->_guess_format($filename)
Function: guess format based on file suffix
Example :
Returns : guessed format of filename (lower case)
Args :
Notes : See "SUPPORTED FORMATS"
=cut
sub _guess_format {
my $class = shift;
return unless $_ = shift;
return 'gff' if /\.gff3?$/i;
return 'gff' if /\.gtf$/i;
return 'bed' if /\.bed$/i;
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/knownGene_out_of_order.dumped_result view on Meta::CPAN
'attributes' => {
'ID' => [
'AB000114'
],
'Note' => [
'guess what this thing has another location'
]
},
'start' => '11234'
}
],
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
if ( @Missing and not( $CheckOnly or $UnderCPAN ) ) {
require Config;
print
"*** Dependencies will be installed the next time you type '$Config::Config{make}'.\n";
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
inc/Module/AutoInstall.pm view on Meta::CPAN
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::cwd() );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Gonzales/Seq.pm view on Meta::CPAN
return Bio::PrimarySeq->new(
-seq => $self->seq,
-id => $self->id,
-desc => $self->desc,
-alphabet => $self->guess_alphabet,
-direct => 1,
);
}
sub guess_alphabet {
my ($self) = @_;
my $str = $self->seq();
$str =~ s/[-.?*]//gi;
lib/Bio/Gonzales/Seq.pm view on Meta::CPAN
$alphabet = 'protein';
} else {
# Alphabet is unsure, could still be DNA, RNA or protein.
# DNA and RNA contain mostly A, T, U, G, C and N, but the other letters
# they use are also among the 15 valid letters that a protein sequence
# can contain at this stage. Make our best guess based on sequence
# composition. If it contains over 70% of ACGTUN, it is likely nucleic.
if ( ( $str =~ tr/ATUGCNatugcn// ) / $total > 0.7 ) {
if ( $str =~ m/U/i ) {
$alphabet = 'rna';
} else {
lib/Bio/Gonzales/Seq.pm view on Meta::CPAN
}
sub revcom {
my ($self) = @_;
$self->seq( _revcom_from_string( $self->seq, $self->guess_alphabet ) );
return $self;
}
sub subseq {
lib/Bio/Gonzales/Seq.pm view on Meta::CPAN
} else {
confess "cannot create reverse complement, sequence contains non-AGCTN characters"
if ( $seq =~ /[^AGCTN]/i );
}
$seq = _revcom_from_string($seq, $self->_guess_alphabet);
}
return wantarray ? ( $seq, [ $b, $e, $strand, @rest ] ) : $seq;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Graphics/Feature.pm view on Meta::CPAN
This is not called <type> because this would cause
upgrade problems from the 0.5 and earlier Seq objects.
Returns : a string either 'dna','rna','protein'. NB - the object must
make a call of the type - if there is no type specified it
has to guess.
Args : none
Status : Virtual
=head2 desc
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Grep/Backend/BackendI.pm view on Meta::CPAN
close $NFOFILE;
}
return;
}
sub _guess_alphabet_of_file {
my ( $self, $filename ) = @_;
my $in = Bio::SeqIO->new( -file => $filename );
return $in->next_seq->alphabet;
}
view all matches for this distribution
view release on metacpan or search on metacpan
config_examples/blast_all-vs-all.conf view on Meta::CPAN
blast_evalue 100
# Filter query sequence (DUST with blastn, SEG with others)
blast_lowcomp F
# Perform gapped alignment (not available with tblastx)
blast_gaps T
# -a Number of processors to use and not nodes (i guess)
# -m 9 Tabular output format
blast_other -m 9 -a 1
blast_db_dir ~/blast/db
tmp_dir ~/blast/tmp
view all matches for this distribution
view release on metacpan or search on metacpan
}
else {
say "LD_LIBRARY_PATH is not set";
}
#could be in any of these places i guess
push @search_path, qw( /usr/local /usr /usr/share );
for my $folder ( @search_path ) {
my ( $include_dir, $lib_dir );
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
else {
print
"*** Dependencies will be installed the next time you type '$make'.\n";
}
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
inc/Module/AutoInstall.pm view on Meta::CPAN
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::cwd() );
view all matches for this distribution
view release on metacpan or search on metacpan
t/Output/MultipleFastas.t view on Meta::CPAN
spreadsheet_basename => 'mlst_results',
parallel_processes => 3,
report_lowest_st => 1
)),'Pass in 3 assemblies, 2 perfect and where 1 has partial matches.');
ok(($multiple_fastas->create_result_files),'Create all the results files for three assemblies.');
compare_files( $tmpdirectory.'/mlst_results.genomic.csv', 't/data/expected_three_mlst_results.genomic.csv', 'Create a spreadsheet with the 3 sets of assemblies combined and the sequences, and give one best guess ST.' );
compare_files( $tmpdirectory.'/mlst_results.allele.csv', 't/data/expected_three_mlst_results.allele.csv', 'Create a spreadsheet with the 3 sets of assemblies combined and the allele numbers, and give one best guess ST.' );
compare_files( $tmpdirectory.'/concatenated_alleles.fa', 't/data/expected_three_concatenated_alleles.fa', 'Create a multi-FASTA file containing the concatenated sequences.');
###
compare_phylip_files( $tmpdirectory.'/concatenated_alleles.phylip', 't/data/expected_three_concatenated_alleles.phylip', 'Output the alignment of the concatenated gene sequences in phylip format, which is used as input to some tree building applicati...
compare_files( $tmpdirectory.'/contigs_one_unknown.unknown_allele.adk-2~.fa', 't/data/expected_three_contigs_one_unknown.unknown_allele.adk-2~.fa', 'Create FASTA files for alleles which are not in the database, so that they can be added later.' );
compare_files( $tmpdirectory.'/contigs_one_unknown.unknown_allele.recA-1~.fa', 't/data/expected_three_contigs_one_unknown.unknown_allele.recA-1~.fa', 'Create FASTA files for alleles which are not in the database, so that they can be added later.' );
view all matches for this distribution
view release on metacpan or search on metacpan
bin/prune-outliers.pl view on Meta::CPAN
;
### threshold: $t . ' - ' . scalar @ids . ' seqs kept out of ' . scalar keys %count_for
my $ali = Ali->load($infile);
$ali->dont_guess if $ARGV_noguessing;
my $list = IdList->new( ids => \@ids );
my $new_ali = $list->filtered_ali($ali);
# create output dirs named after input dir and identity threshold
bin/prune-outliers.pl view on Meta::CPAN
sequence to be retained in the output file [default: n.default].
=for Euclid: n.type: num
n.default: 10
=item --[no]guessing
[Don't] guess whether sequences are aligned or not [default: yes].
=item --version
=item --usage
view all matches for this distribution
view release on metacpan or search on metacpan
bin/two-scalp.pl view on Meta::CPAN
### Check if seqs are aligned from part: $fam
# TODO: fix this as it is very dangerous to have my depending on if
# https://metacpan.org/pod/Perl::Critic::Policy::Variables::ProhibitConditionalDeclarations
## no critic (ProhibitConditionalDeclarations)
my $ali = Ali->new( seqs => $seqs_for{$fam}, guessing => 1 )
if $seqs_for{$fam};
## use critic
unless ($ali) {
carp "Warning: no sequence found for family: $fam";
bin/two-scalp.pl view on Meta::CPAN
# TODO: check how to simplify complex alternatives here
if ($aligned_seqs) {
my $aligned = Ali->new(
seqs => $aligned_seqs,
guessing => 1,
);
if ($unaligned_seqs) {
my $unaligned = Ali->new(
seqs => $unaligned_seqs,
guessing => 1,
);
### Align non aligned seqs on aligned seqs from the same family
$p2 = align_on_profile($aligned, $unaligned);
}
$p2 = $aligned unless $p2;
bin/two-scalp.pl view on Meta::CPAN
elsif ($unaligned_seqs && $master_profile) {
### There are only unaligned seqs in this family
my $unaligned = Ali->new(
seqs => $unaligned_seqs,
guessing => 1,
);
$p2 = $unaligned;
}
if ($master_profile) {
bin/two-scalp.pl view on Meta::CPAN
sub align_from_scratch {
my $seqs = shift;
my $toalign = Ali->new(
seqs => $seqs,
guessing => 1,
);
$toalign->degap_seqs;
unless ($toalign->has_uniq_ids) {
### non uniq seq id
bin/two-scalp.pl view on Meta::CPAN
my @uniq_ids = uniq @ids;
my @seq_uniq_ids = map { $ali->get_seq_with_id($_) } @uniq_ids;
my $ali2 = Ali->new(
seqs => \@seq_uniq_ids,
guessing => 1,
);
return $ali2;
}
view all matches for this distribution
view release on metacpan or search on metacpan
bin/ali2fasta.pl view on Meta::CPAN
for my $infile (@ARGV_infiles) {
### Processing: $infile
my $ali = Ali->load($infile);
$ali->dont_guess if $ARGV_noguessing;
$ali->degap_seqs if $ARGV_degap;
my $outfile = change_suffix($infile, '.fasta');
my $chunk = $ARGV_nowrap ? -1 : undef;
$ali->store_fasta($outfile, $chunk);
bin/ali2fasta.pl view on Meta::CPAN
=item --[no]wrap
[Don't] wrap sequences [default: yes].
=item --[no]guessing
[Don't] guess whether sequences are aligned or not [default: yes].
=item --version
=item --usage
view all matches for this distribution