Debian Codegraph @

processhi-c.sh

raw symbols SCIP
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 28, 2018
7
8 Description: Finds and trims junctions in mapped Hi-C reads.
9 For the purpose of reporting junction motifs, this requires paired-end reads,
10 because only improper pairs will be considered as possibly containing
11 junctions. However, all reads that map with soft-clipping will be trimmed
12 on the 3' (right) end, regardless of pairing status.
13
14 Usage: processhi-c.sh in=<mapped reads> out=<trimmed reads>
15
16 Parameters:
17 in=<file> A sam/bam file containing mapped reads.
18 out=<file> Output file of trimmed reads.
19 overwrite=f (ow) Set to false to force the program to abort rather than
20 overwrite an existing file.
21 printkmers=t Generate files with kmer counts at junction sites.
22 junctions=junctions_k%.txt File pattern for junction output.
23
24 Java Parameters:
25 -Xmx This will set Java's memory usage, overriding autodetection.
26 -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will
27 specify 200 megs. The max is typically 85% of physical memory.
28 -eoom This flag will cause the process to exit if an out-of-memory
29 exception occurs. Requires Java 8u92+.
30 -da Disable assertions.
31
32 Please contact Brian Bushnell at [email protected] if you encounter any problems.
33 "
34 }
35
36 #This block allows symlinked shellscripts to correctly set classpath.
37 pushd . > /dev/nullscip-shell filesystem . . `/dev/null`.
38 DIR="${BASH_SOURCE[0]}"
39 while [scip-shell system . . `[`. -h "$DIR" ]; do
40 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
41 DIR="$(readlinkscip-shell system . . readlink. "$(basenamescip-shell system . . basename. "$DIR")")"
42 done
43 cd "$(dirnamescip-shell system . . dirname. "$DIR")"
44 DIR="$(pwdscip-shell system . . pwd.)/"
45 popd > /dev/nullscip-shell filesystem . . `/dev/null`.
46
47 #DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
48 CP="$DIR""current/"
49
50 z="-Xmx200m"
51 set=0
52
53 if [scip-shell system . . `[`. -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
54 usagescip-shell shell bbmap 39.20+dfsg-3 usage().
55 exit
56 fi
57
58 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). () {
59 source "$DIR""/calcmem.sh"
60 setEnvironment
61 parseXmx "$@"
62 }
63 calcXmxscip-shell shell bbmap 39.20+dfsg-3 calcXmx(). "$@"
64
65 processscip-shell shell bbmap 39.20+dfsg-3 process().() {
66 local CMD="java $EA $EOOM $z -cp $CP jgi.FindHiCJunctions $@"
67 echoscip-shell system . . echo. $CMD >&2
68 eval $CMD
69 }
70
71 processscip-shell shell bbmap 39.20+dfsg-3 process(). "$@"