Python script for basic stats of the assembled genome !
from Bio import SeqIO import statistics # Input file containing the genome assembly in FAS...cs total_length = 0 num_contigs = 0 contig_lengths = [] # Iterate through each sequence i...152 days ago
Python script to convert fastq to fasta
def fastq_to_fasta(fastq_file, fasta_file): with open(fastq_file, 'r') as fq: w...header = fq.readline().strip() sequence...ite('>' + header[1:] + '\n') fa.write(sequence +...96 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 perfor...qseq = fields[0] # Extract the aligned query sequence (qseq) #print("Aligned Query Sequence:"...61 days ago
Python script to create fastq file with random sequences
import random def generate_random_sequence(length): bases = ['A', 'C', 'G', 'T']...range(length)) def generate_fastq_entry(sequence_length): sequence = generate_random_sequence(sequence_...te a FASTQ file with 5 entries, each with a sequence l...21 days ago
Python script to calculate basic genome stats !
from Bio import SeqIO def calculate_genome_stats(fasta_file): # Initialize variables...c_count = 0 g_count = 0 # Read the genome sequence...r record in SeqIO.parse(fasta_file, "fasta"): sequence =...21 days ago
Python script to parse a FASTQ file !
#Python script to parse a FASTQ file and extract basic information such as the sequence identifier, sequence, and quality scores #pip install biopytho...: # Initialize a list to store parsed sequences...tions["phred_quality"] } sequences....21 days ago