204 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; # Path...id'; # Step 1: Parse GFF file to get gene locations my %gene_locations; open my $gff_fh, '204 days ago
Perl script for six frame translation !
#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; #...a'); my $sequence = $seqio->next_seq; # Step 2: Perform six-frame translation m...ranslate_frame($sequence, $frame); my $frame_type = $frame > 0 ? "Forward" : "R...204 days ago
Python script for six frame translation of sequences !
...rotein_sequence = translate_frame(record.seq, frame) frame_type = "Forward" if frame > 0 else "Reverse" print(f"Frame {frame_type} {abs(frame)} Translation:\n{...204 days ago
Raku script to find repeats in sequences !
sub find-repeats($sequence, $min-repeat-length = 3) { my @repeats; for ^($sequence.chars - $min-re...y $substring = $sequence.substr($i, $min-repeat-length); if $seq...tring); } } return @repeats; } # Example usage my...204 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+mi...equence.count(substring) > 1 and substring not in repeats: repeats.appe...204 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...{ my @microsatellites; for my $repeat-length ($min-repeat-length....my $substring = $sequence.substr($i, $repeat-length); if...204 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, '204 days ago
Perl script to parse VCF file !
#!/usr/bin/perl use strict; use warnings; # Usage: ./parse_vcf.pl input.vcf die "...e_counts{$chromosome}\n"; } sub parse_vcf { my ($file) = @_; open my $fh, '204 days ago
Perl script to parse blast results and plot basic stats !
#!/usr/bin/perl use strict; use warnings; use List::Uti...", $entry->{SUBJECT}, "\n"; print "Percent Identity: ", $entry->{PERCENT_IDENTITY}, "\n"; pr...# Print summary statistics print "Average Percent Identity: $avg_percent_...204 days ago