Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
Hub
hic
Commits
ece3fad7
Commit
ece3fad7
authored
5 years ago
by
nservant
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' of
https://github.com/nservant/nf-core-hic
into dev
parents
df833298
c79ca2f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
bin/hicpro2higlass.sh
+11
-7
11 additions, 7 deletions
bin/hicpro2higlass.sh
conf/base.config
+5
-0
5 additions, 0 deletions
conf/base.config
with
17 additions
and
7 deletions
CHANGELOG.md
+
1
−
0
View file @
ece3fad7
...
...
@@ -2,6 +2,7 @@
## v1.1.0 - 2019-10-15
*
Update hicpro2higlass with
`-p`
parameter
*
Support 'N' base motif in restriction/ligation sites
*
Support multiple restriction enzymes/ligattion sites (comma separated) (
[
#31
](
https://github.com/nf-core/hic/issues/31
)
)
*
Add --saveInteractionBAM option
...
...
This diff is collapsed.
Click to expand it.
bin/hicpro2higlass.sh
+
11
−
7
View file @
ece3fad7
...
...
@@ -103,6 +103,7 @@ function help {
echo
" -i|--input INPUT : allValidPairs or matrix file generated by HiC-Pro"
echo
" -r|--res RESOLUTION : .matrix file resolution or maximum resolution to reach from the .allValidPairs input file"
echo
" -c|--chrom CHROMSIZE : chromosome size file"
echo
" -p|--proc NB_CPU : number of CPUs for cooler"
echo
" [-n|--norm] : run cooler matrix balancing algorithm"
echo
" [-o|--out] : output path. Default is current path"
echo
" [-t|--temp] TEMP : path to tmp folder. Default is current path"
...
...
@@ -125,6 +126,7 @@ for arg in "$@"; do
"--bed"
)
set
--
"
$@
"
"-b"
;;
"--res"
)
set
--
"
$@
"
"-r"
;;
"--chrom"
)
set
--
"
$@
"
"-c"
;;
"--proc"
)
set
--
"
$@
"
"-p"
;;
"--out"
)
set
--
"
$@
"
"-o"
;;
"--temp"
)
set
--
"
$@
"
"-t"
;;
"--norm"
)
set
--
"
$@
"
"-n"
;;
...
...
@@ -136,18 +138,20 @@ done
INPUT_HICPRO
=
""
INPUT_BED
=
""
NORMALIZE
=
0
NPROC
=
1
CHROMSIZES_FILE
=
""
RES
=
10000
OUT
=
"./"
TEMP
=
"./"
while
getopts
":i:b:c:r:o:t:nh"
OPT
while
getopts
":i:b:c:
p:
r:o:t:nh"
OPT
do
case
$OPT
in
i
)
INPUT_HICPRO
=
$OPTARG
;;
b
)
INPUT_BED
=
$OPTARG
;;
n
)
NORMALIZE
=
1
;;
c
)
CHROMSIZES_FILE
=
$OPTARG
;;
p
)
NPROC
=
$OPTARG
;;
r
)
RES
=
$OPTARG
;;
o
)
OUT
=
$OPTARG
;;
t
)
TEMP
=
$OPTARG
;;
...
...
@@ -223,9 +227,9 @@ if [[ $DATATYPE == "MATRIX" ]]; then
echo
-e
"
\n
Zoomify .cool file ..."
if
[[
$NORMALIZE
==
1
]]
;
then
cooler zoomify
--balance
$tmp_dir
/
$out
cooler zoomify
--nproc
${
NPROC
}
--balance
$tmp_dir
/
$out
else
cooler zoomify
--n
o-balance
$tmp_dir
/
$out
cooler zoomify
--n
proc
${
NPROC
}
$tmp_dir
/
$out
fi
out
=
$(
basename
$INPUT_HICPRO
|
sed
-e
's/.mat.*/.mcool/'
)
...
...
@@ -233,19 +237,19 @@ elif [[ $DATATYPE == "VALID" ]]; then
out
=
$(
basename
$INPUT_HICPRO
|
sed
-e
's/.allValidPairs.*/.cool/'
)
awk
'{OFS="\t";print $2,$3,$4,$5,$6,$7,1}'
$INPUT_HICPRO
|
sed
-e
's/+/1/g'
-e
's/-/16/g'
>
$tmp_dir
/contacts.txt
cooler csort
--nproc
2
-c1
1
-p1
2
-s1
3
-c2
4
-p2
5
-s2
6
\
cooler csort
--nproc
${
NPROC
}
-c1
1
-p1
2
-s1
3
-c2
4
-p2
5
-s2
6
\
-o
$tmp_dir
/contacts.sorted.txt.gz
\
$tmp_dir
/contacts.txt
\
$CHROMSIZES_FILE
cooler makebins
$CHROMSIZES_FILE
$RES
>
$tmp_dir
/bins.bed
cooler cload pairix
$tmp_dir
/bins.bed
$tmp_dir
/contacts.sorted.txt.gz
$tmp_dir
/
$out
cooler cload pairix
--nproc
${
NPROC
}
$tmp_dir
/bins.bed
$tmp_dir
/contacts.sorted.txt.gz
$tmp_dir
/
$out
echo
-e
"
\n
Zoomify .cool file ..."
if
[[
$NORMALIZE
==
1
]]
;
then
cooler zoomify
--balance
$tmp_dir
/
$out
cooler zoomify
--nproc
${
NPROC
}
--balance
$tmp_dir
/
$out
else
cooler zoomify
--n
o-balance
$tmp_dir
/
$out
cooler zoomify
--n
proc
${
NPROC
}
$tmp_dir
/
$out
fi
out
=
$(
basename
$INPUT_HICPRO
|
sed
-e
's/.allValidPairs.*/.mcool/'
)
fi
...
...
This diff is collapsed.
Click to expand it.
conf/base.config
+
5
−
0
View file @
ece3fad7
...
...
@@ -66,6 +66,11 @@ process {
memory
= {
check_max
(
10
.
GB
*
task
.
attempt
,
'memory'
) }
time
= {
check_max
(
5
.
h
*
task
.
attempt
,
'time'
) }
}
withName
:
generate_cool
{
cpus
=
check_max
(
2
,
'cpus'
) }
memory
= {
check_max
(
16
.
GB
*
task
.
attempt
,
'memory'
) }
time
= {
check_max
(
4
.
h
*
task
.
attempt
,
'time'
) }
}
}
params
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment