Perl script to calculate the basic stats of the assembled genome !
#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; # Input file containing the...my ($file) = @_; my $gc_count = 0; my $total_bases = 0; open my $fh, '...156 days ago
Python script for basic stats of the assembled genome !
...) total_length += length num_contigs += 1 contig_lengths.append(length) # Sort contig le...ate_gc_content(file): gc_count = 0 total_bases = 0 with open(file, 'r') as fh: f...156 days ago
Python script to finds extact similar sequence between two multi fasta files !
...dline import os import sys def perform_local_blast(query_file,...word_size=16, perc_identity=100) #...# Parse BLAST results with open(output_file, "r") as result_...put_file = sys.argv[3] # Perform local BLAST perform...65 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: # Read four lines from the FASTQ f...101 days ago
Python script to parse GFF file
...rse_gff(gff_file): features = [] with open(gff_file, 'r') as f:...'source': fields[1], 'type': fields[2],...) } features.append(feature) return featur...101 days ago
Python script to create fastq file with random sequences
...(sequence_length) return f"@SEQ_ID\n{sequence}\n+\n{quality}\n" def generate_fastq_file(num_entries, sequence_length, file_path): with open(file_path, 'w') as f:...26 days ago
Python script to parse a FASTQ file !
...ord.id, "sequence": str(record.seq), "quality": record.letter_annotations["phred_quality"] } sequences.append(sequence_info) retur...26 days ago