158 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'; my $genome_fasta = 'path/t...158 days ago
Perl script for six frame translation !
#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; # Path to your input...the input FASTA file my $seqio = Bio::SeqIO->new(-file => $input...n:\n$translated_seq\n"; } # Subroutine to translate a sequenc...verse and complement the sequence before translation my...158 days ago
Python script for six frame translation of sequences !
from Bio import SeqIO from Bio.Seq import Seq def translate_frame(sequence...() translated_seq = reverse_complement[abs(frame)-1:].translate()...verse" print(f"Frame {frame_type} {abs(frame)} Translation:\n{prote...158 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);...158 days ago
Python script to find repeats in the DNA sequence !
...for i in range(len(sequence) - min_repeat_length + 1): substring = sequence[i:i+min_repeat_length] if sequence.count(substring) > 1 and substring not...158 days ago
Raku script to find microsatellites in DNA fragments !
sub find-microsatellites($sequence, $min-repeat-length = 2, $max-repeat-length....chars - $repeat-length * $min-repeat-count + 1) -> $i { my $substring = $sequence.substr($i, $repeat-length);...158 days ago
Raku script to find overlaps between two bed files !
#!/usr/bin/env raku # Check if the correct number of arguments are provided if @...!= 2 { say "Usage: ./compare_bed_files.raku file1.bed file2....# Read the contents of the two BED files my @bed1 = slurp(@*A...laps with intervals in the second BED file for my $line2 (@b...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 !
#!/usr/bin/perl use strict; use warnings; # Usage: ./parse_vcf.pl input.vcf di...ounts) { print " $chromosome: $chromosome_counts{$chromosome}\n"; } sub parse_vcf { my ($file) =...158 days ago