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_repeat_length]...repeats # Example usage genome_sequence = "ATCGATCGATCGATCG" result...157 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 @microsate...eat-length) { for ^($sequence.chars - $repeat-length * $mi...t-length); if $sequence.contains($substring x $min-r...157 days ago
Raku script to find overlaps between two bed files !
...ems != 2 { say "Usage: ./compare_bed_files.raku file1.be...exit 1; } # Read the contents of the two BED files...$line1.split("\t"); my $chr1 = @fields1[0]; my $st...atch and overlap if $chr1 eq $chr2 && $start1 < $end...157 days ago
Perl script to find overlaps between two bed files !
#!/usr/bin/perl use strict; use warnings; # Check if the correct number of arguments are provided if (@ARGV != 2) { die "Usage: $0 file1.bed file2.bed\n"; } # Read the contents of the two BED files my $file1 = shift @ARGV; my $file2 = shift @ARGV; open my $fh1, '157 days ago
Perl script to parse VCF file !
#!/usr/bin/perl use strict; use warnings; # Usage: ./parse_vcf.pl input.vcf die "Usage: ./parse_vcf.pl input.vcf\n" unless @ARGV; m...file); print "Total entries: ", scalar(@vcf_entries), "\n"; pri...nt "Chromosome counts:\n"; for my $chromosome (sort keys %chromoso...157 days ago
Perl script to parse blast results and plot basic stats !
...print "Total entries: ", scalar(@blast_entries), "\n"; p...nt detailed information for each entry for my $entry (@blast..."\n"; print "Bit Score: ", $entry->{BITSC...$avg_evalue\n"; print "Bit Score Range: $min_bits...157 days ago
Perl script to calculate the basic stats of the assembled genome !
#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; # Input file containing the genome assembly...'fasta'); # Variables for computing statistics my $total...engths, $length; } # Sort contig lengths in descending or..._length\n"; print "Number of Contigs: $num_contigs\n"; prin...157 days ago
Python script for basic stats of the assembled genome !
...import SeqIO import statistics # Input file containing the genome assembly...s = [] # Iterate through each sequence in the assembly fo...# Calculate GC content def calculate_gc_content(file):...----------------") # Print contig length distribution for...157 days ago
Python script to finds extact similar sequence between two multi fasta files !
from Bio.Blast.Applications import NcbiblastnCommandline import os...ile): # Set up the BLAST command with format 6 (tab-deli...word_size=16, perc_identity=100) # Ru...qseq = fields[0] # Extract the aligned query sequence (...66 days ago
111 days ago