Python script to check sequence length in multifasta file
#!/usr/bin/python from Bio import SeqIO import sys cmdargs = str(sys.argv) for seq_record in SeqIO.parse(str(sys.argv[1]), "fasta"): output_line = '%s\t%i' % \ (seq_record.id, len(seq_record)) print(output_line)1212 days ago
1212 days ago
Parse the NCBI taxonomy database with Perl !
...-nodesfile=> "taxdump/nodes.dmp", -namesfile=> "taxdump/names.dmp"); #to check #parseTax('homo_sapiens', 'metazoa')...1169 days ago
Install grabseqs using conda !
vik@vik-Lenovo-ideapad-320-15ISK:~/Downloads/setu/setu$ conda install grabseqs -c louiejtaylor -c bioconda -c conda-forge Collecting package metadata (current_repodata.json): done Solving environment: done ==> WARNING: A newer version of conda exists.1051 days ago
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`....973 days ago
Perl script to find inverted repeats !
...(); my $seq = $seqobj->seq(); # run RepeatMasker my $rm = Bio::Tools::Run::RepeatMasker->new(); my $rm_report = $rm->run($genome_file); # parse RepeatMasker output while (m...422 days ago
296 days ago
91 days ago
Perl and BioPerl script to extract protein sequences using GFF file !
...to/your/file.gff'; my $genome_fasta = 'path/to/your/genome.fasta'; # Gene ID to extract my $gene_id_to_extract = 'your_gene_id'; # Step 1: Parse GFF file to get gene location...91 days ago
Python script for six frame translation of sequences !
...q = reverse_complement[abs(frame)-1:].translate() return translated_seq def six_frame_translation(fasta_file): records = list(SeqIO.parse(fasta_file, "fasta"))...91 days ago