Python script to read FASTA and FASTQ file !
# !/usr/bin/env python3 # -*- coding: utf-8 -*- from pysam import FastxFile def read_fasta_...stxFile(fasta_q_file) as fh: for entry in fh: sequence_id = entry.name sequence =...1034 days ago
Remove dupcates in multifasta file !
#Using seqkit for duplicate sequence removal seqkit rmdup -n seqs.fa -o seqs_without_duplicate.fa #Awk for duplicate sequence removal awk '/^>/ { f = !a[$0]++ } f' seqs.fa1034 days ago
Tadpole is 250x faster than SPADes assembler !
lege@jit-Lenovo-ideapad-320-15ISK:~/Downloads/MyTools/Vir$ tadpole.sh W...r counts to assemble contigs, extend sequences, or error-correct reads....ted. Specifically, it allows 1-31, multiples of 2 from 32-62, multiples...extend: Extend sequences...1033 days ago
Run multiple bash command in screen !
#login to screen screen -r 123 #bash.sh srun --partition=compute --nodes=1 --ntasks-per-node=40 --pty bash.sh #Run and check the status in screen contol +A +D1019 days ago
Commands to Remove White Space In Text Or String Using Awk And Sed In Linux
text=" ATGGTV AGTGACCTAGAGTGATGA G GGRTTT" echo "$text" | sed 's/ //g' OR echo "$text"...AGTGATGAGGGRTTT echo "$text" | sed 's/^ //g' echo "$text" | sed 's/ \$//g' #Multiple s...1014 days ago
Oneliner to convert lower-case to sequence masked with Ns
perl -pe '/^[^>]/ and $_=~ s/[a-z]/N/g' genomic.fna > genomic.N-masked.fna awk '{if(/^[^>]/)gsub(/[a-z]/,"N");print $0}' genomic.fna > genomic.N-masked.fna1008 days ago
Perl script for Smith-Waterman Algorithm
# Smith-Waterman Algorithm # usage statement die "usage: $0 \n" unless @ARGV == 2; # get sequences...1008 days ago
1008 days ago
Run Pango on your multifasta file !
#More at https://cov-lineages.org/resources/pangolin/usage.html (base) [jnarayan@hn1 F...Input_for_Cova_all_samples_combined.fa ** Running sequence QC ** Number of sequences...tations warnings.warn( processing block of 293 sequences...945 days ago
bash script to extract sequence by ids !
Use a Perl one-liner, grep and seqtk subseq to extract the desired fasta sequences: # Create test input: cat > in.fasta..._ids.txt ids_gene_ids.tsv | cut -f1 > ids.selected.txt # Extract fasta sequence t...881 days ago