-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconvert_format.sh
33 lines (27 loc) · 1.23 KB
/
convert_format.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Convert to h5 format for HiCExplorer- how to build a generic write script (also can make cool and mcool files)
## edit environmental variables
export [email protected]
export MCSOURCE="/home/FCAM/awilderman/ANALYSIS/HiC/Human/CS17_03-29-21/HiCExplorer"
export OUTDIR=/home/FCAM/awilderman/ANALYSIS/HiC/CNCC/HiCExplorer
export HICPRODIR="/home/FCAM/awilderman/ANALYSIS/HiC/Lyu_H9"
export SAMPLE=fastq
export LABEL=H9
export RESOLUTION=10000
export OUTFORMAT=h5
echo "#!/bin/bash
#SBATCH --job-name=HiCExplorer_convert
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -c 16
#SBATCH --partition=general
#SBATCH --qos=general
#SBATCH --mem-per-cpu=4G
#SBATCH --mail-type=BEGIN,END
#SBATCH --mail-user="$MAIL"
#SBATCH -o HiCExplorer_convert_%j.out
#SBATCH -e HiCExplorer_convert_%j.err
source "$MCSOURCE"/.bashrc_miniconda3
conda activate "$MCSOURCE"/hicexplorer
cd "$OUTDIR"
hicConvertFormat --matrices "$HICPRODIR"/"$LABEL"/hic_results/matrix/"$SAMPLE"/raw/"$RESOLUTION"/"$SAMPLE"_"$RESOLUTION".matrix --outFileName "$LABEL"_"$RESOLUTION"."$OUTFORMAT" --inputFormat hicpro --outputFormat "$OUTFORMAT" --bedFileHicpro "$HICPRODIR"/"$LABEL"/hic_results/matrix/"$SAMPLE"/raw/"$RESOLUTION"/"$SAMPLE"_"$RESOLUTION"_abs.bed
conda deactivate" > hicexplorer_convert.slurm