This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Prodigal multiprocessing using find and xargs, good for thousand of files. | |
| # Auto-create folder "../prodigal" with mkdir. | |
| # Find all files between 200 Kb and 20 Mb with "fna" extension in current folder. | |
| # Xargs creates 64 Prodigal tasks at once. | |
| # Prodigal will place output files to folder "../prodigal". | |
| mkdir -p ../prodigal | |
| find . -size +200k -size -20M -name '*.fna' | xargs -P 64 -t -I bin \ | |
| prodigal -q -i bin -f gff -a ../prodigal/bin.faa -d ../prodigal/bin.fasta -o ../prodigal/bin.gff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The recipe was taken from https://github.com/Homebrew/homebrew-core/issues/68193#issuecomment-753628592 | |
| # | |
| # From time to time I face the next problem: | |
| # When I paste several lines to Python's interactive interpreter | |
| # they hadn't been executed one by one an throw an error: | |
| # multiple statements found while compiling a single statement | |
| # There is a fast solution, run it and restart the terminal. | |
| echo "set enable-bracketed-paste off" >> ~/.inputrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| perl -pne '@a=$_=~/(\d+\.\d+)/g; foreach my $i(@a){$k=100-$i;$_=~s/$i/$k/}' matrix > matrix.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Requires Infernal and esl-sfetch from Easel (part of HMMER and Infernal) | |
| # https://github.com/EddyRivasLab/easel | |
| # With little change of article: | |
| # https://cryptogenomicon.org/2011/05/03/extracting-hmmer-results-to-sequence-files-easel-miniapplications/ | |
| # Don't forget to change the path to your covariance model! | |
| CM_PATH="/somewhere/RF00177.cm" | |
| for i in *fna; do esl-sfetch --index $i; \ | |
| cmsearch -o /dev/null --tblout /dev/stdout -E 1e-10 "$CM_PATH" "$i" | \ | |
| grep -v "^#" | awk '{print "'"${i/.fna/}"'""_"$1"_16S",$8,$9,$1}' | head -1 | \ |