994 days ago
Perl script to find edit distance between two sequences !
#!/usr/bin/perl use strict; use warnings; sub edit_distance { my ($s1, $s2) = @_; my $len1 = length($s1); my $len2 = length($s2); my @dp; for (my $i = 0; $i469 days ago
Raku script to find palindrome in genomes !
...n $str eq $str.flip; } sub find-palindromes(Str $dna, Int $min-length, Int $max-length) { for $min-length..$max...NA sequence find-palindromes($dna, 3, 8); # find palindromes with length between 3 and 8469 days ago
Perl script for chi-squared test !
...sequence, take 2 bp and increment the hash counter foreach my $i (0..length($seq)){ my $tmp = subst...sequence, take 2 bp and increment the hash counter foreach my $i (0..length($seq)){ my $tmp = subst...455 days ago
Raku script to find SSRs in fastq file !
...t - $min-repeats + 1); my $repeat-length = $max-repeat - $min-repeats...end => $max-repeat, length => $repeat-length,...say " Start: $ssr, End: $ssr, Length: $ssr, Sequence: $ssr";...156 days ago
Perl script to calculate GC content !
...) = @_; $sequence = uc($sequence); # Convert the sequence to uppercase my $gc_count = () = $sequence =~ /[GC]/g; my $total_bases = length($sequence); my $gc_conte...140 days ago
Raku script to find repeats in sequences !
sub find-repeats($sequence, $min-repeat-length = 3) { my @repeats; for ^($sequence.chars - $min-repeat-length + 1) -> $i { my $substring = $sequence.substr($i, $min-repeat-length); if $sequence.con...138 days ago
Raku script to find microsatellites in DNA fragments !
...ind-microsatellites($sequence, $min-repeat-length = 2, $max-repeat-length = 6, $min-repeat-count = 3) {...my @microsatellites; for my $repeat-length ($min-repeat-length..$max-rep...$substring = $sequence.substr($i, $repeat-length); if $sequence...138 days ago
Perl script to parse blast results and plot basic stats !
...ty: ", $entry->{PERCENT_IDENTITY}, "\n"; print "Alignment Length: ", $entry->{ALIGNMENT_LENGTH}, "\n"; print "E-value:...Identity: $avg_percent_identity\n"; print "Average Alignment Length: $avg_alignment_length\n";...138 days ago
Perl script to calculate the basic stats of the assembled genome !
...es for computing statistics my $total_length = 0; my $num_contigs = 0; my @contig_lengths; # Iterate through each s...additional statistics my $min_contig_length = $contig_lengths[-1]; my $m..."Median Contig Length: $median_contig_length\n"; print "N50: $n50\n"; pr...138 days ago