-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJuicer
78 lines (64 loc) · 2.54 KB
/
Juicer
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#create directories in the working directory
mkdir somedirforjuicer
cd somedirforjuicer
git clone https://github.com/rmdickson/juicer.git
cd ..
mkdir somedirtorunjuicier
cd somedirtorunjuicier
ln -s ../somedirforjuicer/juicer/CPU/ scripts
cd scripts/common
wget https://hicfiles.tc4ga.com/public/juicer/juicer_tools.1.9.9_jcuda.0.8.jar
ln -s juicer_tools.1.9.9_jcuda.0.8.jar juicer_tools.jar
cd ../../
mkdir fastq
cd fastq
ln -s /pathtohicfastqfiles/file_R1.fastq.gz
ln -s /pathtohicfastqfiles/file_R2.fastq.gz
cd ..
mkdir references
cd references
ln -s /pathtofasta/contigassembly.fasta
bwa index contigassembly.fasta
cd ..
mkdir restriction_sites
cd restriction_sites
#download and modiffy generate_site_positions.py https://github.com/aidenlab/juicer/blob/main/misc/generate_site_positions.py
#Add to this section the path to your fasta
filenames = {
'hg19': '/seq/references/Homo_sapiens_assembly19.fasta',
'contigassembly': '../references/contigassembly.fasta', #here I am adding the path to my fasta
'mm9' : '/seq/references/Mus_musculus_assembly9.fasta',
'mm10': '/seq/references/Mus_musculus_assembly10.fasta',
'hg18': '/seq/references/Homo_sapiens_assembly18.fasta',
}
#run generate_site_positions.py
python generate_site_positions.py DpnII contigassembly
#after we finish running generate_site_positions.py, we run Chromosome_sizes.sh with this:
for i in $(ls *DpnII.txt)
do
name=$(echo $i | cut -d "." -f 1 )
awk 'BEGIN{OFS="\t"}{print $1, $NF}' $i > "$name"".chrom.sizes"
done
#run it
bash Chromosome_sizes.sh
cd ..
#run juicer with the file RUN_JUICER.sh for compute canada
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --account=def-rieseber
#SBATCH --time=3-0
#SBATCH --gpus-per-node=a100:4
#SBATCH --ntasks-per-node=24
#SBATCH --mem=510000M
module load StdEnv/2020 bwa/0.7.17 java/17.0.2 samtools/1.15.1 cudacore/.11.7.0 ucx-cuda/1.12.1 gcc/11.3.0 openmpi/4.1.4 cuda/11.7
bash scripts/juicer.sh -D $PWD -g contigassembly -s DpnII -p restriction_sites/contigassembly.chrom.sizes -y restriction_sites/contigassembly_DpnII.txt -z references/contigassembly.fasta -t 24
####################
#run juicier with out GPUS and more cores
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --account=def-rieseber
#SBATCH --time=3-0
#SBATCH --ntasks-per-node=32
#SBATCH --mem=149G
module load StdEnv/2020 bwa/0.7.17 java/17.0.2 samtools/1.15.1
bash scripts/juicer.sh -D $PWD -g contigassembly -s DpnII -p restriction_sites/contigassembly_DpnII.chrom.sizes -y restriction_sites/contigassembly_DpnII.txt -z references/ThreeminiChrintocontigs.fasta -t 32 -S early