annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/gradesam.sh @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 #!/bin/bash
jpayne@69 2
jpayne@69 3 usage(){
jpayne@69 4 echo "
jpayne@69 5 Written by Brian Bushnell
jpayne@69 6 Last modified May 23, 2014
jpayne@69 7
jpayne@69 8 Description: Grades mapping correctness of a sam file of synthetic reads with headers generated by RandomReads3.java
jpayne@69 9
jpayne@69 10 Usage: gradesam.sh in=<sam file> reads=<number of reads>
jpayne@69 11
jpayne@69 12 Parameters:
jpayne@69 13 in=<file> Specify the input sam file, or stdin.
jpayne@69 14 reads=<int> Number of reads in mapper's input (i.e., the fastq file).
jpayne@69 15 thresh=20 Max deviation from correct location to be considered 'loosely correct'.
jpayne@69 16 blasr=f Set to 't' for BLASR output; fixes extra information added to read names.
jpayne@69 17 ssaha2=f Set to 't' for SSAHA2 or SMALT output; fixes incorrect soft-clipped read locations.
jpayne@69 18 quality=3 Reads with a mapping quality of this or below will be considered ambiguously mapped.
jpayne@69 19 bitset=t Track read ID's to detect secondary alignments.
jpayne@69 20 Necessary for mappers that incorrectly output multiple primary alignments per read.
jpayne@69 21
jpayne@69 22 Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems.
jpayne@69 23 "
jpayne@69 24 }
jpayne@69 25
jpayne@69 26 #This block allows symlinked shellscripts to correctly set classpath.
jpayne@69 27 pushd . > /dev/null
jpayne@69 28 DIR="${BASH_SOURCE[0]}"
jpayne@69 29 while [ -h "$DIR" ]; do
jpayne@69 30 cd "$(dirname "$DIR")"
jpayne@69 31 DIR="$(readlink "$(basename "$DIR")")"
jpayne@69 32 done
jpayne@69 33 cd "$(dirname "$DIR")"
jpayne@69 34 DIR="$(pwd)/"
jpayne@69 35 popd > /dev/null
jpayne@69 36
jpayne@69 37 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
jpayne@69 38 CP="$DIR""current/"
jpayne@69 39 set=0
jpayne@69 40
jpayne@69 41 if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
jpayne@69 42 usage
jpayne@69 43 exit
jpayne@69 44 fi
jpayne@69 45
jpayne@69 46 function gradesam() {
jpayne@69 47 local CMD="java $EA $EOOM -Xmx200m -cp $CP align2.GradeSamFile $@"
jpayne@69 48 # echo $CMD >&2
jpayne@69 49 eval $CMD
jpayne@69 50 }
jpayne@69 51
jpayne@69 52 gradesam "$@"