Perl and BioPerl script to extract protein sequences using GFF file !
...e.fasta'; # Gene ID to extract my $gene_id_to_extract = 'your_gene_id'; # Step 1: Parse GFF file to get gene locations my %gene_locations; open my $gff_fh, '110 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, '110 days ago
Perl script to parse VCF file !
...(sort keys %chromosome_counts) { print " $chromosome: $chromosome_counts{$chromosome}\n"; } sub parse_vcf { my ($file) = @_; open my $fh, '...110 days ago
Perl script to parse blast results and plot basic stats !
...$min_bitscore - $max_bitscore\n"; print "Average Bit Score: $avg_bitscore\n"; sub parse_blast { my ($file) = @_; open my $fh, '...110 days ago
Perl script to calculate the basic stats of the assembled genome !
...} # Subroutine to calculate GC content sub calculate_gc_content { my ($file) = @_; my $gc_count = 0; my $total_bases = 0; open my $fh, '110 days ago
Python script for basic stats of the assembled genome !
...half_size: return length # Calculate GC content def calculate_gc_content(file): gc_count = 0 total_bases = 0 with open(file, 'r') as fh: fo...110 days ago
Python script to convert fastq to fasta
def fastq_to_fasta(fastq_file, fasta_file): with open(fastq_file, 'r') as fq: with open(fasta_file, 'w') as fa: while True: # Read four lines from the FASTQ fi...55 days ago
Python script to parse GFF file
def parse_gff(gff_file): features = [] with open(gff_file, 'r') as f: for line in f: if not line.startswith('#'): # Ignore comment lines...55 days ago
Python script to finds extact similar sequence between two multi fasta files !
...stderr: print("Error running BLAST:") print(stderr) def parse_blast_results(output_file): # Parse BLAST results with open(output_file, "r") as result_h...19 days ago