Raku script to find palindrome in genomes !
sub is-palindrome(Str $str) returns Bool { $str.=uc; # convert to...flip; } sub find-palindromes(Str $dna, Int $min-length, Int $max-le...length -> $length { for 0..^$dna.chars - $length -> $pos {...} } } # Example usage my $dna = "GGA...426 days ago
Raku script to calculate GC content !
sub calculate-gc-content(Str $sequence) { my $gc-count = $sequence.comb(//).elem...return $gc-count / $total-bases * 100; } my $dna_sequence = "ATGCGCTAAAGCGCGCG...CGCGCGCGC"; my $gc_content = calculate-gc-content($dna_sequen...113 days ago
95 days ago
Perl and BioPerl script to extract protein sequences using GFF file !
#!/usr/bin/perl use strict; use warnings; use Bio::DB::Fasta; use Bio::SeqIO; # Paths to your GFF file and genome FASTA file my $gff_file = 'path/to/your/file.gff...95 days ago
Python script to find repeats in the DNA sequence !
def find_repeats(sequence, min_repeat_length=3): repeats = [] for i in range(len(sequence) - min_repeat_length + 1): substring = sequence[i:i+min...95 days ago
Raku script to find microsatellites in DNA fragments !
sub find-microsatellites($sequence, $min-repeat-length = 2, $max-repeat-length = 6, $min-repeat-count = 3) { my @microsatellites; for my $repeat-length ($min-...95 days ago