831 days ago
819 days ago
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...89 days ago
88 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()...88 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+m...88 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 computi...88 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:...32 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 line...32 days ago