1042 days ago
Print in terminal with python !
#!/usr/bin/env python import time import curses def pbar(window): height, width = window.getmaxyx() for i in range(10): window.addstr(height -1, 0, "[" + ("=" * i) + ">" + (" " * (10 - i )) + "]") window.refresh() time.sleep(0.5) curses.wrapper(pbar)1039 days ago
Python script to read FASTA and FASTQ file !
...Args: fasta_q_file (str): Path to FASTA/Q file. """ with FastxFile(fasta_q_file) as fh: for entry in fh: sequence_id = entry.name sequence...1037 days ago
Tadpole is 250x faster than SPADes assembler !
...Description: Uses kmer counts to assemble contigs, extend sequences, or er...eters: out= Write contigs (in contig mode) or correc...counts. Much faster but counts will be lower, by up to...nd only partially. This prevents the creation...1037 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 +D1022 days ago
1022 days ago
Commands to Remove White Space In Text Or String Using Awk And Sed In Linux
...echo "$text" | sed 's/ //g' OR echo "$text" | awk '{ gsub(/ /,""); print }' Return: ATGGTVAGTGACCTA...st.txt | sed 's/[ ]\+/ /g' echo "$text1" | awk '{ gsub(/[ ]+/," "); print }' cat /tmp/test.txt | awk...1017 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.fna1011 days ago
Perl script for Smith-Waterman Algorithm
# Smith-Waterman Algorithm # usage statement die "usage: $0 \n" unless @ARGV == 2; # get sequence...nitialization my @matrix; $matrix[0][0]{score} = 0; $matrix[0][0]{pointer} = "none"; for(my $j = 1;...1011 days ago
1011 days ago