Python script to read FASTA and FASTQ file !
# !/usr/bin/env python3 # -*- coding: utf-8 -*- from pysam import FastxFile def read_fasta_q_file(fasta_q_file): """Parse FASTA/Q file using `pysam.FastxFile`....1019 days ago
137 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() else: re...137 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 computing statisti...137 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_file, subject_file, output_file): # Set up the BLAST command with format 6 (tab...46 days ago
Python script to create fastq file with random sequences
import random def generate_random_sequence(length): bases = ['A', 'C', 'G', 'T'] return ''.join(random.choice(bases) for _ in range(length)) def generat...7 days ago
Python script to calculate basic genome stats !
from Bio import SeqIO def calculate_genome_stats(fasta_file): # Initialize variables to store genome statistics genome_length = 0 gc_count = 0 a_coun...7 days ago
Python script to parse a FASTQ file !
...parse a FASTQ file and extract basic information such as the sequence identifier, sequence, and quality scores #pip install biopython from Bio import SeqIO def parse_fastq(fast...7 days ago