FILE: fas2nex.stdinout
USAGE: ./fas2nex.stdinout <input>
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 | |
| # Convert Markdown to PDF (beamer) using pandoc | |
| # Last modified: mån sep 07, 2020 03:05 | |
| # Johan Nylander | |
| for f in "$@" | |
| do | |
| echo -n "Converting $f ..." | |
| g=${f%.md}.pdf |
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 | |
| # Convert Markdown to PDF using pandoc | |
| # Last modified: tor aug 20, 2020 02:51 | |
| # Johan Nylander | |
| # TODO: set mainfont to allow for special characters () -V 'mainfont:xxx xx' | |
| hash pandoc 2>/dev/null || { echo >&2 "Cannot find pandoc. Aborting."; exit 1; } | |
| for f in "$@" |
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
| #!/usr/bin/env Rscript | |
| # File: summary | |
| # Description: Summarize data from stdin as min, max, mean, median | |
| # Requirements: R | |
| # Usage example: for i in $(seq 1 100); do echo $RANDOM; done | summary | |
| # 288 32697 14644.19 14256 | |
| a <- scan(file("stdin"), c(0), quiet=TRUE); | |
| cat(min(a), max(a), mean(a), median(a), "\n"); |
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 | |
| # blast2fasta | |
| # Parse output from blast where we have sseq as the last column. | |
| # For example (argument to blastn): "-outfmt '6 qseqid sseq'". | |
| # Reads from file, writes to stdout. | |
| # By Johan Nylander | |
| # 2023-Oct-10 | |
| # Usage: blast2fasta.sh file | |
| file=$1 | |
| awk '{printf ">%s", $1; for(i=2;i<NF;i++) printf " %s", $i; printf "\n%s\n", $NF}' "$file" |
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
| #!/usr/bin/env perl | |
| =pod | |
| =encoding utf8 | |
| =head1 NAME | |
| create_sample_sheet.pl - Create sample sheet from NGI delivery |
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
| #!/usr/bin/env bash | |
| # Start/stop FortiClient VPN | |
| # Last modified: ons mar 15, 2023 03:47 | |
| # Sign: JN | |
| # To disable starting forticlient after reboot: | |
| # 1. Comment out the command (edit and add an `#` in front of the line) in file | |
| # `/opt/forticlient/start-fortitray-launcher.sh` | |
| # 2. `sudo systemctl disable forticlient-scheduler` | |
| # After step 1 and 2 above, forticlient daemon will not start after reboot. To |
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
| Recently, I tried to upgrade [nf-core](https://nf-co.re/) on my Ubuntu Linux but the execution after installation failed with errors from a python module. | |
| Upgrading the python library ["rich"](https://rich.readthedocs.io/en/stable/introduction.html) solved the issue. | |
| Steps below: | |
| ``` | |
| $ cat /etc/lsb-release | |
| DISTRIB_ID=Ubuntu | |
| DISTRIB_RELEASE=20.04 | |
| DISTRIB_CODENAME=focal |
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
| #! /usr/bin/env perl | |
| # | |
| # Short description for fasta2nexus.pl | |
| # | |
| # Author nylander <[email protected]> | |
| # Version 0.1 | |
| # Copyright (C) 2021 nylander <[email protected]> | |
| # Modified On 2021-05-21 10:54 | |
| # Created 2021-05-21 10:54 | |
| # |
NewerOlder