Python script to finds extact similar sequence between two multi fasta files !
...word_size=16, perc_identity=100) # Run BLAS...# Check for errors if stderr: print("Error running BLAST:")...ligned Query Sequence:", qseq) # Print other relevant information if...67 days ago
Python script to parse GFF file
...if not line.startswith('#'): # Ignore comment lines fields...type': fields[2], 'start': int(fields[3]),...f_file) for feature in parsed_features: print(feature)102 days ago
Python script to create fastq file with random sequences
...andom_quality(length): return ''.join(chr(random.randint(33, 73)) for _ in range(length)) def generate_fastq_entry(sequence_length): sequ...th open(file_path, 'w') as f: for _ in range(num_entries): entry = ge...28 days ago
Python script to calculate basic genome stats !
...statistics genome_length = 0 gc_count = 0 a_count = 0 t_count = 0 c_c...genome_length += len(sequence) a_count += sequence.count('A')...se 0 # Print genome statistics print(f"Genome Length: {genome_leng...28 days ago
Python script to parse a FASTQ file !
...xtract basic information such as the sequence identifier, sequence, and quality s...rsed_sequences = parse_fastq(fastq_file) # Print out the parsed sequences for...equences: print(f"ID: {seq['id']}") print(f"Sequence: {seq['sequence']}...28 days ago