Python script for six frame translation of sequences !
...equence[frame-1:].translate() else: reverse_complement = sequence.reverse_complement() translated_seq = r...e(fasta_file, "fasta")) for record in records: print(f"Sequence ID: {record.id}")...158 days ago
Raku script to find repeats in sequences !
...for ^($sequence.chars - $min-repeat-length + 1) -> $i { my $substring = $sequence.substr($i, $min-repeat-length); if $sequence.contains($substring) > 1 && $subst...158 days ago
Python script to find repeats in the DNA sequence !
...tring = sequence[i:i+min_repeat_length] if sequence.count(substring) > 1 and substring...quence = "ATCGATCGATCGATCG" result = find_repeats(genome_sequence) print("Repeats found:", result)158 days ago
Raku script to find microsatellites in DNA fragments !
...ngth = 2, $max-repeat-length = 6, $min-repeat-count = 3) { my @microsatellit...sequence.chars - $repeat-length * $min-repeat-count + 1) -> $i { my..., $repeat-length); if $sequence.contains($substring x $min-repeat-...158 days ago
Raku script to find overlaps between two bed files !
...v raku # Check if the correct number of arguments are provided if @*ARGS.elem....bed file2.bed"; exit 1; } # Read the contents of the two BED files my...slurp(@*ARGS[1]).lines; # Iterate over each interval in the first BED file f...158 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, '158 days ago
Perl script to parse VCF file !
...t.vcf\n" unless @ARGV; my $vcf_file = shift @ARGV; my @vcf_entries = parse_vcf($vcf_file); print "Total entries: ", scalar(@vc...entries) { $chromosome_counts{$entry->{CHROM}}++; } print "Chromosome counts:\n"; for...158 days ago
Perl script to parse blast results and plot basic stats !
...my $blast_file = shift @ARGV; my @blast_entries = parse_blast($blast_file); print "Total entries: ", scalar(@bl...", $entry->{QUERY}, "\n"; print "Subject: ", $entry...ies, 'PERCENT_IDENTITY'); my $avg_alignment_length = calculate_average(\@...158 days ago
Perl script to calculate the basic stats of the assembled genome !
...$total_length = 0; my $num_contigs = 0; my @contig_lengths;...ength += $length; $num_contigs++; push @contig_lengt...lengths); # Calculate GC content my $gc_content = calculat...Subroutine to calculate GC content sub calculate_gc_content...158 days ago
Python script for basic stats of the assembled genome !
...tics total_length = 0 num_contigs = 0 contig_lengths = []...l_length += length num_contigs += 1 contig_lengths.a...ig_length = statistics.mean(contig_lengths) median_contig_len...ases += len(line) gc_content_percentage = (gc_count / t...158 days ago