Skip to content

Commit

Permalink
Fix permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Feb 9, 2024
1 parent 0f6f5d6 commit df956e1
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions bin/run_hic_tools_pre.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

# Copyright (C) 2024 Roberto Rossini <roberros@uio.no>
#
# SPDX-License-Identifier: MIT

if [ $# -ne 7 ]; then
2>&1 echo "Usage: $0 path_to_pairs path_to_output tmpdir hic_tools.jar resolution cpus memory"
2>&1 echo "Example: $0 pairs.4dn.gz out.hic tmp/ hic_tools.jar 1000000 16 650G"
exit 1
fi

path_to_pairs="$1"
path_to_output="$2"
tmpdir="$(mktemp -d -t "$3/hictk-tmp-XXXXXXXXXX")"
hic_tools_jar="$4"
resolution="$5"
cpus="$6"
memory="$7"


trap 'rm -rf -- "$tmpdir"' EXIT

java -jar -"Xmx${memory}" "$hic_tools_jar" \
pre "$path_to_pairs" "$path_to_output" \
hg38 \
-r "$resolution" \
-n \
-t "$tmpdir" \
-j "$cpus" \
--threads "$cpus"

0 comments on commit df956e1

Please sign in to comment.