Bio-BPWrapper

 view release on metacpan or  search on metacpan

bin/bioseq  view on Meta::CPAN

=item --rename, -N 'file'; or --rename "id:old_name;new_name" (for replacing a single id)

Append sequence names specified by a file (two tab-separated columns: old_name, new_name), or a single id

=item --remove-stop, -X

Remove stop codons (e.g., for PAML input)

=item --restrict, -x 'RE'

Predicted fragments from digestion by a specified restriction enzyme. Disabled (not part of bioperl dist)

=item --restrict-coord 'RE'

Predicted fragments from digestion by a specified restriction enzyme.  Outputs cooridnates of overhangs in BED format. Disabled (not part of bioperl dist)

=item --revcom | -r

Reverse complement.

=item --sort 'id|length|file:<filename>'

Sort by id, length, or a file with an intended order of seq ids (Contributor: Jeffery Rosario; Fall 2017)

=item --split-cdhit 'cdhit .clstr file'

lib/Bio/BPWrapper/SeqManipulations.pm  view on Meta::CPAN

        foreach my $pos ($ra->positions($enz)) {
	    print $seq->id()."\t".($pos-$len)."\t".$pos."\n";
        }
    }
}

=head2 restrict_digest()

Note: This function is currently DEPRECATED.

Predicted fragments from digestion by a specified restriction enzyme
specified in C<$opts{restrinct}> set via L<C<#initilize(\%opts)>|/initialize>.

An input file with sequences is expected. Wraps
L<Bio::Restriction::Analysis-E<gt>cut()|https://metacpan.org/pod/Bio::Restriction::Analysis#cut>.


sub restrict_digest {
    my $enz = $opts{"restrict"};
    use Bio::Restriction::Analysis;
    while ( $seq = $in->next_seq() ) {
	my $seq_str = $seq->seq();
	die "Not a DNA sequence\n" unless $seq_str =~ /^[ATCGRYSWKMBDHVN]+$/i;
	my $ra = Bio::Restriction::Analysis->new(-seq=>$seq);
	foreach my $frag ($ra->fragment_maps($enz)) {
	    my $seq_obj = Bio::Seq->new(
		-id=>$seq->id().'|'.$frag->{start}.'-'.$frag->{end}.'|'.($frag->{end}-$frag->{start}+1),
		-seq=>$frag->{seq});
	    $out->write_seq($seq_obj)
	}
    }
}

=cut

=head2 anonymize()

Replace sequence IDs with serial IDs I<n> characters long, as specified in



( run in 0.853 second using v1.01-cache-2.11-cpan-364913b4093 )