| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | usagescip-shell shell bbmap 39.20+dfsg-3 usage().(){ |
| 4 | echoscip-shell system . . echo. " |
| 5 | Written by Brian Bushnell |
| 6 | Last modified March 11, 2024 |
| 7 | |
| 8 | Description: Plots Illumina read positions and barcode hamming distance. |
| 9 | |
| 10 | Usage: plotreadposition.sh in=<file.fq> out=<file.tsv> expected=<barcodes.txt> |
| 11 | |
| 12 | Please contact Brian Bushnell at [email protected] if you encounter any problems. |
| 13 | " |
| 14 | } |
| 15 | |
| 16 | #This block allows symlinked shellscripts to correctly set classpath. |
| 17 | pushd . > /dev/nullscip-shell filesystem . . `/dev/null`. |
| 18 | DIR="${BASH_SOURCE[0]}" |
| 19 | while [scip-shell system . . `[`. -h "$DIR" ]; do |
| 20 | cd "$(dirnamescip-shell system . . dirname. "$DIR")" |
| 21 | DIR="$(readlinkscip-shell system . . readlink. "$(basenamescip-shell system . . basename. "$DIR")")" |
| 22 | done |
| 23 | cd "$(dirnamescip-shell system . . dirname. "$DIR")" |
| 24 | DIR="$(pwdscip-shell system . . pwd.)/" |
| 25 | popd > /dev/nullscip-shell filesystem . . `/dev/null`. |
| 26 | |
| 27 | #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/" |
| 28 | CP="$DIR""current/" |
| 29 | |
| 30 | z="-Xmx300m" |
| 31 | z2="-Xms300m" |
| 32 | set=0 |
| 33 | |
| 34 | if [scip-shell system . . `[`. -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then |
| 35 | usagescip-shell shell bbmap 39.20+dfsg-3 usage(). |
| 36 | exit |
| 37 | fi |
| 38 | |
| 39 | calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). () { |
| 40 | source "$DIR""/calcmem.sh" |
| 41 | setEnvironment |
| 42 | parseXmx "$@" |
| 43 | } |
| 44 | calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). "$@" |
| 45 | |
| 46 | function plotscip-shell shell bbmap 39.20+dfsg-3 plot().() { |
| 47 | local CMD="java $EA $EOOM $z $z2 -cp $CP hiseq.PlotReadPosition $@" |
| 48 | echoscip-shell system . . echo. $CMD >&2 |
| 49 | eval $CMD |
| 50 | } |
| 51 | |
| 52 | plotscip-shell shell bbmap 39.20+dfsg-3 plot(). "$@" |