Mercurial > repos > cpt > cpt_psm_comparison_table
annotate lib/CPT/Bio/Lipo.pm @ 1:f093e08f21f3 draft default tip
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
| author | cpt | 
|---|---|
| date | Mon, 05 Jun 2023 02:47:24 +0000 | 
| parents | |
| children | 
| rev | line source | 
|---|---|
| 
1
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
1 package CPT::Bio::Lipo; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
2 use Moose; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
3 use strict; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
4 use warnings; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
5 use Data::Dumper; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
6 use autodie; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
7 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
8 # ABSTRACT: Lipo finding functionality in a library. | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
9 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
10 sub run_hash { | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
11 my ( $self, $hash_ref ) = @_; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
12 my %hash = %{$hash_ref}; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
13 my @return_keys; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
14 foreach ( sort { $a <=> $b } keys %hash ) { | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
15 if ( $hash{$_}[4] !~ qr/^.{10,39}C/ ) { | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
16 next; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
17 } | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
18 else { | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
19 $hash{$_}[5] = $self->run_seq( $hash{$_}[4] ); | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
20 } | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
21 } | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
22 return \%hash; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
23 } | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
24 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
25 sub run_seq { | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
26 my ( $self, $seq ) = @_; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
27 my @C; #A list of each C in the string, in str(10,40) | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
28 for ( my $j = 10 ; $j < length($seq) && $j < 40 ; $j++ ) { | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
29 if ( substr( $seq, $j, 1 ) =~ /[c]/i ) { | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
30 push( @C, $j ); | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
31 } | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
32 } | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
33 my @results; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
34 for ( my $z = 0 ; $z < scalar(@C) ; $z++ ) { | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
35 my $upC10 = ""; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
36 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
37 #Make sure it's not ALL DEKRs 10 residues upstream. (Does that happen O.o) | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
38 if ( substr( $seq, $C[$z] - 10, 10 ) !~ /[DEKR]/ ) { | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
39 push( | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
40 @results, | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
41 [ | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
42 substr( $seq, 0, $C[$z] - 10 ), | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
43 substr( $seq, $C[$z] - 10, 10 ), | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
44 substr( $seq, $C[$z], 1 ), | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
45 substr( $seq, $C[$z] + 1 ), | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
46 ] | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
47 ); | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
48 } | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
49 } | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
50 if ( scalar @results ) { | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
51 return \@results; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
52 } | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
53 return undef; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
54 } | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
55 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
56 no Moose; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
57 1; | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
58 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
59 __END__ | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
60 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
61 =pod | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
62 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
63 =encoding UTF-8 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
64 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
65 =head1 NAME | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
66 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
67 CPT::Bio::Lipo - Lipo finding functionality in a library. | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
68 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
69 =head1 VERSION | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
70 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
71 version 1.99.4 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
72 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
73 =head1 AUTHOR | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
74 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
75 Eric Rasche <rasche.eric@yandex.ru> | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
76 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
77 =head1 COPYRIGHT AND LICENSE | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
78 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
79 This software is Copyright (c) 2014 by Eric Rasche. | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
80 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
81 This is free software, licensed under: | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
82 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
83 The GNU General Public License, Version 3, June 2007 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
84 | 
| 
 
f093e08f21f3
planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
 
cpt 
parents:  
diff
changeset
 | 
85 =cut | 
