Python script to convert Multi-line Fasta to Single-line Fasta
def multi_to_single_line_fasta(input_filename, output_filename): try: with open(input_filename, 'r') as input_file: with open(output_filename,...96 days ago
95 days ago
Python script for six frame translation of sequences !
from Bio import SeqIO from Bio.Seq import Seq def translate_frame(sequence, frame): if frame > 0: translated_seq = sequence[frame-1:].translate()...95 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...95 days ago
Python script for basic stats of the assembled genome !
from Bio import SeqIO import statistics # Input file containing the genome assembly in FASTA format input_file = 'genome_assembly.fasta' # Variables for computin...95 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: #...39 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...39 days ago
Python script to finds extact similar sequence between two multi fasta files !
from Bio.Blast.Applications import NcbiblastnCommandline import os import sys def perform_local_blast(query_fi...on if needed def main(): if len(sys.argv) != 4: print("Usage: python s...4 days ago