Skip to content

Commit 5a5a162

Browse files
author
nservant
committed
add test-op dir
1 parent dcbcd2d commit 5a5a162

File tree

2 files changed

+173
-0
lines changed

2 files changed

+173
-0
lines changed

test-op/config_test_latest.txt

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Please change the variable settings below if necessary
2+
3+
#########################################################################
4+
## Paths and Settings - Do not edit !
5+
#########################################################################
6+
7+
TMP_DIR = tmp
8+
LOGS_DIR = logs
9+
BOWTIE2_OUTPUT_DIR = bowtie_results
10+
MAPC_OUTPUT = hic_results
11+
RAW_DIR = rawdata
12+
13+
#######################################################################
14+
## SYSTEM - PBS - Start Editing Here !!
15+
#######################################################################
16+
N_CPU = 4
17+
LOGFILE = hicpro.log
18+
19+
JOB_NAME = IMR90_split
20+
JOB_MEM = 10gb
21+
JOB_WALLTIME = 6:00:00
22+
JOB_QUEUE = batch
23+
24+
25+
#########################################################################
26+
## Data
27+
#########################################################################
28+
29+
PAIR1_EXT = _R1
30+
PAIR2_EXT = _R2
31+
32+
#######################################################################
33+
## Alignment options
34+
#######################################################################
35+
36+
FORMAT = phred33
37+
MIN_MAPQ = 0
38+
39+
BOWTIE2_IDX_PATH = /home/nservant/Bureau/hicpro_dev/test-op/bowtie2_indexes/
40+
BOWTIE2_GLOBAL_OPTIONS = --very-sensitive -L 30 --score-min L,-0.6,-0.2 --end-to-end --reorder
41+
BOWTIE2_LOCAL_OPTIONS = --very-sensitive -L 20 --score-min L,-0.6,-0.2 --end-to-end --reorder
42+
43+
#######################################################################
44+
## Annotation files
45+
#######################################################################
46+
47+
REFERENCE_GENOME = hg19
48+
GENOME_SIZE = chrom_hg19.sizes
49+
50+
#######################################################################
51+
## Allele specific
52+
#######################################################################
53+
54+
ALLELE_SPECIFIC_SNP =
55+
56+
#######################################################################
57+
## Digestion Hi-C
58+
#######################################################################
59+
60+
GENOME_FRAGMENT = HindIII_resfrag_hg19.bed
61+
LIGATION_SITE = AAGCTAGCTT
62+
MIN_FRAG_SIZE = 100
63+
MAX_FRAG_SIZE = 100000
64+
MIN_INSERT_SIZE = 100
65+
MAX_INSERT_SIZE = 600
66+
67+
#######################################################################
68+
## Hi-C processing
69+
#######################################################################
70+
71+
MIN_CIS_DIST =
72+
GET_ALL_INTERACTION_CLASSES = 1
73+
GET_PROCESS_SAM = 1
74+
RM_SINGLETON = 1
75+
RM_MULTI = 1
76+
RM_DUP = 1
77+
78+
#######################################################################
79+
## Contact Maps
80+
#######################################################################
81+
82+
BIN_SIZE = 500000 1000000
83+
MATRIX_FORMAT = upper
84+
85+
#######################################################################
86+
## ICE Normalization
87+
#######################################################################
88+
MAX_ITER = 100
89+
FILTER_LOW_COUNT_PERC = 0.02
90+
FILTER_HIGH_COUNT_PERC = 0
91+
EPS = 0.1

test-op/run-test-op.sh

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#!/bin/bash
2+
3+
function die
4+
{
5+
echo -e "Unit testing failed !"
6+
exit 1
7+
}
8+
9+
## HiC-Pro should be install and in the PATH
10+
which HiC-Pro > /dev/null;
11+
if [ $? != "0" ]; then
12+
echo -e "Can not proceed without HiC-Pro, please install and/or set the PATH variable"
13+
exit 1;
14+
fi
15+
16+
## Get data
17+
if [[ $(ls bowtie2_indexes | wc -l) == 0 ]]; then
18+
echo -e "bowtie2_indexes folder looks empty. Please provide the hg19 bowtie2 indexes or download them using "
19+
echo -e "wget ftp://ftp.ccb.jhu.edu/pub/data/bowtie2_indexes/hg19.zip"
20+
exit 1
21+
fi
22+
23+
#wget https://zerkalo.curie.fr/partage/HiC-Pro/HiCPro_testdata.tar.gz && tar -zxvf HiCPro_testdata.tar.gz
24+
#/bin/rm -f HiCPro_testdata.tar.gz
25+
26+
RES_PREFIX=HiC_Pro_test-op
27+
CONFIG=config_test_latest.txt
28+
RUN_CLUSTER_MODE=0
29+
30+
## standalone complete pipeline
31+
32+
cmd="time HiC-Pro -i test_data/ -o ${RES_PREFIX} -c ${CONFIG}"
33+
echo $cmd
34+
eval $cmd
35+
if [[ $? != 0 ]]; then die; fi
36+
37+
## standalone stepwise pipeline
38+
39+
cmd="time HiC-Pro -i test_data -o ${RES_PREFIX}_stepwise1 -c ${CONFIG} -s mapping -s quality_checks"
40+
echo $cmd
41+
eval $cmd
42+
if [[ $? != 0 ]]; then die; fi
43+
44+
cmd="time HiC-Pro -i ${RES_PREFIX}_stepwise1/bowtie_results/bwt2 -o ${RES_PREFIX}_stepwise2 -c ${CONFIG} -s proc_hic -s quality_checks"
45+
echo $cmd
46+
eval $cmd
47+
if [[ $? != 0 ]]; then die; fi
48+
49+
cmd="time HiC-Pro -i ${RES_PREFIX}_stepwise2/hic_results/data/ -o ${RES_PREFIX}_stepwise3 -c ${CONFIG} -s merge_persample -s build_contact_maps -s ice_norm"
50+
echo $cmd
51+
eval $cmd
52+
if [[ $? != 0 ]]; then die; fi
53+
54+
cmd="time HiC-Pro -i ${RES_PREFIX}_stepwise3/hic_results/data/ -o ${RES_PREFIX}_stepwise4 -c ${CONFIG} -s build_contact_maps"
55+
echo $cmd
56+
eval $cmd
57+
if [[ $? != 0 ]]; then die; fi
58+
59+
cmd="time HiC-Pro -i ${RES_PREFIX}_stepwise4/hic_results/matrix/ -o ${RES_PREFIX}_stepwise5 -c ${CONFIG} -s ice_norm"
60+
echo $cmd
61+
eval $cmd
62+
if [[ $? != 0 ]]; then die; fi
63+
64+
## Cluster complete pipeline
65+
if [[ $RUN_CLUSTER_MODE == 1 ]]; then
66+
time HiC-Pro -i test_data/ -o ${RES_PREFIX}_cluster -c ${CONFIG} -p
67+
file2sub=$(find ${RES_PREFIX}_cluster -name "*step1*")
68+
qsub ${file2sub}
69+
fi
70+
71+
## as test
72+
#export CONFIG=config_test_as.txt
73+
74+
#time HiC-Pro -i test_data_as -o ${RES_PREFIX}_5 -c config_test_as.txt
75+
76+
## dnase test
77+
#export CONFIG=config_test_dnase.txt
78+
79+
#time HiC-Pro -i test_data/ -o ${RES_PREFIX}_6 -c config_test_dnase.txt
80+
81+
82+
#/bin/rm -rf HiC_Pro_test-op*

0 commit comments

Comments
 (0)