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