1021 days ago
Commands to Remove White Space In Text Or String Using Awk And Sed In Linux
...G GGRTTT" echo "$text" | sed 's/ //g' OR echo "$text" | awk '{ gsub(/ /,""); print }' Return:...space cat /tmp/test.txt | sed 's/[ ]\+/ /g' echo "$text1" | awk '{ gsub(/[ ]+/," "); print }' cat...1016 days ago
Trim the reads in loop using Trimmomatic !
for infile in *_1.fastq.gz do base=$(basename ${infile} _1.fastq.gz) trimmomatic PE ${infile} ${base}_2.fastq.gz \...${base}_1un.trim.fastq.gz \ ${base}_2.trim.fastq.gz ${base}_2...1015 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.fna1010 days ago
Perl script for Smith-Waterman Algorithm
# Smith-Waterman Algorithm # usage statement die "usage: $0 \n" unless @ARGV == 2; # get sequences from command line my ($seq1, $seq2) = @ARGV; # scorin...1010 days ago
1010 days ago
Command line to create blast uniref database !
#The NCBI BLAST+ distribution does not include 'blastpgp', it has been replaced by the 'psiblast' program. The 'blastpgp' program is available...longer supported), which is available from the NCBI's FTP site: f....gz gunzip -v uniref90.fasta.gz bin/pfilt uniref90.fasta > unir...1010 days ago
Inreractive SCP / File transfer !
#!/bin/bash #next line prints hearer of script...nter, and stores entered value to variable with name desthost read -p...nter, and stores entered value to variable with name destpath read -p...nter, and stores entered value to variable with name filename read -p...1010 days ago
1009 days ago
Get the Linux system information !
#!/bin/bash # while-menu-dialog: a menu driv..."$1" \ --no-collapse \ --msgbox "$result" 0 0 } while t...ec 3>&1 selection=$(dialog \ --backtitle "System Information"...SC) clear echo "Program aborted." >&2 exit 1...1008 days ago