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
view release on metacpan or search on metacpan
bin/annotate-ali.pl view on Meta::CPAN
}
# optionally output annotated file
if ($ARGV_ann_file) {
my $ali = Bio::MUST::Core::Ali->load($infile);
$ali->dont_guess if $ARGV_noguessing;
my $outfile = secure_outfile($infile, $ARGV_out_suffix);
#### Writing annotated file: $outfile->stringify
prefix_ids($ali, \%ann_for)->store_fasta($outfile);
}
}
bin/annotate-ali.pl view on Meta::CPAN
infiles are preserved by being appended a .bak suffix.
=for Euclid: suffix.type: string
suffix.default: '-ann'
=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/abbr-ids-fas.pl view on Meta::CPAN
for my $infile (@ARGV_infiles) {
### Processing: $infile
my $ali = Ali->load($infile);
$ali->dont_guess;
# determine seq_id prefix
my $prefix = $ARGV_id_prefix // q{}; # defaults to no prefix
if ($prefix_mapper) { # infile paths are ignored
my ($filename) = fileparse($infile);
view all matches for this distribution
view release on metacpan or search on metacpan
bin/tree-clan-splitter.pl view on Meta::CPAN
#### @main_clans
# fit ali to ali2phylip filtering
my $alifile = $stripped_intree . '.ali';
my $base_ali = Ali->load($alifile);
$base_ali->dont_guess;
my $alist = $tree->alphabetical_list;
#### $list
my $ali = $alist->filtered_ali($base_ali);
my $n_ali;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/MaxQuant/Evidence/Statistics.pm view on Meta::CPAN
$p->{data}->{$replicate}->{$pgid}->{'Ratio H/L'}->[$i] -= $median;
}
}
}
}
# i guess we should do something better with generating this status:
return 1;
}
=head2 median
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Maxd.pm view on Meta::CPAN
=over 4
=item B<-file>, datafile to parse.
=item B<-format>, data file format; Bio::Maxd will guess it, if not provided.
Valid values are 'AFF' (Affimetrix matrics file)
=item B<-experiment>, Experiment ID or Experiment name.
=item B<-array_type>, ArrayType ID or ArrayType name
view all matches for this distribution
view release on metacpan or search on metacpan
bin/phylip2nex.pl view on Meta::CPAN
=item B<-f, --format>
The format of the input file. See L<Bio::NEXUS::Import> for a list of
supported file formats. If no format is specified, then L<Bio::NEXUS::Import>
will try to guess the correct format.
=item B<-o, --outfile>
The name of the output file. Defaults to out.nex.
view all matches for this distribution
view release on metacpan or search on metacpan
doc/buglist.txt view on Meta::CPAN
The BigPrint code apparently leaves margins (1/2" at this point in time) all
around, so that one can print them without having things cut off. However,
when converting to PDF, this doesn't happen. Instead, the margins only apply
to the first page and don't apply to everything else. I don't know why this
happens, but I'm guessing the fault isn't totally on our side. This should
be looked into more deeply.
=back
=for comment ------------------------------- B U G -----------------------------
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Nexml/Factory.pm view on Meta::CPAN
$aln->unmatch;
$aln->map_chars('\.','-');
my @seqs = $aln->each_seq;
my ( $type, $missing, $gap, $matchchar );
if ( $seqs[0] ) {
$type = $seqs[0]->alphabet || $seqs[0]->_guess_alphabet || 'dna';
}
else {
$type = 'dna';
}
lib/Bio/Nexml/Factory.pm view on Meta::CPAN
=cut
sub create_bphylo_seq {
my ($self, $seq, $taxa, @args) = @_;
my $type = $seq->alphabet || $seq->_guess_alphabet || 'dna';
$type = uc($type);
my $dat = create_bphylo_datum($seq, $taxa, '-type' => $type);
# copy seq string
lib/Bio/Nexml/Factory.pm view on Meta::CPAN
$feats = shift @args;
unless (ref($feats) eq 'ARRAY') {
Bio::Root::Root->throw("Third argument must be array of SeqFeatures");
}
}
my $type = $seq->alphabet || $seq->_guess_alphabet || 'dna';
my $self = $class->new( '-type' => $type, @args );
# copy seq string
my $seqstring = $seq->seq;
if ( $seqstring and $seqstring =~ /\S/ ) {
eval { $self->set_char( $seqstring ) };
view all matches for this distribution
view release on metacpan or search on metacpan
beagle_wrap.c view on Meta::CPAN
#ifndef IVSIZE
# ifdef LONGSIZE
# define IVSIZE LONGSIZE
# else
# define IVSIZE 4 /* A bold guess, but the best we can make. */
# endif
#endif
#ifndef INT2PTR
# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Phylo/Matrices/DatumRole.pm view on Meta::CPAN
sub new_from_bioperl {
my ( $class, $seq, @args ) = @_;
# want $seq type-check here? Allowable: is-a Bio::PrimarySeq,
# Bio::LocatableSeq /maj
my $type = $seq->alphabet || $seq->_guess_alphabet || 'dna';
my $self = $class->new( '-type' => $type, @args );
# copy seq string
my $seqstring = $seq->seq;
if ( $seqstring and $seqstring =~ /\S/ ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/PhyloTastic/DateLife.pm view on Meta::CPAN
=back
=cut
# url for the datelife.org RESTful service
my $BASE_URL = 'http://datelife.org/cgi-bin/R/result?taxa=%s,%s&format=bestguess&partial=liberal&useembargoed=yes';
# URI for datelife.org terms
my $DL_NS_URI = 'http://datelife.org/terms.owl#';
# instantiate user agent to fetch ages
view all matches for this distribution